⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdk-pixbufs.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>src_x</code></em>&#160;:</span></p></td><td> Source X coordinate within pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>src_y</code></em>&#160;:</span></p></td><td> Source Y coordinate within pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_x</code></em>&#160;:</span></p></td><td> Destination X coordinate within drawable.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_y</code></em>&#160;:</span></p></td><td> Destination Y coordinate within drawable.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td><td> Width of region to render, in pixels, or -1 to use pixbuf width</td></tr><tr><td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td><td> Height of region to render, in pixels, or -1 to use pixbuf height</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dither</code></em>&#160;:</span></p></td><td> Dithering mode for GdkRGB.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x_dither</code></em>&#160;:</span></p></td><td> X offset for dither.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y_dither</code></em>&#160;:</span></p></td><td> Y offset for dither.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3140540"></a><h3><a name="gdk-pixbuf-render-to-drawable-alpha"></a>gdk_pixbuf_render_to_drawable_alpha ()</h3><a class="indexterm" name="id3140558"></a><pre class="programlisting">void                gdk_pixbuf_render_to_drawable_alpha (<ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> *pixbuf,                                                         <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,                                                         int src_x,                                                         int src_y,                                                         int dest_x,                                                         int dest_y,                                                         int width,                                                         int height,                                                         <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbufAlphaMode">GdkPixbufAlphaMode</a> alpha_mode,                                                         int alpha_threshold,                                                         <a class="link" href="gdk-GdkRGB.html#GdkRgbDither">GdkRgbDither</a> dither,                                                         int x_dither,                                                         int y_dither);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_pixbuf_render_to_drawable_alpha</code> has been deprecated since version 2.4 and should not be used in newly-written code. This function is obsolete. Use <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-pixbuf"><code class="function">gdk_draw_pixbuf()</code></a> instead.</p></div><p>Renders a rectangular portion of a pixbuf to a drawable.  The destinationdrawable must have a colormap. All windows have a colormap, however, pixmapsonly have colormap by default if they were created with a non-<ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> window argument.Otherwise a colormap must be set on them with gdk_drawable_set_colormap.</p><p>On older X servers, rendering pixbufs with an alpha channel involves round tripsto the X server, and may be somewhat slow.</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>pixbuf</code></em>&#160;:</span></p></td><td> A pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>drawable</code></em>&#160;:</span></p></td><td> Destination drawable.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>src_x</code></em>&#160;:</span></p></td><td> Source X coordinate within pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>src_y</code></em>&#160;:</span></p></td><td> Source Y coordinates within pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_x</code></em>&#160;:</span></p></td><td> Destination X coordinate within drawable.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dest_y</code></em>&#160;:</span></p></td><td> Destination Y coordinate within drawable.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>width</code></em>&#160;:</span></p></td><td> Width of region to render, in pixels, or -1 to use pixbuf width.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>height</code></em>&#160;:</span></p></td><td> Height of region to render, in pixels, or -1 to use pixbuf height.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>alpha_mode</code></em>&#160;:</span></p></td><td> Ignored. Present for backwards compatibility.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>alpha_threshold</code></em>&#160;:</span></p></td><td> Ignored. Present for backwards compatibility</td></tr><tr><td><p><span class="term"><em class="parameter"><code>dither</code></em>&#160;:</span></p></td><td> Dithering mode for GdkRGB.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x_dither</code></em>&#160;:</span></p></td><td> X offset for dither.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y_dither</code></em>&#160;:</span></p></td><td> Y offset for dither.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3140915"></a><h3><a name="gdk-pixbuf-render-pixmap-and-mask"></a>gdk_pixbuf_render_pixmap_and_mask ()</h3><a class="indexterm" name="id3140929"></a><pre class="programlisting">void                gdk_pixbuf_render_pixmap_and_mask   (<ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> *pixbuf,                                                         <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> **pixmap_return,                                                         <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask_return,                                                         int alpha_threshold);</pre><p>Creates a pixmap and a mask bitmap which are returned in the <em class="parameter"><code>pixmap_return</code></em>and <em class="parameter"><code>mask_return</code></em> arguments, respectively, and renders a pixbuf and itscorresponding thresholded alpha mask to them.  This is merely a conveniencefunction; applications that need to render pixbufs with dither offsets or togiven drawables should use <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-pixbuf"><code class="function">gdk_draw_pixbuf()</code></a> and <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-threshold-alpha"><code class="function">gdk_pixbuf_render_threshold_alpha()</code></a>.</p><p>The pixmap that is created is created for the colormap returnedby <a class="link" href="gdk-GdkRGB.html#gdk-rgb-get-colormap"><code class="function">gdk_rgb_get_colormap()</code></a>. You normally will want to instead usethe actual colormap for a widget, and use<a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-pixmap-and-mask-for-colormap"><code class="function">gdk_pixbuf_render_pixmap_and_mask_for_colormap()</code></a>.</p><p>If the pixbuf does not have an alpha channel, then *<em class="parameter"><code>mask_return</code></em> will be setto <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</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>pixbuf</code></em>&#160;:</span></p></td><td> A pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>pixmap_return</code></em>&#160;:</span></p></td><td> Location to store a pointer to the created pixmap,  or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the pixmap is not needed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>mask_return</code></em>&#160;:</span></p></td><td> Location to store a pointer to the created mask,  or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mask is not needed.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>alpha_threshold</code></em>&#160;:</span></p></td><td> Threshold value for opacity values.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3141155"></a><h3><a name="gdk-pixbuf-render-pixmap-and-mask-for-colormap"></a>gdk_pixbuf_render_pixmap_and_mask_for_colormap ()</h3><a class="indexterm" name="id3141169"></a><pre class="programlisting">void                gdk_pixbuf_render_pixmap_and_mask_for_colormap                                                        (<ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> *pixbuf,                                                         <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap">GdkColormap</a> *colormap,                                                         <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> **pixmap_return,                                                         <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkBitmap">GdkBitmap</a> **mask_return,                                                         int alpha_threshold);</pre><p>Creates a pixmap and a mask bitmap which are returned in the <em class="parameter"><code>pixmap_return</code></em>and <em class="parameter"><code>mask_return</code></em> arguments, respectively, and renders a pixbuf and itscorresponding tresholded alpha mask to them.  This is merely a conveniencefunction; applications that need to render pixbufs with dither offsets or togiven drawables should use <a class="link" href="gdk-Drawing-Primitives.html#gdk-draw-pixbuf"><code class="function">gdk_draw_pixbuf()</code></a>, and <a class="link" href="gdk-Pixbufs.html#gdk-pixbuf-render-threshold-alpha"><code class="function">gdk_pixbuf_render_threshold_alpha()</code></a>.</p><p>The pixmap that is created uses the <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a> specified by <em class="parameter"><code>colormap</code></em>.This colormap must match the colormap of the window where the pixmapwill eventually be used or an error will result.</p><p>If the pixbuf does not have an alpha channel, then *<em class="parameter"><code>mask_return</code></em> will be setto <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</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>pixbuf</code></em>&#160;:</span></p></td><td> A pixbuf.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>colormap</code></em>&#160;:</span></p></td><td> A <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap"><span class="type">GdkColormap</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>pixmap_return</code></em>&#160;:</span></p></td><td> Location to store a pointer to the created pixmap,  or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the pixmap is not needed.</td></tr><tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -