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

📄 gdk-graphics-contexts.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<tr><td><p><span class="term"><a name="GDK-OR-INVERT:CAPS"></a><code class="literal">GDK_OR_INVERT</code></span></p></td><td><code class="literal">dst = (NOT src) OR dst</code></td></tr><tr><td><p><span class="term"><a name="GDK-NAND:CAPS"></a><code class="literal">GDK_NAND</code></span></p></td><td><code class="literal">dst = (NOT src) OR (NOT dst)</code></td></tr><tr><td><p><span class="term"><a name="GDK-NOR:CAPS"></a><code class="literal">GDK_NOR</code></span></p></td><td><code class="literal">dst = (NOT src) AND (NOT dst)</code></td></tr><tr><td><p><span class="term"><a name="GDK-SET:CAPS"></a><code class="literal">GDK_SET</code></span></p></td><td><code class="literal">dst = 1</code></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090130"></a><h3><a name="gdk-gc-new"></a>gdk_gc_new ()</h3><a class="indexterm" name="id3090142"></a><pre class="programlisting"><a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*              gdk_gc_new                          (<a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable);</pre><p>Create a new graphics context with default 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>drawable</code></em>&#160;:</span></p></td><td> a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>. The created GC must always be used  with drawables of the same depth as this one.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the new graphics context.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090212"></a><h3><a name="gdk-gc-new-with-values"></a>gdk_gc_new_with_values ()</h3><a class="indexterm" name="id3090226"></a><pre class="programlisting"><a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*              gdk_gc_new_with_values              (<a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable">GdkDrawable</a> *drawable,                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values,                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a> values_mask);</pre><p>Create a new GC with the given initial 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>drawable</code></em>&#160;:</span></p></td><td> a <a class="link" href="gdk-Drawing-Primitives.html#GdkDrawable"><span class="type">GdkDrawable</span></a>. The created GC must always be used  with drawables of the same depth as this one.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>values</code></em>&#160;:</span></p></td><td> a structure containing initial values for the GC.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>values_mask</code></em>&#160;:</span></p></td><td> a bit mask indicating which fields in <em class="parameter"><code>values</code></em>  are set.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the new graphics context.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090347"></a><h3><a name="gdk-gc-get-screen"></a>gdk_gc_get_screen ()</h3><a class="indexterm" name="id3090363"></a><pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen">GdkScreen</a>*          gdk_gc_get_screen                   (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre><p>Gets the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for which <em class="parameter"><code>gc</code></em> was created</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>&#160;:</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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the <a class="link" href="GdkScreen.html" title="GdkScreen"><span class="type">GdkScreen</span></a> for <em class="parameter"><code>gc</code></em>.</td></tr></tbody></table></div><p class="since">Since  2.2</p></div><hr><div class="refsect2" lang="en"><a name="id3090464"></a><h3><a name="gdk-gc-ref"></a>gdk_gc_ref ()</h3><a class="indexterm" name="id3090479"></a><pre class="programlisting"><a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a>*              gdk_gc_ref                          (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_gc_ref</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated function; use <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> instead.</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>&#160;:</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"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the gc.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090571"></a><h3><a name="gdk-gc-unref"></a>gdk_gc_unref ()</h3><a class="indexterm" name="id3090586"></a><pre class="programlisting">void                gdk_gc_unref                        (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_gc_unref</code> is deprecated and should not be used in newly-written code. Use <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> instead.</p></div><p>Decrement the reference count of <em class="parameter"><code>gc</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>gc</code></em>&#160;:</span></p></td><td> a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090672"></a><h3><a name="gdk-gc-destroy"></a>gdk_gc_destroy</h3><a class="indexterm" name="id3090688"></a><pre class="programlisting">#define gdk_gc_destroy                 gdk_gc_unref</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gdk_gc_destroy</code> is deprecated and should not be used in newly-written code. Use <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> instead</p></div><p>This function is obsolete and should not be used.</p></div><hr><div class="refsect2" lang="en"><a name="id3090728"></a><h3><a name="gdk-gc-set-values"></a>gdk_gc_set_values ()</h3><a class="indexterm" name="id3090741"></a><pre class="programlisting">void                gdk_gc_set_values                   (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values,                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValuesMask">GdkGCValuesMask</a> values_mask);</pre><p>Sets attributes of a graphics context in bulk. For each flag set in<em class="parameter"><code>values_mask</code></em>, the corresponding field will be read from <em class="parameter"><code>values</code></em> andset as the new value for <em class="parameter"><code>gc</code></em>. If you're only setting a few valueson <em class="parameter"><code>gc</code></em>, calling individual "setter" functions is likely moreconvenient.</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>&#160;:</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>values</code></em>&#160;:</span></p></td><td> struct containing the new values</td></tr><tr><td><p><span class="term"><em class="parameter"><code>values_mask</code></em>&#160;:</span></p></td><td> mask indicating which struct fields are to be used</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090870"></a><h3><a name="gdk-gc-get-values"></a>gdk_gc_get_values ()</h3><a class="indexterm" name="id3090883"></a><pre class="programlisting">void                gdk_gc_get_values                   (<a class="link" href="gdk-Graphics-Contexts.html#GdkGC">GdkGC</a> *gc,                                                         <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues">GdkGCValues</a> *values);</pre><p>Retrieves the current values from a graphics context. Note that only the pixel values of the <em class="parameter"><code>values-&gt;foreground</code></em> and <em class="parameter"><code>values-&gt;background</code></em>are filled, use <a class="link" href="gdk-Colormaps-and-Colors.html#gdk-colormap-query-color"><code class="function">gdk_colormap_query_color()</code></a> to obtain the rgb valuesif you need them.</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>&#160;:</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>values</code></em>&#160;:</span></p></td><td> the <a class="link" href="gdk-Graphics-Contexts.html#GdkGCValues"><span class="type">GdkGCValues</span></a> structure in which to store the results.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3090997"></a><h3><a name="gdk-gc-set-foreground"></a>gdk_gc_set_foreground ()</h3><a class="indexterm" name="id3091010"></a><pre class="programlisting">void                gdk_gc_set_foreground               (<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 foreground color for a graphics context.Note that this function uses <em class="parameter"><code>color-&gt;pixel</code></em>, use <a class="link" href="gdk-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color"><code class="function">gdk_gc_set_rgb_fg_color()</code></a> to specify the foreground 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>&#160;:</span></p></td><td> a <a class="link" href="gdk-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a>.</td></tr><tr>

⌨️ 快捷键说明

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