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