/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-Scaling.html is in libgdk-pixbuf2.0-doc 2.32.2-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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Scaling: GDK-PixBuf Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gdk-pixbuf-Inline-data.html" title="Inline data">
<link rel="next" href="gdk-pixbuf-gdk-pixbuf-rendering.html" title="Rendering">
<meta name="generator" content="GTK-Doc V1.24.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#gdk-pixbuf-Scaling.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdk-pixbuf-Inline-data.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdk-pixbuf-gdk-pixbuf-rendering.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk-pixbuf-Scaling"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk-pixbuf-Scaling.top_of_page"></a>Scaling</span></h2>
<p>Scaling — Scaling pixbufs and scaling and compositing pixbufs</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()">gdk_pixbuf_scale_simple</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()">gdk_pixbuf_scale</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple ()">gdk_pixbuf_composite_color_simple</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()">gdk_pixbuf_composite</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()">gdk_pixbuf_composite_color</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-rotate-simple" title="gdk_pixbuf_rotate_simple ()">gdk_pixbuf_rotate_simple</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-flip" title="gdk_pixbuf_flip ()">gdk_pixbuf_flip</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType">GdkInterpType</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gdk-pixbuf-Scaling.html#GdkPixbufRotation" title="enum GdkPixbufRotation">GdkPixbufRotation</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gdk-pixbuf/gdk-pixbuf.h>
</pre>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.description"></a><h2>Description</h2>
<p>The GdkPixBuf contains functions to scale pixbufs, to scale
pixbufs and composite against an existing image, and to scale
pixbufs and composite against a solid color or checkerboard.
Compositing a checkerboard is a common way to show an image with
an alpha channel in image-viewing and editing software.</p>
<p>Since the full-featured functions (<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>,
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()"><code class="function">gdk_pixbuf_composite()</code></a>, and <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()"><code class="function">gdk_pixbuf_composite_color()</code></a>) are
rather complex to use and have many arguments, two simple
convenience functions are provided, <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()"><code class="function">gdk_pixbuf_scale_simple()</code></a> and
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple ()"><code class="function">gdk_pixbuf_composite_color_simple()</code></a> which create a new pixbuf of a
given size, scale an original image to fit, and then return the
new pixbuf.</p>
<p>If the destination pixbuf was created from a readonly source, these
operations will force a copy into a mutable buffer.</p>
<p>Scaling and compositing functions take advantage of MMX hardware
acceleration on systems where MMX is supported. If gdk-pixbuf is built
with the Sun mediaLib library, these functions are instead accelerated
using mediaLib, which provides hardware acceleration on Intel, AMD,
and Sparc chipsets. If desired, mediaLib support can be turned off by
setting the <code class="literal">GDK_DISABLE_MEDIALIB</code> environment variable. </p>
<p>The following example demonstrates handling an expose event by
rendering the appropriate area of a source image (which is scaled
to fit the widget) onto the widget's window. The source image is
rendered against a checkerboard, which provides a visual
representation of the alpha channel if the image has one. If the
image doesn't have an alpha channel, calling
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color" title="gdk_pixbuf_composite_color ()"><code class="function">gdk_pixbuf_composite_color()</code></a> function has exactly the same effect
as calling <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.10.6.7"></a><h4>Handling an expose event</h4>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="normal"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a></span>
<span class="function">expose_cb</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">GdkEventExpose</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">event</span><span class="symbol">,</span><span class="normal"> </span><span class="usertype">gpointer</span><span class="normal"> data</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="usertype">GdkPixbuf</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">dest</span><span class="symbol">;</span>
<span class="normal"> dest </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new">gdk_pixbuf_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GDK-COLORSPACE-RGB:CAPS">GDK_COLORSPACE_RGB</a></span><span class="symbol">,</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">8</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">height</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color">gdk_pixbuf_composite_color</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">,</span><span class="normal"> dest</span><span class="symbol">,</span>
<span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">height</span><span class="symbol">,</span>
<span class="normal"> </span><span class="symbol">-</span><span class="normal">event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">-</span><span class="normal">event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span>
<span class="normal"> </span><span class="symbol">(</span><span class="type">double</span><span class="symbol">)</span><span class="normal"> widget</span><span class="symbol">-></span><span class="normal">allocation</span><span class="symbol">.</span><span class="normal">width </span><span class="symbol">/</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-width">gdk_pixbuf_get_width</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">),</span>
<span class="normal"> </span><span class="symbol">(</span><span class="type">double</span><span class="symbol">)</span><span class="normal"> widget</span><span class="symbol">-></span><span class="normal">allocation</span><span class="symbol">.</span><span class="normal">height </span><span class="symbol">/</span><span class="normal"> </span><span class="function"><a href="gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-height">gdk_pixbuf_get_height</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">pixbuf</span><span class="symbol">),</span>
<span class="normal"> <a href="gdk-pixbuf-Scaling.html#GDK-INTERP-BILINEAR:CAPS">GDK_INTERP_BILINEAR</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">255</span><span class="symbol">,</span>
<span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span><span class="normal"> </span><span class="number">16</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0xaaaaaa</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0x555555</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function">gdk_draw_pixbuf</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">-></span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> widget</span><span class="symbol">-></span><span class="normal">style</span><span class="symbol">-></span><span class="normal">fg_gc</span><span class="symbol">[</span><span class="normal"><a href="http://developer.gnome.org/gtk3/GtkWidget.html#GTK-STATE-NORMAL:CAPS">GTK_STATE_NORMAL</a></span><span class="symbol">],</span><span class="normal"> dest</span><span class="symbol">,</span>
<span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">,</span>
<span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">width</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">height</span><span class="symbol">,</span>
<span class="normal"> GDK_RGB_DITHER_NORMAL</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">x</span><span class="symbol">,</span><span class="normal"> event</span><span class="symbol">-></span><span class="normal">area</span><span class="symbol">.</span><span class="normal">y</span><span class="symbol">);</span>
<span class="normal"> </span>
<span class="normal"> </span><span class="function"><a href="gdk-pixbuf-Reference-Counting-and-Memory-Mangement.html#gdk-pixbuf-unref">gdk_pixbuf_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dest</span><span class="symbol">);</span>
<span class="normal"> </span>
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">;</span>
<span class="cbracket">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
</div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-pixbuf-scale-simple"></a><h3>gdk_pixbuf_scale_simple ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
gdk_pixbuf_scale_simple (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>);</pre>
<p>Create a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> containing a copy of <em class="parameter"><code>src</code></em>
scaled to
<em class="parameter"><code>dest_width</code></em>
x <em class="parameter"><code>dest_height</code></em>
. Leaves <em class="parameter"><code>src</code></em>
unaffected. <em class="parameter"><code>interp_type</code></em>
should be <a class="link" href="gdk-pixbuf-Scaling.html#GDK-INTERP-NEAREST:CAPS"><span class="type">GDK_INTERP_NEAREST</span></a> if you want maximum speed (but when
scaling down <a class="link" href="gdk-pixbuf-Scaling.html#GDK-INTERP-NEAREST:CAPS"><span class="type">GDK_INTERP_NEAREST</span></a> is usually unusably ugly). The
default <em class="parameter"><code>interp_type</code></em>
should be <a class="link" href="gdk-pixbuf-Scaling.html#GDK-INTERP-BILINEAR:CAPS"><span class="type">GDK_INTERP_BILINEAR</span></a> which offers
reasonable quality and speed.</p>
<p>You can scale a sub-portion of <em class="parameter"><code>src</code></em>
by creating a sub-pixbuf
pointing into <em class="parameter"><code>src</code></em>
; see <a class="link" href="gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-subpixbuf" title="gdk_pixbuf_new_subpixbuf ()"><code class="function">gdk_pixbuf_new_subpixbuf()</code></a>.</p>
<p>For more complicated scaling/compositing see <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale" title="gdk_pixbuf_scale ()"><code class="function">gdk_pixbuf_scale()</code></a>
and <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite" title="gdk_pixbuf_composite ()"><code class="function">gdk_pixbuf_composite()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.10.7.2.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_width</p></td>
<td class="parameter_description"><p>the width of destination image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_height</p></td>
<td class="parameter_description"><p>the height of destination image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interp_type</p></td>
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.10.7.2.8"></a><h4>Returns</h4>
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
allocated for it. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-scale"></a><h3>gdk_pixbuf_scale ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_pixbuf_scale (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_x</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
<em class="parameter"><code><span class="type">double</span> offset_x</code></em>,
<em class="parameter"><code><span class="type">double</span> offset_y</code></em>,
<em class="parameter"><code><span class="type">double</span> scale_x</code></em>,
<em class="parameter"><code><span class="type">double</span> scale_y</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>);</pre>
<p>Creates a transformation of the source image <em class="parameter"><code>src</code></em>
by scaling by
<em class="parameter"><code>scale_x</code></em>
and <em class="parameter"><code>scale_y</code></em>
then translating by <em class="parameter"><code>offset_x</code></em>
and <em class="parameter"><code>offset_y</code></em>
,
then renders the rectangle (<em class="parameter"><code>dest_x</code></em>
, <em class="parameter"><code>dest_y</code></em>
, <em class="parameter"><code>dest_width</code></em>
,
<em class="parameter"><code>dest_height</code></em>
) of the resulting image onto the destination image
replacing the previous contents.</p>
<p>Try to use <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()"><code class="function">gdk_pixbuf_scale_simple()</code></a> first, this function is
the industrial-strength power tool you can fall back to if
<a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-scale-simple" title="gdk_pixbuf_scale_simple ()"><code class="function">gdk_pixbuf_scale_simple()</code></a> isn't powerful enough.</p>
<p>If the source rectangle overlaps the destination rectangle on the
same pixbuf, it will be overwritten during the scaling which
results in rendering artifacts.</p>
<div class="refsect3">
<a name="id-1.2.10.7.3.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_x</p></td>
<td class="parameter_description"><p>the left coordinate for region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_y</p></td>
<td class="parameter_description"><p>the top coordinate for region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_width</p></td>
<td class="parameter_description"><p>the width of the region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_height</p></td>
<td class="parameter_description"><p>the height of the region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset_x</p></td>
<td class="parameter_description"><p>the offset in the X direction (currently rounded to an integer)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset_y</p></td>
<td class="parameter_description"><p>the offset in the Y direction (currently rounded to an integer)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale_x</p></td>
<td class="parameter_description"><p>the scale factor in the X direction</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale_y</p></td>
<td class="parameter_description"><p>the scale factor in the Y direction</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interp_type</p></td>
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-composite-color-simple"></a><h3>gdk_pixbuf_composite_color_simple ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
gdk_pixbuf_composite_color_simple (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>,
<em class="parameter"><code><span class="type">int</span> overall_alpha</code></em>,
<em class="parameter"><code><span class="type">int</span> check_size</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color1</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color2</code></em>);</pre>
<p>Creates a new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> by scaling <em class="parameter"><code>src</code></em>
to <em class="parameter"><code>dest_width</code></em>
x
<em class="parameter"><code>dest_height</code></em>
and compositing the result with a checkboard of colors
<em class="parameter"><code>color1</code></em>
and <em class="parameter"><code>color2</code></em>
.</p>
<div class="refsect3">
<a name="id-1.2.10.7.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_width</p></td>
<td class="parameter_description"><p>the width of destination image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_height</p></td>
<td class="parameter_description"><p>the height of destination image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interp_type</p></td>
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>overall_alpha</p></td>
<td class="parameter_description"><p>overall alpha for source image (0..255)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_size</p></td>
<td class="parameter_description"><p>the size of checks in the checkboard (must be a power of two)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color1</p></td>
<td class="parameter_description"><p>the color of check at upper left</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color2</p></td>
<td class="parameter_description"><p>the color of the other check</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.10.7.4.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not enough memory could be
allocated for it. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-composite"></a><h3>gdk_pixbuf_composite ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_pixbuf_composite (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_x</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
<em class="parameter"><code><span class="type">double</span> offset_x</code></em>,
<em class="parameter"><code><span class="type">double</span> offset_y</code></em>,
<em class="parameter"><code><span class="type">double</span> scale_x</code></em>,
<em class="parameter"><code><span class="type">double</span> scale_y</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>,
<em class="parameter"><code><span class="type">int</span> overall_alpha</code></em>);</pre>
<p>Creates a transformation of the source image <em class="parameter"><code>src</code></em>
by scaling by
<em class="parameter"><code>scale_x</code></em>
and <em class="parameter"><code>scale_y</code></em>
then translating by <em class="parameter"><code>offset_x</code></em>
and <em class="parameter"><code>offset_y</code></em>
.
This gives an image in the coordinates of the destination pixbuf.
The rectangle (<em class="parameter"><code>dest_x</code></em>
, <em class="parameter"><code>dest_y</code></em>
, <em class="parameter"><code>dest_width</code></em>
, <em class="parameter"><code>dest_height</code></em>
)
is then composited onto the corresponding rectangle of the
original destination image.</p>
<p>When the destination rectangle contains parts not in the source
image, the data at the edges of the source image is replicated
to infinity. </p>
<p><span class="inlinemediaobject"><img src="composite.png"></span></p>
<div class="refsect3">
<a name="id-1.2.10.7.5.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_x</p></td>
<td class="parameter_description"><p>the left coordinate for region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_y</p></td>
<td class="parameter_description"><p>the top coordinate for region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_width</p></td>
<td class="parameter_description"><p>the width of the region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_height</p></td>
<td class="parameter_description"><p>the height of the region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset_x</p></td>
<td class="parameter_description"><p>the offset in the X direction (currently rounded to an integer)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset_y</p></td>
<td class="parameter_description"><p>the offset in the Y direction (currently rounded to an integer)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale_x</p></td>
<td class="parameter_description"><p>the scale factor in the X direction</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale_y</p></td>
<td class="parameter_description"><p>the scale factor in the Y direction</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interp_type</p></td>
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>overall_alpha</p></td>
<td class="parameter_description"><p>overall alpha for source image (0..255)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-composite-color"></a><h3>gdk_pixbuf_composite_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_pixbuf_composite_color (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *dest</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_x</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_y</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_width</code></em>,
<em class="parameter"><code><span class="type">int</span> dest_height</code></em>,
<em class="parameter"><code><span class="type">double</span> offset_x</code></em>,
<em class="parameter"><code><span class="type">double</span> offset_y</code></em>,
<em class="parameter"><code><span class="type">double</span> scale_x</code></em>,
<em class="parameter"><code><span class="type">double</span> scale_y</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkInterpType" title="enum GdkInterpType"><span class="type">GdkInterpType</span></a> interp_type</code></em>,
<em class="parameter"><code><span class="type">int</span> overall_alpha</code></em>,
<em class="parameter"><code><span class="type">int</span> check_x</code></em>,
<em class="parameter"><code><span class="type">int</span> check_y</code></em>,
<em class="parameter"><code><span class="type">int</span> check_size</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color1</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> color2</code></em>);</pre>
<p>Creates a transformation of the source image <em class="parameter"><code>src</code></em>
by scaling by
<em class="parameter"><code>scale_x</code></em>
and <em class="parameter"><code>scale_y</code></em>
then translating by <em class="parameter"><code>offset_x</code></em>
and <em class="parameter"><code>offset_y</code></em>
,
then composites the rectangle (<em class="parameter"><code>dest_x</code></em>
,<em class="parameter"><code>dest_y</code></em>
, <em class="parameter"><code>dest_width</code></em>
,
<em class="parameter"><code>dest_height</code></em>
) of the resulting image with a checkboard of the
colors <em class="parameter"><code>color1</code></em>
and <em class="parameter"><code>color2</code></em>
and renders it onto the destination
image.</p>
<p>See <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-composite-color-simple" title="gdk_pixbuf_composite_color_simple ()"><code class="function">gdk_pixbuf_composite_color_simple()</code></a> for a simpler variant of this
function suitable for many tasks.</p>
<div class="refsect3">
<a name="id-1.2.10.7.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>the <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> into which to render the results</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_x</p></td>
<td class="parameter_description"><p>the left coordinate for region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_y</p></td>
<td class="parameter_description"><p>the top coordinate for region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_width</p></td>
<td class="parameter_description"><p>the width of the region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest_height</p></td>
<td class="parameter_description"><p>the height of the region to render</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset_x</p></td>
<td class="parameter_description"><p>the offset in the X direction (currently rounded to an integer)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset_y</p></td>
<td class="parameter_description"><p>the offset in the Y direction (currently rounded to an integer)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale_x</p></td>
<td class="parameter_description"><p>the scale factor in the X direction</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale_y</p></td>
<td class="parameter_description"><p>the scale factor in the Y direction</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interp_type</p></td>
<td class="parameter_description"><p>the interpolation type for the transformation.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>overall_alpha</p></td>
<td class="parameter_description"><p>overall alpha for source image (0..255)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_x</p></td>
<td class="parameter_description"><p>the X offset for the checkboard (origin of checkboard is at -<em class="parameter"><code>check_x</code></em>
, -<em class="parameter"><code>check_y</code></em>
)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_y</p></td>
<td class="parameter_description"><p>the Y offset for the checkboard </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_size</p></td>
<td class="parameter_description"><p>the size of checks in the checkboard (must be a power of two)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color1</p></td>
<td class="parameter_description"><p>the color of check at upper left</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color2</p></td>
<td class="parameter_description"><p>the color of the other check</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-rotate-simple"></a><h3>gdk_pixbuf_rotate_simple ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
gdk_pixbuf_rotate_simple (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><a class="link" href="gdk-pixbuf-Scaling.html#GdkPixbufRotation" title="enum GdkPixbufRotation"><span class="type">GdkPixbufRotation</span></a> angle</code></em>);</pre>
<p>Rotates a pixbuf by a multiple of 90 degrees, and returns the
result in a new pixbuf.</p>
<div class="refsect3">
<a name="id-1.2.10.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>angle</p></td>
<td class="parameter_description"><p>the angle to rotate by</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.10.7.7.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if not enough memory could be allocated for it. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-pixbuf-flip"></a><h3>gdk_pixbuf_flip ()</h3>
<pre class="programlisting"><a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *
gdk_pixbuf_flip (<em class="parameter"><code>const <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *src</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> horizontal</code></em>);</pre>
<p>Flips a pixbuf horizontally or vertically and returns the
result in a new pixbuf.</p>
<div class="refsect3">
<a name="id-1.2.10.7.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>src</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>horizontal</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to flip horizontally, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to flip vertically</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.10.7.8.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if not enough memory could be allocated for it. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkInterpType"></a><h3>enum GdkInterpType</h3>
<p>This enumeration describes the different interpolation modes that
can be used with the scaling functions. <em class="parameter"><code>GDK_INTERP_NEAREST</code></em>
is
the fastest scaling method, but has horrible quality when
scaling down. <em class="parameter"><code>GDK_INTERP_BILINEAR</code></em>
is the best choice if you
aren't sure what to choose, it has a good speed/quality balance.</p>
<p> <note>
Cubic filtering is missing from the list; hyperbolic
interpolation is just as fast and results in higher quality.
</note></p>
<div class="refsect3">
<a name="id-1.2.10.8.2.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-INTERP-NEAREST:CAPS"></a>GDK_INTERP_NEAREST</p></td>
<td class="enum_member_description">
<p>Nearest neighbor sampling; this is the fastest
and lowest quality mode. Quality is normally unacceptable when scaling
down, but may be OK when scaling up.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-INTERP-TILES:CAPS"></a>GDK_INTERP_TILES</p></td>
<td class="enum_member_description">
<p>This is an accurate simulation of the PostScript
image operator without any interpolation enabled. Each pixel is
rendered as a tiny parallelogram of solid color, the edges of which
are implemented with antialiasing. It resembles nearest neighbor for
enlargement, and bilinear for reduction.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-INTERP-BILINEAR:CAPS"></a>GDK_INTERP_BILINEAR</p></td>
<td class="enum_member_description">
<p>Best quality/speed balance; use this mode by
default. Bilinear interpolation. For enlargement, it is
equivalent to point-sampling the ideal bilinear-interpolated image.
For reduction, it is equivalent to laying down small tiles and
integrating over the coverage area.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-INTERP-HYPER:CAPS"></a>GDK_INTERP_HYPER</p></td>
<td class="enum_member_description">
<p>This is the slowest and highest quality
reconstruction function. It is derived from the hyperbolic filters in
Wolberg's "Digital Image Warping", and is formally defined as the
hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
image (the filter is designed to be idempotent for 1:1 pixel mapping).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GdkPixbufRotation"></a><h3>enum GdkPixbufRotation</h3>
<p>The possible rotations which can be passed to <a class="link" href="gdk-pixbuf-Scaling.html#gdk-pixbuf-rotate-simple" title="gdk_pixbuf_rotate_simple ()"><code class="function">gdk_pixbuf_rotate_simple()</code></a>.
To make them easier to use, their numerical values are the actual degrees.</p>
<div class="refsect3">
<a name="id-1.2.10.8.3.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-NONE:CAPS"></a>GDK_PIXBUF_ROTATE_NONE</p></td>
<td class="enum_member_description">
<p>No rotation.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-COUNTERCLOCKWISE:CAPS"></a>GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE</p></td>
<td class="enum_member_description">
<p>Rotate by 90 degrees.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-UPSIDEDOWN:CAPS"></a>GDK_PIXBUF_ROTATE_UPSIDEDOWN</p></td>
<td class="enum_member_description">
<p>Rotate by 180 degrees.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-PIXBUF-ROTATE-CLOCKWISE:CAPS"></a>GDK_PIXBUF_ROTATE_CLOCKWISE</p></td>
<td class="enum_member_description">
<p>Rotate by 270 degrees.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gdk-pixbuf-Scaling.see-also"></a><h2>See Also</h2>
<p><link linkend="gdk-GdkRGB">GdkRGB</link>.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24.1</div>
</body>
</html>
|