]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/drawing.sgml
2.7.0
[~andy/gtk] / docs / reference / gdk / tmpl / drawing.sgml
1 <!-- ##### SECTION Title ##### -->
2 Drawing Primitives
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Functions for drawing points, lines, arcs, and text
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 These functions provide support for drawing points, lines, arcs and text
10 onto what are called 'drawables'. Drawables, as the name suggests, are things
11 which support drawing onto them, and are either #GdkWindow or #GdkPixmap
12 objects.
13 </para>
14 <para>
15 Many of the drawing operations take a #GdkGC argument, which represents a
16 graphics context. This #GdkGC contains a number of drawing attributes such
17 as foreground color, background color and line width, and is used to reduce
18 the number of arguments needed for each drawing operation. See the
19 <link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
20 more information.
21 </para>
22 <para id="pango-data-structures">
23 Some of the drawing operations take Pango data structures like #PangoContext,
24 #PangoLayout or #PangoLayoutLine as arguments. If you're using GTK+, the ususal 
25 way to obtain these structures is via gtk_widget_create_pango_context() or
26 gtk_widget_create_pango_layout().
27 </para>
28
29 <!-- ##### SECTION See_Also ##### -->
30 <para>
31
32 </para>
33
34 <!-- ##### SECTION Stability_Level ##### -->
35
36
37 <!-- ##### STRUCT GdkDrawable ##### -->
38 <para>
39 An opaque structure representing an object that can be
40 drawn onto. This can be a #GdkPixmap, a #GdkBitmap,
41 or a #GdkWindow.
42 </para>
43
44
45 <!-- ##### FUNCTION gdk_drawable_ref ##### -->
46 <para>
47
48 </para>
49
50 @drawable: 
51 @Returns: 
52
53
54 <!-- ##### FUNCTION gdk_drawable_unref ##### -->
55 <para>
56
57 </para>
58
59 @drawable: 
60
61
62 <!-- ##### FUNCTION gdk_drawable_set_data ##### -->
63 <para>
64
65 </para>
66
67 @drawable: 
68 @key: 
69 @data: 
70 @destroy_func: 
71
72
73 <!-- ##### FUNCTION gdk_drawable_get_data ##### -->
74 <para>
75
76 </para>
77
78 @drawable: 
79 @key: 
80 @Returns: 
81
82
83 <!-- ##### FUNCTION gdk_drawable_get_display ##### -->
84 <para>
85
86 </para>
87
88 @drawable: 
89 @Returns: 
90
91
92 <!-- ##### FUNCTION gdk_drawable_get_screen ##### -->
93 <para>
94
95 </para>
96
97 @drawable: 
98 @Returns: 
99
100
101 <!-- ##### FUNCTION gdk_drawable_get_visual ##### -->
102 <para>
103
104 </para>
105
106 @drawable: 
107 @Returns: 
108
109
110 <!-- ##### FUNCTION gdk_drawable_set_colormap ##### -->
111 <para>
112
113 </para>
114
115 @drawable: 
116 @colormap: 
117
118
119 <!-- ##### FUNCTION gdk_drawable_get_colormap ##### -->
120 <para>
121
122 </para>
123
124 @drawable: 
125 @Returns: 
126
127
128 <!-- ##### FUNCTION gdk_drawable_get_depth ##### -->
129 <para>
130
131 </para>
132
133 @drawable: 
134 @Returns: 
135
136
137 <!-- ##### FUNCTION gdk_drawable_get_size ##### -->
138 <para>
139
140 </para>
141
142 @drawable: 
143 @width: 
144 @height: 
145
146
147 <!-- ##### FUNCTION gdk_drawable_get_clip_region ##### -->
148 <para>
149
150 </para>
151
152 @drawable: 
153 @Returns: 
154
155
156 <!-- ##### FUNCTION gdk_drawable_get_visible_region ##### -->
157 <para>
158
159 </para>
160
161 @drawable: 
162 @Returns: 
163
164
165 <!-- ##### FUNCTION gdk_draw_point ##### -->
166 <para>
167 </para>
168
169 @drawable: 
170 @gc: 
171 @x: 
172 @y: 
173
174
175 <!-- ##### FUNCTION gdk_draw_points ##### -->
176 <para>
177 </para>
178
179 @drawable: 
180 @gc: 
181 @points: 
182 @npoints: 
183
184
185 <!-- ##### FUNCTION gdk_draw_line ##### -->
186 <para>
187 </para>
188
189 @drawable: 
190 @gc: 
191 @x1_: 
192 @y1_: 
193 @x2_: 
194 @y2_: 
195
196
197 <!-- ##### FUNCTION gdk_draw_lines ##### -->
198 <para>
199 </para>
200
201 @drawable: 
202 @gc: 
203 @points: 
204 lines.
205 @npoints: 
206
207
208 <!-- ##### FUNCTION gdk_draw_pixbuf ##### -->
209 <para>
210
211 </para>
212
213 @drawable: 
214 @gc: 
215 @pixbuf: 
216 @src_x: 
217 @src_y: 
218 @dest_x: 
219 @dest_y: 
220 @width: 
221 @height: 
222 @dither: 
223 @x_dither: 
224 @y_dither: 
225
226
227 <!-- ##### FUNCTION gdk_draw_segments ##### -->
228 <para>
229 </para>
230
231 @drawable: 
232 @gc: 
233 @segs: 
234 @nsegs: 
235
236
237 <!-- ##### STRUCT GdkSegment ##### -->
238 <para>
239 Specifies the start and end point of a line for use by the gdk_draw_segments()
240 function.
241 </para>
242
243 @x1: the x coordinate of the start point.
244 @y1: the y coordinate of the start point.
245 @x2: the x coordinate of the end point.
246 @y2: the y coordinate of the end point.
247
248 <!-- ##### FUNCTION gdk_draw_rectangle ##### -->
249 <para>
250 </para>
251 <note>
252 <para>
253 </para>
254 </note>
255
256 @drawable: 
257 @gc: 
258 @filled: 
259 @x: 
260 @y: 
261 @width: 
262 @height: 
263
264
265 <!-- ##### FUNCTION gdk_draw_arc ##### -->
266 <para>
267 </para>
268
269 @drawable: 
270 @gc: 
271 @filled: 
272 @x: 
273 @y: 
274 @width: 
275 @height: 
276 @angle1: 
277 @angle2: 
278
279
280 <!-- ##### FUNCTION gdk_draw_polygon ##### -->
281 <para>
282 </para>
283
284 @drawable: 
285 @gc: 
286 @filled: 
287 @points: 
288 @npoints: 
289
290
291 <!-- ##### FUNCTION gdk_draw_trapezoids ##### -->
292 <para>
293
294 </para>
295
296 @drawable: 
297 @gc: 
298 @trapezoids: 
299 @n_trapezoids: 
300
301
302 <!-- ##### STRUCT GdkTrapezoid ##### -->
303 <para>
304 Specifies a trapezpoid for use by the gdk_draw_trapezoids().
305 The trapezoids used here have parallel, horizontal top and 
306 bottom edges. 
307 </para>
308
309 @y1: the y coordinate of the start point.
310 @x11: the x coordinate of the top left corner
311 @x21: the x coordinate of the top right corner
312 @y2: the y coordinate of the end point.
313 @x12: the x coordinate of the bottom left corner
314 @x22: the x coordinate of the bottom right corner
315
316 <!-- ##### FUNCTION gdk_draw_glyphs ##### -->
317 <para>
318
319 </para>
320
321 @drawable: 
322 @gc: 
323 @font: 
324 @x: 
325 @y: 
326 @glyphs: 
327
328
329 <!-- ##### FUNCTION gdk_draw_glyphs_transformed ##### -->
330 <para>
331
332 </para>
333
334 @drawable: 
335 @gc: 
336 @matrix: 
337 @font: 
338 @x: 
339 @y: 
340 @glyphs: 
341
342
343 <!-- ##### FUNCTION gdk_draw_layout_line ##### -->
344 <para>
345
346 </para>
347
348 @drawable: 
349 @gc: 
350 @x: 
351 @y: 
352 @line: 
353
354
355 <!-- ##### FUNCTION gdk_draw_layout_line_with_colors ##### -->
356 <para>
357
358 </para>
359
360 @drawable: 
361 @gc: 
362 @x: 
363 @y: 
364 @line: 
365 @foreground: 
366 @background: 
367
368
369 <!-- ##### FUNCTION gdk_draw_layout ##### -->
370 <para>
371
372 </para>
373
374 @drawable: 
375 @gc: 
376 @x: 
377 @y: 
378 @layout: 
379
380
381 <!-- ##### FUNCTION gdk_draw_layout_with_colors ##### -->
382 <para>
383
384 </para>
385
386 @drawable: 
387 @gc: 
388 @x: 
389 @y: 
390 @layout: 
391 @foreground: 
392 @background: 
393
394
395 <!-- ##### FUNCTION gdk_draw_string ##### -->
396 <para>
397 </para>
398
399 @drawable: 
400 @font: 
401 @gc: 
402 @x: 
403 @y: 
404 @string: 
405
406
407 <!-- ##### FUNCTION gdk_draw_text ##### -->
408 <para>
409 </para>
410
411 @drawable: 
412 @font: 
413 @gc: 
414 @x: 
415 @y: 
416 @text: 
417 @text_length: 
418
419
420 <!-- ##### FUNCTION gdk_draw_text_wc ##### -->
421 <para>
422 </para>
423
424 @drawable: 
425 @font: 
426 @gc: 
427 @x: 
428 @y: 
429 @text: 
430 @text_length: 
431
432
433 <!-- ##### MACRO gdk_draw_pixmap ##### -->
434 <para>
435 Draws a pixmap, or a part of a pixmap, onto another drawable.
436 </para>
437
438 @Deprecated: Use gdk_draw_drawable() instead.
439
440
441 <!-- ##### FUNCTION gdk_draw_drawable ##### -->
442 <para>
443
444 </para>
445
446 @drawable: 
447 @gc: 
448 @src: 
449 @xsrc: 
450 @ysrc: 
451 @xdest: 
452 @ydest: 
453 @width: 
454 @height: 
455
456
457 <!-- ##### FUNCTION gdk_draw_image ##### -->
458 <para>
459 </para>
460
461 @drawable: 
462 @gc: 
463 @image: 
464 @xsrc: 
465 @ysrc: 
466 @xdest: 
467 @ydest: 
468 @width: 
469 @height: 
470
471
472 <!-- ##### FUNCTION gdk_drawable_get_image ##### -->
473 <para>
474
475 </para>
476
477 @drawable: 
478 @x: 
479 @y: 
480 @width: 
481 @height: 
482 @Returns: 
483
484
485 <!-- ##### FUNCTION gdk_drawable_copy_to_image ##### -->
486 <para>
487
488 </para>
489
490 @drawable: 
491 @image: 
492 @src_x: 
493 @src_y: 
494 @dest_x: 
495 @dest_y: 
496 @width: 
497 @height: 
498 @Returns: 
499
500