/usr/share/gtk-doc/html/pigment/PgmCanvas.html is in libpigment0.3-dev 0.3.17-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PgmCanvas</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Pigment 0.3 Reference Manual">
<link rel="up" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="prev" href="pigment-Pgm.html" title="Pgm">
<link rel="next" href="pigment-PgmCommon.html" title="PgmCommon">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="preface" href="introduction.html" title="Introduction">
<link rel="part" href="pigment-overview.html" title="Part I. Pigment Overview">
<link rel="part" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="part" href="pigment-library.html" title="Part III. Pigment Library Reference">
<link rel="index" href="pigment-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="api-index.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="pigment-Pgm.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pigment-core.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Pigment 0.3
Reference Manual</th>
<td><a accesskey="n" href="pigment-PgmCommon.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#PgmCanvas.synopsis" class="shortcut">Top</a>
|
<a href="#PgmCanvas.description" class="shortcut">Description</a>
|
<a href="#PgmCanvas.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#PgmCanvas.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="PgmCanvas"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="PgmCanvas.top_of_page"></a>PgmCanvas</span></h2>
<p>PgmCanvas — A virtual positioning class for drawables.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="PgmCanvas.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <pgm/pgm.h>
<a class="link" href="PgmCanvas.html#PgmCanvas-struct" title="PgmCanvas">PgmCanvas</a>;
<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> * <a class="link" href="PgmCanvas.html#pgm-canvas-new" title="pgm_canvas_new ()">pgm_canvas_new</a> (void);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-set-size" title="pgm_canvas_set_size ()">pgm_canvas_set_size</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> width,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> height);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-get-size" title="pgm_canvas_get_size ()">pgm_canvas_get_size</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *width,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *height);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-add" title="pgm_canvas_add ()">pgm_canvas_add</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-remove" title="pgm_canvas_remove ()">pgm_canvas_remove</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-add-many" title="pgm_canvas_add_many ()">pgm_canvas_add_many</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable_1,
...);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-remove-many" title="pgm_canvas_remove_many ()">pgm_canvas_remove_many</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable_1,
...);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-set-order" title="pgm_canvas_set_order ()">pgm_canvas_set_order</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> order);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-get-order" title="pgm_canvas_get_order ()">pgm_canvas_get_order</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> *layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> *order);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-get-layer-count" title="pgm_canvas_get_layer_count ()">pgm_canvas_get_layer_count</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> *count);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-regenerate" title="pgm_canvas_regenerate ()">pgm_canvas_regenerate</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-get-pixel-formats" title="pgm_canvas_get_pixel_formats ()">pgm_canvas_get_pixel_formats</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
>gulong</a> *pixel_formats);
<a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> <a class="link" href="PgmCanvas.html#pgm-canvas-get-pixel-offsets" title="pgm_canvas_get_pixel_offsets ()">pgm_canvas_get_pixel_offsets</a> (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *x,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *y);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="PgmCanvas.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----GstObject
+----PgmCanvas
</pre>
</div>
<div class="refsect1" lang="en">
<a name="PgmCanvas.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="PgmCanvas.html#PgmCanvas-drawable-added" title='The "drawable-added" signal'>drawable-added</a>" : Run First
"<a class="link" href="PgmCanvas.html#PgmCanvas-drawable-removed" title='The "drawable-removed" signal'>drawable-removed</a>" : Run First
"<a class="link" href="PgmCanvas.html#PgmCanvas-drawable-reordered" title='The "drawable-reordered" signal'>drawable-reordered</a>" : Run First
"<a class="link" href="PgmCanvas.html#PgmCanvas-regenerated" title='The "regenerated" signal'>regenerated</a>" : Run First
"<a class="link" href="PgmCanvas.html#PgmCanvas-size-changed" title='The "size-changed" signal'>size-changed</a>" : Run First
</pre>
</div>
<div class="refsect1" lang="en">
<a name="PgmCanvas.description"></a><h2>Description</h2>
<p>
</p>
<div class="refsect2" lang="en">
<a name="id2763065"></a><h3>Canvas coordinates</h3>
<p>
A <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object is used as a virtual positioning system for the
<a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a>. It provides Pigment users (application developers using the
library) a very simple and flexible way to build their user interface
without having to worry about visual rendering problems such as non square
pixels, aspect ratio of images or videos, keeping proportional alignment or
spacing between objects when resizing, etc.
</p>
<p>
The origin of the canvas coordinate system corresponds to the upper-left
corner. A canvas can only understand canvas coordinates, and those
coordinates have nothing to do with pixels. This is why the methods you
can call on a canvas always use coordinates with floating numbers. Let's
say you want to draw a user interface with an aspect ratio of 16:9 (which is
nice to do on most wide screen TV of the market). In that case you would for
example set the canvas size to width 16.0 and height 9.0. Every coordinate
and size of the drawables you are going to put on the canvas will use the
same coordinate system. So, if you wanted to put an image in the middle of
the user interface you would compute its position so that its center is at
(8.0, 4.5) on the canvas. You would also define the size of that image using
values of the same scale. For example, the width of the image could be 1.0
and its height 1.0 thus making appear as a square.
</p>
<p>
A canvas is never drawn directly which is why you can use abstract
coordinates to place objects on it. Also, since it is using floating
numbers there is no limit in precision. At some point we still need to
have a visual representation of what is on the canvas, this is what
<a class="link" href="PgmViewport.html" title="PgmViewport"><span class="type">PgmViewport</span></a> does. A canvas can be projected on 0 to n viewport.
</p>
<p>
It is entirely the application's responsibility to decide how many drawables
are going to be drawn on the canvas and their size. Using the viewport
information the application can decide which aspect ratio to use and how
many drawables can fit on the canvas while still being easily readable. If
for example the end user (user interface user) steps away from the monitor
and cannot read the text the application can just make the drawables bigger
on the canvas which will automatically get reprojected onto the viewport.
</p>
<p>
When adding a drawable to a canvas you have to choose a <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a>
in which that drawable will be stored. The three layers are used to handle a
first control on the drawing order. The first layer drawn is the
<a class="link" href="PgmDrawable.html#PGM-DRAWABLE-FAR--CAPS"><code class="literal">PGM_DRAWABLE_FAR</code></a> one, all the drawables inside this layer will appear behind
the two others. The second layer drawn is the <a class="link" href="PgmDrawable.html#PGM-DRAWABLE-MIDDLE--CAPS"><code class="literal">PGM_DRAWABLE_MIDDLE</code></a> one, the
drawables inside this layer will be drawn over the <a class="link" href="PgmDrawable.html#PGM-DRAWABLE-FAR--CAPS"><code class="literal">PGM_DRAWABLE_FAR</code></a> layer
and behind the <a class="link" href="PgmDrawable.html#PGM-DRAWABLE-NEAR--CAPS"><code class="literal">PGM_DRAWABLE_NEAR</code></a> layer. The third layer drawn is the
<a class="link" href="PgmDrawable.html#PGM-DRAWABLE-NEAR--CAPS"><code class="literal">PGM_DRAWABLE_NEAR</code></a> one, all the drawables inside this layer will be drawn
over the two others. This is useful to make sure that dialog is shown on top
of all the other objects for example or to make sure that no object is going
to go behind the background. Drawables inside a layer are automatically
ordered by Pigment depending on their z coordinate set through
<a class="link" href="PgmDrawable.html#pgm-drawable-set-position" title="pgm_drawable_set_position ()"><code class="function">pgm_drawable_set_position()</code></a>. Pigment also provides a way to reorder
drawables inside a layer that have the same z coordinate thanks to the
<a class="link" href="PgmCanvas.html#pgm-canvas-set-order" title="pgm_canvas_set_order ()"><code class="function">pgm_canvas_set_order()</code></a> function.
</p>
<p>
When a drawable is created it has a floating reference, when you add it to
the canvas, the canvas takes a reference to that drawable and sink the object
reference. That means that the canvas now owns the drawable reference and
you do not need to unref the drawable when cleaning up your objects. Just
unrefing the canvas is going to cleanup all the drawables that were added to
it. Here is an example:
</p>
<div class="example">
<a name="pigment-canvas-cycle"></a><p class="title"><b>Example 3. Create a canvas, add drawables, unref the canvas</b></p>
<div class="example-contents"><pre class="programlisting">
PgmCanvas *canvas = pgm_canvas_new ();
PgmDrawable *drb1 = pgm_text_new ("hello world");
PgmDrawable *drb2 = pgm_image_new_from_fd (fd, 1024);
PgmDrawable *drb3 = pgm_image_new_from_image (drb2);
pgm_canvas_add_many (canvas, PGM_DRAWABLE_MIDDLE, drb1, drb2, drb3, NULL);
gst_object_unref (canvas); // Unref canvas, drb1, drb2 and drb3
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
The <a class="link" href="PgmCanvas.html#PgmCanvas-drawable-added" title='The "drawable-added" signal'>drawable-added</a> signal is
fired whenever a new drawable is added to the canvas. Likewise the <a class="link" href="PgmCanvas.html#PgmCanvas-drawable-removed" title='The "drawable-removed" signal'>drawable-removed</a> signal is fired
whenever an drawable is removed from the canvas. The <a class="link" href="PgmCanvas.html#PgmCanvas-drawable-reordered" title='The "drawable-reordered" signal'>drawable-reordered</a> signal is
fired whenever a drawable is reordered inside the canvas.
</p>
</div>
<p>
</p>
<p>
Last reviewed on 2007-08-03 (0.3.0)</p>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="PgmCanvas.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="PgmCanvas-struct"></a><h3>PgmCanvas</h3>
<pre class="programlisting">typedef struct {
/* Layer lists */
GList *far_layer;
GList *middle_layer;
GList *near_layer;
/* Canvas size */
gfloat width, height;
/* Pixel offsets */
gfloat pixel_offset_x, pixel_offset_y;
/* Mask of supported formats */
gulong pixel_formats;
} PgmCanvas;
</pre>
<p>
The <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> structure.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
>GList</a> *<em class="structfield"><code>far_layer</code></em>;</span></p></td>
<td> the list of <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> in the <a class="link" href="PgmDrawable.html#PGM-DRAWABLE-FAR--CAPS"><span class="type">PGM_DRAWABLE_FAR</span></a> layer.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
>GList</a> *<em class="structfield"><code>middle_layer</code></em>;</span></p></td>
<td> the list of <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> in the <a class="link" href="PgmDrawable.html#PGM-DRAWABLE-MIDDLE--CAPS"><span class="type">PGM_DRAWABLE_MIDDLE</span></a> layer.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"
>GList</a> *<em class="structfield"><code>near_layer</code></em>;</span></p></td>
<td> the list of <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> in the <a class="link" href="PgmDrawable.html#PGM-DRAWABLE-NEAR--CAPS"><span class="type">PGM_DRAWABLE_NEAR</span></a> layer.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>width</code></em>;</span></p></td>
<td> the canvas width.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>height</code></em>;</span></p></td>
<td> the canvas height.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>pixel_offset_x</code></em>;</span></p></td>
<td> the pixel offset on x.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>pixel_offset_y</code></em>;</span></p></td>
<td> the pixel offset on y.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
>gulong</a> <em class="structfield"><code>pixel_formats</code></em>;</span></p></td>
<td> the pixel formats mask.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-new"></a><h3>pgm_canvas_new ()</h3>
<pre class="programlisting"><a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> * pgm_canvas_new (void);</pre>
<p>
Creates a new <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> instance.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> instance.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-set-size"></a><h3>pgm_canvas_set_size ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_set_size (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> width,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> height);</pre>
<p>
Sets the <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> size of <em class="parameter"><code>canvas</code></em>. These values are not supposed
to be pixels. You are strongly encouraged to use abstract coordinates such as
16.0x9.0 for a 16:9 interface or 4.0x3.0 for a 4:3 one, etc.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> the canvas width.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> the canvas height.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-get-size"></a><h3>pgm_canvas_get_size ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_get_size (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *width,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *height);</pre>
<p>
Retrieves width and height size of <em class="parameter"><code>canvas</code></em> in <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
><span class="type">gfloat</span></a> where the canvas width is going to
be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
><span class="type">gfloat</span></a> where the canvas height is going to
be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-add"></a><h3>pgm_canvas_add ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_add (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable);</pre>
<p>
Adds <em class="parameter"><code>drawable</code></em> to <em class="parameter"><code>canvas</code></em> in <em class="parameter"><code>layer</code></em>. Both <em class="parameter"><code>canvas</code></em> and <em class="parameter"><code>drawable</code></em> reference
counts will be increased by one as they are linking to each other. <em class="parameter"><code>drawable</code></em>
reference will be sink as well so if the object reference was floating it
now belongs to <em class="parameter"><code>canvas</code></em> and you don't have to unref <em class="parameter"><code>drawable</code></em> when cleaning
up your objects.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> a <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> to add <span class="type">drawable</span> into.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> object to add.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-remove"></a><h3>pgm_canvas_remove ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_remove (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable);</pre>
<p>
Removes <em class="parameter"><code>drawable</code></em> from <em class="parameter"><code>canvas</code></em>. Both <em class="parameter"><code>canvas</code></em> and <em class="parameter"><code>drawable</code></em> reference counts
will be decreased by one as they were referencing each other. In most cases
that means that <em class="parameter"><code>drawable</code></em> is going to be destroyed because <em class="parameter"><code>canvas</code></em> owned the
only reference to it. If you want to reuse <em class="parameter"><code>drawable</code></em> in another canvas or
in another layer you need to take a reference to it before removing it from
<em class="parameter"><code>canvas</code></em>.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> object to remove.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-add-many"></a><h3>pgm_canvas_add_many ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_add_many (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable_1,
...);</pre>
<p>
Adds a NULL-terminated list of drawables to <em class="parameter"><code>canvas</code></em>. This function is
equivalent to calling <a class="link" href="PgmCanvas.html#pgm-canvas-add" title="pgm_canvas_add ()"><code class="function">pgm_canvas_add()</code></a> for each member of the list.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> a <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> to add the drawables into.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable_1</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> object to add.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> additional <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> objects to add.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-remove-many"></a><h3>pgm_canvas_remove_many ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_remove_many (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable_1,
...);</pre>
<p>
Removes a NULL-terminated list of drawables from <em class="parameter"><code>canvas</code></em>. This function is
equivalent to calling <a class="link" href="PgmCanvas.html#pgm-canvas-remove" title="pgm_canvas_remove ()"><code class="function">pgm_canvas_remove()</code></a> for each member of the list.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable_1</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> object to remove.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> additional <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> objects to remove.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-set-order"></a><h3>pgm_canvas_set_order ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_set_order (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> order);</pre>
<p>
Defines the ordering of <em class="parameter"><code>drawable</code></em> in its layer at position <em class="parameter"><code>order</code></em>. Since
drawables are ordered function of their z coordinate, set through
<a class="link" href="PgmDrawable.html#pgm-drawable-set-position" title="pgm_drawable_set_position ()"><code class="function">pgm_drawable_set_position()</code></a>, this function is only useful if you want to
reorder drawables at the same z coordinate. If you try to reorder a drawable
inside a layer at an order where the current drawable doesn't have the same
z coordinate, the function will do nothing and return an error.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> to reorder.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>order</code></em> :</span></p></td>
<td> the new position of <em class="parameter"><code>drawable</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-get-order"></a><h3>pgm_canvas_get_order ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_get_order (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> *layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> *order);</pre>
<p>
Retrieves the layering of <em class="parameter"><code>drawable</code></em>.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> to retrieve the layering.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> a pointer to a <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> in which <em class="parameter"><code>drawable</code></em> layer is going to
be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>order</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
><span class="type">gint</span></a> in which the position of <em class="parameter"><code>drawable</code></em> in the <em class="parameter"><code>layer</code></em>
is going to be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-get-layer-count"></a><h3>pgm_canvas_get_layer_count ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_get_layer_count (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> *count);</pre>
<p>
Retrieves the number of drawables in <em class="parameter"><code>layer</code></em>.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> to retrieve the size.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
><span class="type">gint</span></a> in which the number of drawables in <em class="parameter"><code>layer</code></em> is
going to be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-regenerate"></a><h3>pgm_canvas_regenerate ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_regenerate (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas);</pre>
<p>
Affects all the drawables of the <span class="type">canvas</span> which need to be displayed
at a fixed size. It regenerates those rasterized pixmaps which have
been affected by the <span class="type">canvas</span> projection.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-get-pixel-formats"></a><h3>pgm_canvas_get_pixel_formats ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_get_pixel_formats (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
>gulong</a> *pixel_formats);</pre>
<p>
Gets the list of the supported pixel formats by <em class="parameter"><code>canvas</code></em>. This is the
intersection of the pixel formats supported by the viewports to which
<em class="parameter"><code>canvas</code></em> is bound.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixel_formats</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gulong"
><span class="type">gulong</span></a> where the mask of supported
<a class="link" href="PgmImage.html#PgmImagePixelFormat" title="enum PgmImagePixelFormat"><span class="type">PgmImagePixelFormat</span></a> is going to be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-canvas-get-pixel-offsets"></a><h3>pgm_canvas_get_pixel_offsets ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError">PgmError</a> pgm_canvas_get_pixel_offsets (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *x,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> *y);</pre>
<p>
Gets the x and y ratios corresponding to the offsets in canvas coordinates
between two pixels at z=0.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> a <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
><span class="type">gfloat</span></a> where the x pixel offset is going to be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td> a pointer to a <a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
><span class="type">gfloat</span></a> where the y pixel offset is going to be stored.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="pigment-PgmCommon.html#PgmError" title="enum PgmError"><span class="type">PgmError</span></a> indicating success/failure.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="PgmCanvas.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="PgmCanvas-drawable-added"></a><h3>The <code class="literal">"drawable-added"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> order,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run First</pre>
<p>
Will be emitted after <em class="parameter"><code>drawable</code></em> was added to <em class="parameter"><code>canvas</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> the <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> that was added to <em class="parameter"><code>canvas</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> in which <em class="parameter"><code>drawable</code></em> was added
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>order</code></em> :</span></p></td>
<td> the order in <em class="parameter"><code>layer</code></em> in which <em class="parameter"><code>drawable</code></em> was added
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmCanvas-drawable-removed"></a><h3>The <code class="literal">"drawable-removed"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run First</pre>
<p>
Will be emitted after <em class="parameter"><code>drawable</code></em> was removed from <em class="parameter"><code>canvas</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> the <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> that was removed from <em class="parameter"><code>canvas</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> from which <em class="parameter"><code>drawable</code></em> was removed
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmCanvas-drawable-reordered"></a><h3>The <code class="literal">"drawable-reordered"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a class="link" href="PgmDrawable.html" title="PgmDrawable">PgmDrawable</a> *drawable,
<a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer">PgmDrawableLayer</a> layer,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> order,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run First</pre>
<p>
Will be emitted after <em class="parameter"><code>drawable</code></em> was reordered in <em class="parameter"><code>canvas</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> the <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>drawable</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a> that was reordered in <em class="parameter"><code>canvas</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>layer</code></em> :</span></p></td>
<td> the <a class="link" href="PgmDrawable.html#PgmDrawableLayer" title="enum PgmDrawableLayer"><span class="type">PgmDrawableLayer</span></a> in which <em class="parameter"><code>drawable</code></em> was reordered
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>order</code></em> :</span></p></td>
<td> the new order of <em class="parameter"><code>drawable</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmCanvas-regenerated"></a><h3>The <code class="literal">"regenerated"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run First</pre>
<p>
Will be emitted after <em class="parameter"><code>canvas</code></em> received a regeneration request.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> the <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmCanvas-size-changed"></a><h3>The <code class="literal">"size-changed"</code> signal</h3>
<pre class="programlisting">void user_function (<a class="link" href="PgmCanvas.html" title="PgmCanvas">PgmCanvas</a> *canvas,
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
>gpointer</a> user_data) : Run First</pre>
<p>
Will be emitted after <em class="parameter"><code>canvas</code></em> size was changed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td> the <a class="link" href="PgmCanvas.html" title="PgmCanvas"><span class="type">PgmCanvas</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="PgmCanvas.see-also"></a><h2>See Also</h2>
#PgmViewport, <a class="link" href="PgmDrawable.html" title="PgmDrawable"><span class="type">PgmDrawable</span></a>.
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|