?? gdk-points-rectangles-and-regions.html
字號:
<a name="gdk-region-union-with-rect"></a>gdk_region_union_with_rect ()</h3><a class="indexterm" name="id3082082"></a><pre class="programlisting">void gdk_region_union_with_rect (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *region, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle">GdkRectangle</a> *rect);</pre><p>Sets the area of <em class="parameter"><code>region</code></em> to the union of the areas of <em class="parameter"><code>region</code></em> and<em class="parameter"><code>rect</code></em>. The resulting area is the set of pixels contained ineither <em class="parameter"><code>region</code></em> or <em class="parameter"><code>rect</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>region</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>rect</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRectangle"><span class="type">GdkRectangle</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082200"></a><h3><a name="gdk-region-intersect"></a>gdk_region_intersect ()</h3><a class="indexterm" name="id3082213"></a><pre class="programlisting">void gdk_region_intersect (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source1, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source2);</pre><p>Sets the area of <em class="parameter"><code>source1</code></em> to the intersection of the areas of <em class="parameter"><code>source1</code></em>and <em class="parameter"><code>source2</code></em>. The resulting area is the set of pixels contained inboth <em class="parameter"><code>source1</code></em> and <em class="parameter"><code>source2</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>source1</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>source2</code></em> :</span></p></td><td> another <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082332"></a><h3><a name="gdk-region-union"></a>gdk_region_union ()</h3><a class="indexterm" name="id3082344"></a><pre class="programlisting">void gdk_region_union (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source1, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source2);</pre><p>Sets the area of <em class="parameter"><code>source1</code></em> to the union of the areas of <em class="parameter"><code>source1</code></em> and<em class="parameter"><code>source2</code></em>. The resulting area is the set of pixels contained ineither <em class="parameter"><code>source1</code></em> or <em class="parameter"><code>source2</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>source1</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>source2</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a> </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082462"></a><h3><a name="gdk-region-subtract"></a>gdk_region_subtract ()</h3><a class="indexterm" name="id3082475"></a><pre class="programlisting">void gdk_region_subtract (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source1, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source2);</pre><p>Subtracts the area of <em class="parameter"><code>source2</code></em> from the area <em class="parameter"><code>source1</code></em>. The resultingarea is the set of pixels contained in <em class="parameter"><code>source1</code></em> but not in <em class="parameter"><code>source2</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>source1</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>source2</code></em> :</span></p></td><td> another <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082587"></a><h3><a name="gdk-region-xor"></a>gdk_region_xor ()</h3><a class="indexterm" name="id3082599"></a><pre class="programlisting">void gdk_region_xor (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source1, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *source2);</pre><p>Sets the area of <em class="parameter"><code>source1</code></em> to the exclusive-OR of the areas of <em class="parameter"><code>source1</code></em>and <em class="parameter"><code>source2</code></em>. The resulting area is the set of pixels contained in oneor the other of the two sources but not in both.</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>source1</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>source2</code></em> :</span></p></td><td> another <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082706"></a><h3><a name="GdkSpan"></a>GdkSpan</h3><a class="indexterm" name="id3082718"></a><pre class="programlisting">typedef struct { gint x; gint y; gint width;} GdkSpan;</pre><p>A GdkSpan represents a horizontal line of pixels startingat the pixel with coordinates <em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em> and ending before <em class="parameter"><code>x</code></em> + <em class="parameter"><code>width</code></em>, <em class="parameter"><code>y</code></em>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>x</code></em>;</span></p></td><td>x coordinate of the first pixel.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>y</code></em>;</span></p></td><td>y coordinate of the first pixel.</td></tr><tr><td><p><span class="term"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> <em class="structfield"><code>width</code></em>;</span></p></td><td>number of pixels in the span.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082830"></a><h3><a name="GdkSpanFunc"></a>GdkSpanFunc ()</h3><a class="indexterm" name="id3082842"></a><pre class="programlisting">void (*GdkSpanFunc) (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkSpan">GdkSpan</a> *span, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> data);</pre><p>This defines the type of the function passed to <a class="link" href="gdk-Points-Rectangles-and-Regions.html#gdk-region-spans-intersect-foreach"><code class="function">gdk_region_spans_intersect_foreach()</code></a>. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>span</code></em> :</span></p></td><td>a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkSpan"><span class="type">GdkSpan</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>the user data passed to <a class="link" href="gdk-Points-Rectangles-and-Regions.html#gdk-region-spans-intersect-foreach"><code class="function">gdk_region_spans_intersect_foreach()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3082942"></a><h3><a name="gdk-region-spans-intersect-foreach"></a>gdk_region_spans_intersect_foreach ()</h3><a class="indexterm" name="id3082955"></a><pre class="programlisting">void gdk_region_spans_intersect_foreach (<a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion">GdkRegion</a> *region, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkSpan">GdkSpan</a> *spans, int n_spans, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> sorted, <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkSpanFunc">GdkSpanFunc</a> function, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> data);</pre><p>Calls a function on each span in the intersection of <em class="parameter"><code>region</code></em> and <em class="parameter"><code>spans</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>region</code></em> :</span></p></td><td> a <a class="link" href="gdk-Points-Rectangles-and-Regions.html#GdkRegion"><span class="type">GdkRegion</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>spans</code></em> :</span></p></td><td> an array of <span class="type">GdkSpans</span></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_spans</code></em> :</span></p></td><td> the length of <em class="parameter"><code>spans</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>sorted</code></em> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>spans</code></em> is sorted wrt. the y coordinate</td></tr><tr><td><p><span class="term"><em class="parameter"><code>function</code></em> :</span></p></td><td> function to call on each span in the intersection</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td> data to pass to <em class="parameter"><code>function</code></em></td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3083170"></a><div class="refsect2" lang="en"><a name="id3083172"></a></div><hr><div class="refsect2" lang="en"><a name="id3083173"></a></div></div></div></body></html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -