?? gdk-graphics-contexts.html
字號(hào):
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td><td> the new foreground color.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091108"></a><h3><a name="gdk-gc-set-background"></a>gdk_gc_set_background ()</h3><a class="indexterm" name="id3091121"></a><pre class="programlisting">void gdk_gc_set_background (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre><p>Sets the background color for a graphics context.Note that this function uses <em class="parameter"><code>color->pixel</code></em>, use <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color"><code class="function">gdk_gc_set_rgb_bg_color()</code></a> to specify the background color as red, green, blue components.</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>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>color</code></em> :</span></p></td><td> the new background color.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091220"></a><h3><a name="gdk-gc-set-rgb-fg-color"></a>gdk_gc_set_rgb_fg_color ()</h3><a class="indexterm" name="id3091233"></a><pre class="programlisting">void gdk_gc_set_rgb_fg_color (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre><p>Set the foreground color of a GC using an unallocated color. Thepixel value for the color will be determined using GdkRGB. If thecolormap for the GC has not previously been initialized for GdkRGB,then for pseudo-color colormaps (colormaps with a small modifiablenumber of colors), a colorcube will be allocated in the colormap.</p><p>Calling this function for a GC without a colormap is an error.</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>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>color</code></em> :</span></p></td><td> an unallocated <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091329"></a><h3><a name="gdk-gc-set-rgb-bg-color"></a>gdk_gc_set_rgb_bg_color ()</h3><a class="indexterm" name="id3091342"></a><pre class="programlisting">void gdk_gc_set_rgb_bg_color (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, const <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a> *color);</pre><p>Set the background color of a GC using an unallocated color. Thepixel value for the color will be determined using GdkRGB. If thecolormap for the GC has not previously been initialized for GdkRGB,then for pseudo-color colormaps (colormaps with a small modifiablenumber of colors), a colorcube will be allocated in the colormap.</p><p>Calling this function for a GC without a colormap is an error.</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>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>color</code></em> :</span></p></td><td> an unallocated <a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091439"></a><h3><a name="gdk-gc-set-font"></a>gdk_gc_set_font ()</h3><a class="indexterm" name="id3091454"></a><pre class="programlisting">void gdk_gc_set_font (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Fonts.html#GdkFont">GdkFont</a> *font);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_gc_set_font</code> is deprecated and should not be used in newly-written code.</p></div><p>Sets the font for a graphics context. (Note thatall text-drawing functions in GDK take a <em class="parameter"><code>font</code></em>argument; the value set here is used when thatargument is <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>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>font</code></em> :</span></p></td><td> the new font. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091564"></a><h3><a name="gdk-gc-set-function"></a>gdk_gc_set_function ()</h3><a class="indexterm" name="id3091576"></a><pre class="programlisting">void gdk_gc_set_function (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Graphics-Contexts.html#GdkFunction">GdkFunction</a> function);</pre><p>Determines how the current pixel values and thepixel values being drawn are combined to producethe final pixel values.</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>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>function</code></em> :</span></p></td><td> the <a class="link" href="gdk-Graphics-Contexts.html#GdkFunction"><span class="type">GdkFunction</span></a> to use</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091665"></a><h3><a name="gdk-gc-set-fill"></a>gdk_gc_set_fill ()</h3><a class="indexterm" name="id3091677"></a><pre class="programlisting">void gdk_gc_set_fill (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Graphics-Contexts.html#GdkFill">GdkFill</a> fill);</pre><p>Set the fill mode for a graphics context.</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>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>fill</code></em> :</span></p></td><td> the new fill mode.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091756"></a><h3><a name="GdkFill"></a>enum GdkFill</h3><a class="indexterm" name="id3091769"></a><pre class="programlisting">typedef enum{ GDK_SOLID, GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED} GdkFill;</pre><p>Determines how primitives are drawn.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GDK-SOLID:CAPS"></a><code class="literal">GDK_SOLID</code></span></p></td><td>draw with the foreground color.</td></tr><tr><td><p><span class="term"><a name="GDK-TILED:CAPS"></a><code class="literal">GDK_TILED</code></span></p></td><td>draw with a tiled pixmap.</td></tr><tr><td><p><span class="term"><a name="GDK-STIPPLED:CAPS"></a><code class="literal">GDK_STIPPLED</code></span></p></td><td>draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the foreground color; pixels corresponding to bits that are not set will be left untouched.</td></tr><tr><td><p><span class="term"><a name="GDK-OPAQUE-STIPPLED:CAPS"></a><code class="literal">GDK_OPAQUE_STIPPLED</code></span></p></td><td>draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the foreground color; pixels corresponding to bits that are not set will be drawn with the background color.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091885"></a><h3><a name="gdk-gc-set-tile"></a>gdk_gc_set_tile ()</h3><a class="indexterm" name="id3091897"></a><pre class="programlisting">void gdk_gc_set_tile (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *tile);</pre><p>Set a tile pixmap for a graphics context.This will only be used if the fill modeis <a class="link" href="gdk-Graphics-Contexts.html#GDK-TILED:CAPS"><code class="literal">GDK_TILED</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>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>tile</code></em> :</span></p></td><td> the new tile pixmap.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3091989"></a><h3><a name="gdk-gc-set-stipple"></a>gdk_gc_set_stipple ()</h3><a class="indexterm" name="id3092002"></a><pre class="programlisting">void gdk_gc_set_stipple (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc, <a class="link" href="gdk-Bitmaps-and-Pixmaps.html#GdkPixmap">GdkPixmap</a> *stipple);</pre><p>Set the stipple bitmap for a graphics context. Thestipple will only be used if the fill mode is<a class="link" href="gdk-Graphics-Contexts.html#GDK-STIPPLED:CAPS"><code class="literal">GDK_STIPPLED</code></a> or <a class="link" href="gdk-Graphics-Contexts.html#GDK-OPAQUE-STIPPLED:CAPS"><code class="literal">GDK_OPAQUE_STIPPLED</code></a>.</p><p>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =