]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/drawing.sgml
0443146ad87437cb0970a446cd70a849bd9104ac
[~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_glyphs ##### -->
289 <para>
290
291 </para>
292
293 @drawable: 
294 @gc: 
295 @font: 
296 @x: 
297 @y: 
298 @glyphs: 
299
300
301 <!-- ##### FUNCTION gdk_draw_layout_line ##### -->
302 <para>
303
304 </para>
305
306 @drawable: 
307 @gc: 
308 @x: 
309 @y: 
310 @line: 
311
312
313 <!-- ##### FUNCTION gdk_draw_layout_line_with_colors ##### -->
314 <para>
315
316 </para>
317
318 @drawable: 
319 @gc: 
320 @x: 
321 @y: 
322 @line: 
323 @foreground: 
324 @background: 
325
326
327 <!-- ##### FUNCTION gdk_draw_layout ##### -->
328 <para>
329
330 </para>
331
332 @drawable: 
333 @gc: 
334 @x: 
335 @y: 
336 @layout: 
337
338
339 <!-- ##### FUNCTION gdk_draw_layout_with_colors ##### -->
340 <para>
341
342 </para>
343
344 @drawable: 
345 @gc: 
346 @x: 
347 @y: 
348 @layout: 
349 @foreground: 
350 @background: 
351
352
353 <!-- ##### FUNCTION gdk_draw_string ##### -->
354 <para>
355 </para>
356
357 @drawable: 
358 @font: 
359 @gc: 
360 @x: 
361 @y: 
362 @string: 
363
364
365 <!-- ##### FUNCTION gdk_draw_text ##### -->
366 <para>
367 </para>
368
369 @drawable: 
370 @font: 
371 @gc: 
372 @x: 
373 @y: 
374 @text: 
375 @text_length: 
376
377
378 <!-- ##### FUNCTION gdk_draw_text_wc ##### -->
379 <para>
380 </para>
381
382 @drawable: 
383 @font: 
384 @gc: 
385 @x: 
386 @y: 
387 @text: 
388 @text_length: 
389
390
391 <!-- ##### MACRO gdk_draw_pixmap ##### -->
392 <para>
393 Draws a pixmap, or a part of a pixmap, onto another drawable.
394 </para>
395
396 @Deprecated: Use gdk_draw_drawable() instead.
397
398
399 <!-- ##### FUNCTION gdk_draw_drawable ##### -->
400 <para>
401
402 </para>
403
404 @drawable: 
405 @gc: 
406 @src: 
407 @xsrc: 
408 @ysrc: 
409 @xdest: 
410 @ydest: 
411 @width: 
412 @height: 
413
414
415 <!-- ##### FUNCTION gdk_draw_image ##### -->
416 <para>
417 </para>
418
419 @drawable: 
420 @gc: 
421 @image: 
422 @xsrc: 
423 @ysrc: 
424 @xdest: 
425 @ydest: 
426 @width: 
427 @height: 
428
429
430 <!-- ##### FUNCTION gdk_drawable_get_image ##### -->
431 <para>
432
433 </para>
434
435 @drawable: 
436 @x: 
437 @y: 
438 @width: 
439 @height: 
440 @Returns: 
441
442
443 <!-- ##### FUNCTION gdk_drawable_copy_to_image ##### -->
444 <para>
445
446 </para>
447
448 @drawable: 
449 @image: 
450 @src_x: 
451 @src_y: 
452 @dest_x: 
453 @dest_y: 
454 @width: 
455 @height: 
456 @Returns: 
457
458