📄 gdk-drawing-primitives.html
字号:
<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> y);</pre><p>Draws a point, using the foreground color and other attributes of the <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></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>drawable</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> (a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or a <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>).</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td><td> a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td><td> the x coordinate of the point.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td><td> the y coordinate of the point.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3104481"></a><h3><a name="gdk-draw-points"></a>gdk_draw_points ()</h3><a class="indexterm" name="id3104494"></a><pre class="programlisting">void gdk_draw_points (<a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable, <a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkPoint">GdkPoint</a> *points, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> npoints);</pre><p>Draws a number of points, using the foreground color and other attributes of the <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></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>drawable</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> (a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or a <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>).</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td><td> a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>points</code></em> :</span></p></td><td> an array of <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkPoint"><span class="type">GdkPoint</span></a> structures.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>npoints</code></em> :</span></p></td><td> the number of points to be drawn.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3104657"></a><h3><a name="gdk-draw-line"></a>gdk_draw_line ()</h3><a class="indexterm" name="id3104670"></a><pre class="programlisting">void gdk_draw_line (<a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable, <a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> x1_, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> y1_, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> x2_, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> y2_);</pre><p>Draws a line, using the foreground color and other attributes of the <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></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>drawable</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> (a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or a <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>). </td></tr><tr><td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td><td> a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x1_</code></em> :</span></p></td><td> the x coordinate of the start point.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y1_</code></em> :</span></p></td><td> the y coordinate of the start point.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>x2_</code></em> :</span></p></td><td> the x coordinate of the end point.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>y2_</code></em> :</span></p></td><td> the y coordinate of the end point.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3104870"></a><h3><a name="gdk-draw-lines"></a>gdk_draw_lines ()</h3><a class="indexterm" name="id3104883"></a><pre class="programlisting">void gdk_draw_lines (<a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable, <a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkPoint">GdkPoint</a> *points, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> npoints);</pre><p>Draws a series of lines connecting the given points.The way in which joins between lines are draw is determined by the<a class="link" href="gdk-Graphics-Contexts.html#GdkCapStyle"><span class="type">GdkCapStyle</span></a> value in the <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>. This can be set with<a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-line-attributes"><code class="function">gdk_gc_set_line_attributes()</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>drawable</code></em> :</span></p></td><td> a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a> (a <a class="link" href="gdk-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or a <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>).</td></tr><tr><td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td><td> a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>points</code></em> :</span></p></td><td> an array of <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkPoint"><span class="type">GdkPoint</span></a> structures specifying the endpoints of the</td></tr><tr><td><p><span class="term"><em class="parameter"><code>npoints</code></em> :</span></p></td><td> the size of the <em class="parameter"><code>points</code></em> array.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3105073"></a><h3><a name="gdk-draw-pixbuf"></a>gdk_draw_pixbuf ()</h3><a class="indexterm" name="id3105088"></a><pre class="programlisting">void gdk_draw_pixbuf (<a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable, <a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> *pixbuf, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> src_x, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> src_y, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> dest_x, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> dest_y, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> width, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> height, <a class="link" href="gdk-GdkRGB.html#GdkRgbDither">GdkRgbDither</a> dither, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> x_dither, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> y_dither);</pre><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 <a class="link" href="gdk-Drawing-Primitives.html#gdk-drawable-set-colormap"><code class="function">gdk_drawable_set_colormap()</code></a>.</p><p>On older X servers, rendering pixbufs with an alpha channel involves round trips to the X server, and may be somewhat slow.</p><p>The clip mask of <em class="parameter"><code>gc</code></em> is ignored, but clip rectangles and clip regions workfine.</p><p>If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuffunction is accelerated using mediaLib, which provides hardwareacceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLibsupport ca
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -