]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/regions.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gdk / tmpl / regions.sgml
1 <!-- ##### SECTION Title ##### -->
2 Points, Rectangles and Regions
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Simple graphical data types
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GDK provides the #GdkPoint, #GdkRectangle, #GdkRegion and #GdkSpan data types
10 for representing pixels and sets of pixels on the screen.
11 </para>
12 <para>
13 #GdkPoint is a simple structure containing an x and y coordinate of a point.
14 </para>
15 <para>
16 #GdkRectangle is a structure holding the position and size of a rectangle.
17 The intersection of two rectangles can be computed with
18 gdk_rectangle_intersect(). To find the union of two rectangles use
19 gdk_rectangle_union().
20 </para>
21 <para>
22 #GdkRegion is an opaque data type holding a set of arbitrary pixels, and is
23 usually used for clipping graphical operations (see gdk_gc_set_clip_region()).
24 </para>
25 <para>
26 #GdkSpan is a structure holding a spanline. A spanline is a horizontal line that
27 is one pixel wide. It is mainly used when rasterizing other graphics primitives.
28 It can be intersected to regions by using gdk_region_spans_intersect_foreach().
29 </para>
30
31 <!-- ##### SECTION See_Also ##### -->
32 <para>
33
34 </para>
35
36 <!-- ##### SECTION Stability_Level ##### -->
37
38
39 <!-- ##### SECTION Image ##### -->
40
41
42 <!-- ##### STRUCT GdkPoint ##### -->
43 <para>
44 Defines the x and y coordinates of a point.
45 </para>
46
47 @x: the x coordinate of the point.
48 @y: the y coordinate of the point.
49
50 <!-- ##### STRUCT GdkRectangle ##### -->
51 <para>
52 Defines the position and size of a rectangle.
53 </para>
54
55 @x: the x coordinate of the left edge of the rectangle.
56 @y: the y coordinate of the top of the rectangle.
57 @width: the width of the rectangle.
58 @height: the height of the rectangle.
59
60 <!-- ##### FUNCTION gdk_rectangle_intersect ##### -->
61 <para>
62
63 </para>
64
65 @src1: 
66 @src2: 
67 @dest: 
68 @Returns: 
69
70
71 <!-- ##### FUNCTION gdk_rectangle_union ##### -->
72 <para>
73
74 </para>
75
76 @src1: 
77 @src2: 
78 @dest: 
79
80
81 <!-- ##### STRUCT GdkRegion ##### -->
82 <para>
83 A GdkRegion represents a set of pixels on the screen.
84 </para>
85
86
87 <!-- ##### FUNCTION gdk_region_new ##### -->
88 <para>
89
90 </para>
91
92 @void: 
93 @Returns: 
94
95
96 <!-- ##### FUNCTION gdk_region_polygon ##### -->
97 <para>
98
99 </para>
100
101 @points: 
102 @n_points: 
103 @fill_rule: 
104 @Returns: 
105
106
107 <!-- ##### ENUM GdkFillRule ##### -->
108 <para>
109 The method for determining which pixels are included in a region, when
110 creating a #GdkRegion from a polygon.
111 The fill rule is only relevant for polygons which overlap themselves.
112 </para>
113
114 @GDK_EVEN_ODD_RULE: areas which are overlapped an odd number of times are
115 included in the region, while areas overlapped an even number of times are not.
116 @GDK_WINDING_RULE: overlapping areas are always included.
117
118 <!-- ##### FUNCTION gdk_region_copy ##### -->
119 <para>
120
121 </para>
122
123 @region: 
124 @Returns: 
125
126
127 <!-- ##### FUNCTION gdk_region_rectangle ##### -->
128 <para>
129
130 </para>
131
132 @rectangle: 
133 @Returns: 
134
135
136 <!-- ##### FUNCTION gdk_region_destroy ##### -->
137 <para>
138
139 </para>
140
141 @region: 
142
143
144 <!-- ##### FUNCTION gdk_region_get_clipbox ##### -->
145 <para>
146
147 </para>
148
149 @region: 
150 @rectangle: 
151
152
153 <!-- ##### FUNCTION gdk_region_get_rectangles ##### -->
154 <para>
155
156 </para>
157
158 @region: 
159 @rectangles: 
160 @n_rectangles: 
161
162
163 <!-- ##### FUNCTION gdk_region_empty ##### -->
164 <para>
165
166 </para>
167
168 @region: 
169 @Returns: 
170
171
172 <!-- ##### FUNCTION gdk_region_equal ##### -->
173 <para>
174
175 </para>
176
177 @region1: 
178 @region2: 
179 @Returns: 
180
181
182 <!-- ##### FUNCTION gdk_region_rect_equal ##### -->
183 <para>
184
185 </para>
186
187 @region: 
188 @rectangle: 
189 @Returns: 
190
191
192 <!-- ##### FUNCTION gdk_region_point_in ##### -->
193 <para>
194
195 </para>
196
197 @region: 
198 @x: 
199 @y: 
200 @Returns: 
201
202
203 <!-- ##### FUNCTION gdk_region_rect_in ##### -->
204 <para>
205
206 </para>
207
208 @region: 
209 @rectangle: 
210 @Returns: 
211
212
213 <!-- ##### ENUM GdkOverlapType ##### -->
214 <para>
215 Specifies the possible values returned by gdk_region_rect_in().
216 </para>
217
218 @GDK_OVERLAP_RECTANGLE_IN: if the rectangle is inside the #GdkRegion.
219 @GDK_OVERLAP_RECTANGLE_OUT: if the rectangle is outside the #GdkRegion.
220 @GDK_OVERLAP_RECTANGLE_PART: if the rectangle is partly inside the #GdkRegion.
221
222 <!-- ##### FUNCTION gdk_region_offset ##### -->
223 <para>
224
225 </para>
226
227 @region: 
228 @dx: 
229 @dy: 
230
231
232 <!-- ##### FUNCTION gdk_region_shrink ##### -->
233 <para>
234
235 </para>
236
237 @region: 
238 @dx: 
239 @dy: 
240
241
242 <!-- ##### FUNCTION gdk_region_union_with_rect ##### -->
243 <para>
244
245 </para>
246
247 @region: 
248 @rect: 
249
250
251 <!-- ##### FUNCTION gdk_region_intersect ##### -->
252 <para>
253 </para>
254
255 @source1: 
256 @source2: 
257
258
259 <!-- ##### FUNCTION gdk_region_union ##### -->
260 <para>
261
262 </para>
263
264 @source1: 
265 @source2: 
266
267
268 <!-- ##### FUNCTION gdk_region_subtract ##### -->
269 <para>
270 </para>
271
272 @source1: 
273 @source2: 
274
275
276 <!-- ##### FUNCTION gdk_region_xor ##### -->
277 <para>
278 </para>
279
280 @source1: 
281 @source2: 
282
283
284 <!-- ##### STRUCT GdkSpan ##### -->
285 <para>
286 A GdkSpan represents a horizontal line of pixels starting
287 at the pixel with coordinates @x, @y and ending before @x + @width, @y.
288 </para>
289
290 @x: x coordinate of the first pixel.
291 @y: y coordinate of the first pixel.
292 @width: number of pixels in the span.
293
294 <!-- ##### USER_FUNCTION GdkSpanFunc ##### -->
295 <para>
296 This defines the type of the function passed to 
297 gdk_region_spans_intersect_foreach(). 
298 </para>
299
300 @span: a #GdkSpan.
301 @data: the user data passed to gdk_region_spans_intersect_foreach().
302
303
304 <!-- ##### FUNCTION gdk_region_spans_intersect_foreach ##### -->
305 <para>
306
307 </para>
308
309 @region: 
310 @spans: 
311 @n_spans: 
312 @sorted: 
313 @function: 
314 @data: 
315
316