1Gtk2::Gdk::Drawable(3)User Contributed Perl DocumentationGtk2::Gdk::Drawable(3)
2
3
4

NAME

6       Gtk2::Gdk::Drawable - wrapper for GdkDrawable
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::Gdk::Drawable
11

METHODS

13   unsigned = $drawable->XID
14   unsigned = $drawable->XWINDOW
15   region = $drawable->get_clip_region
16   colormap or undef = $drawable->get_colormap
17   $drawable->set_colormap ($colormap)
18       •   $colormap (Gtk2::Gdk::Colormap)
19
20   image = $drawable->copy_to_image ($image, $src_x, $src_y, $dest_x, $dest_y,
21       $width, $height)
22       •   $image (Gtk2::Gdk::Image or undef)
23
24       •   $src_x (integer)
25
26       •   $src_y (integer)
27
28       •   $dest_x (integer)
29
30       •   $dest_y (integer)
31
32       •   $width (integer)
33
34       •   $height (integer)
35
36       Since: gtk+ 2.4
37
38   integer = $drawable->get_depth
39   display = $drawable->get_display
40       Since: gtk+ 2.2
41
42   $drawable->draw_arc ($gc, $filled, $x, $y, $width, $height, $angle1,
43       $angle2)
44       •   $gc (Gtk2::Gdk::GC)
45
46       •   $filled (boolean)
47
48       •   $x (integer)
49
50       •   $y (integer)
51
52       •   $width (integer)
53
54       •   $height (integer)
55
56       •   $angle1 (integer)
57
58       •   $angle2 (integer)
59
60   $drawable->draw_drawable ($gc, $src, $xsrc, $ysrc, $xdest, $ydest, $width,
61       $height)
62       •   $gc (Gtk2::Gdk::GC)
63
64       •   $src (Gtk2::Gdk::Drawable)
65
66       •   $xsrc (integer)
67
68       •   $ysrc (integer)
69
70       •   $xdest (integer)
71
72       •   $ydest (integer)
73
74       •   $width (integer)
75
76       •   $height (integer)
77
78   $drawable->draw_gray_image ($gc, $x, $y, $width, $height, $dith, $buf,
79       $rowstride)
80       •   $gc (Gtk2::Gdk::GC)
81
82       •   $x (integer)
83
84       •   $y (integer)
85
86       •   $width (integer)
87
88       •   $height (integer)
89
90       •   $dith (Gtk2::Gdk::RgbDither)
91
92       •   $buf (scalar)
93
94       •   $rowstride (integer)
95
96   $drawable->draw_image ($gc, $image, $xsrc, $ysrc, $xdest, $ydest, $width,
97       $height)
98       •   $gc (Gtk2::Gdk::GC)
99
100       •   $image (Gtk2::Gdk::Image)
101
102       •   $xsrc (integer)
103
104       •   $ysrc (integer)
105
106       •   $xdest (integer)
107
108       •   $ydest (integer)
109
110       •   $width (integer)
111
112       •   $height (integer)
113
114   $drawable->draw_indexed_image ($gc, $x, $y, $width, $height, $dith, $buf,
115       $rowstride, $cmap)
116       •   $gc (Gtk2::Gdk::GC)
117
118       •   $x (integer)
119
120       •   $y (integer)
121
122       •   $width (integer)
123
124       •   $height (integer)
125
126       •   $dith (Gtk2::Gdk::RgbDither)
127
128       •   $buf (scalar)
129
130       •   $rowstride (integer)
131
132       •   $cmap (scalar)
133
134   $drawable->draw_layout ($gc, $x, $y, $layout)
135       •   $gc (Gtk2::Gdk::GC)
136
137       •   $x (integer)
138
139       •   $y (integer)
140
141       •   $layout (Pango::Layout)
142
143   $drawable->draw_layout_line ($gc, $x, $y, $line)
144       •   $gc (Gtk2::Gdk::GC)
145
146       •   $x (integer)
147
148       •   $y (integer)
149
150       •   $line (Pango::LayoutLine)
151
152   $drawable->draw_layout_line_with_colors ($gc, $x, $y, $line, $foreground,
153       $background)
154       •   $gc (Gtk2::Gdk::GC)
155
156       •   $x (integer)
157
158       •   $y (integer)
159
160       •   $line (Pango::LayoutLine)
161
162       •   $foreground (Gtk2::Gdk::Color or undef)
163
164       •   $background (Gtk2::Gdk::Color or undef)
165
166   $drawable->draw_layout_with_colors ($gc, $x, $y, $layout, $foreground,
167       $background)
168       •   $gc (Gtk2::Gdk::GC)
169
170       •   $x (integer)
171
172       •   $y (integer)
173
174       •   $layout (Pango::Layout)
175
176       •   $foreground (Gtk2::Gdk::Color or undef)
177
178       •   $background (Gtk2::Gdk::Color or undef)
179
180   $drawable->draw_line ($gc, $x1_, $y1_, $x2_, $y2_)
181       •   $gc (Gtk2::Gdk::GC)
182
183       •   $x1_ (integer)
184
185       •   $y1_ (integer)
186
187       •   $x2_ (integer)
188
189       •   $y2_ (integer)
190
191   $drawable->draw_lines ($gc, ...)
192       •   $gc (Gtk2::Gdk::GC)
193
194       •   ... (list) integer x,y coordinates (possibly none)
195
196       For example
197
198           $win->draw_lines ($gc, 0,0, 20,30, 40,20);
199
200   $drawable->draw_pixbuf ($gc, $pixbuf, $src_x, $src_y, $dest_x, $dest_y,
201       $width, $height, $dither, $x_dither, $y_dither)
202       •   $gc (Gtk2::Gdk::GC or undef)
203
204       •   $pixbuf (Gtk2::Gdk::Pixbuf)
205
206       •   $src_x (integer)
207
208       •   $src_y (integer)
209
210       •   $dest_x (integer)
211
212       •   $dest_y (integer)
213
214       •   $width (integer)
215
216       •   $height (integer)
217
218       •   $dither (Gtk2::Gdk::RgbDither)
219
220       •   $x_dither (integer)
221
222       •   $y_dither (integer)
223
224       Since: gtk+ 2.2
225
226   $drawable->draw_point ($gc, $x, $y)
227       •   $gc (Gtk2::Gdk::GC)
228
229       •   $x (integer)
230
231       •   $y (integer)
232
233   $drawable->draw_points ($gc, ...)
234       •   $gc (Gtk2::Gdk::GC)
235
236       •   ... (list) integer x,y coordinates (possibly none)
237
238       For example three points
239
240           $win->draw_points ($gc, 0,0, 10,10, 20,20);
241
242   $drawable->draw_polygon ($gc, $filled, $x1, $y1, ...)
243       •   $gc (Gtk2::Gdk::GC)
244
245       •   $filled (boolean)
246
247       •   $x1 (integer) the x coordinate of the first point
248
249       •   $y1 (integer) the y coordinate of the first point
250
251       •   ... (list) pairs of x and y coordinates
252
253   $drawable->draw_rectangle ($gc, $filled, $x, $y, $width, $height)
254       •   $gc (Gtk2::Gdk::GC)
255
256       •   $filled (boolean)
257
258       •   $x (integer)
259
260       •   $y (integer)
261
262       •   $width (integer)
263
264       •   $height (integer)
265
266   $drawable->draw_rgb_32_image ($gc, $x, $y, $width, $height, $dith, $buf,
267       $rowstride)
268       •   $gc (Gtk2::Gdk::GC)
269
270       •   $x (integer)
271
272       •   $y (integer)
273
274       •   $width (integer)
275
276       •   $height (integer)
277
278       •   $dith (Gtk2::Gdk::RgbDither)
279
280       •   $buf (scalar)
281
282       •   $rowstride (integer)
283
284   $drawable->draw_rgb_32_image_dithalign ($gc, $x, $y, $width, $height,
285       $dith, $rgb_buf, $rowstride, $xdith, $ydith)
286       •   $gc (Gtk2::Gdk::GC)
287
288       •   $x (integer)
289
290       •   $y (integer)
291
292       •   $width (integer)
293
294       •   $height (integer)
295
296       •   $dith (Gtk2::Gdk::RgbDither)
297
298       •   $rgb_buf (scalar)
299
300       •   $rowstride (integer)
301
302       •   $xdith (integer)
303
304       •   $ydith (integer)
305
306   $drawable->draw_rgb_image ($gc, $x, $y, $width, $height, $dith, $buf,
307       $rowstride)
308       •   $gc (Gtk2::Gdk::GC)
309
310       •   $x (integer)
311
312       •   $y (integer)
313
314       •   $width (integer)
315
316       •   $height (integer)
317
318       •   $dith (Gtk2::Gdk::RgbDither)
319
320       •   $buf (scalar)
321
322       •   $rowstride (integer)
323
324   $drawable->draw_rgb_image_dithalign ($gc, $x, $y, $width, $height, $dith,
325       $rgb_buf, $rowstride, $xdith, $ydith)
326       •   $gc (Gtk2::Gdk::GC)
327
328       •   $x (integer)
329
330       •   $y (integer)
331
332       •   $width (integer)
333
334       •   $height (integer)
335
336       •   $dith (Gtk2::Gdk::RgbDither)
337
338       •   $rgb_buf (scalar)
339
340       •   $rowstride (integer)
341
342       •   $xdith (integer)
343
344       •   $ydith (integer)
345
346   $drawable->draw_segments ($gc, ...)
347       •   $gc (Gtk2::Gdk::GC)
348
349       •   ... (list) quads of x1,y1,x2,y2 coordinates
350
351       For example to draw two diagonal line segments,
352
353           $drawable->draw_segments($gc, 0,0,100,100, 200,200,300,300);
354
355   image = $drawable->get_image ($x, $y, $width, $height)
356       •   $x (integer)
357
358       •   $y (integer)
359
360       •   $width (integer)
361
362       •   $height (integer)
363
364   screen = $drawable->get_screen
365       Since: gtk+ 2.2
366
367   (width, height) = $drawable->get_size
368   region = $drawable->get_visible_region
369   visual = $drawable->get_visual
370   unsigned = $drawable->get_xid

ENUMS AND FLAGS

372   enum Gtk2::Gdk::RgbDither
373       •   'none' / 'GDK_RGB_DITHER_NONE'
374
375       •   'normal' / 'GDK_RGB_DITHER_NORMAL'
376
377       •   'max' / 'GDK_RGB_DITHER_MAX'
378

SEE ALSO

380       Gtk2, Glib::Object
381
383       Copyright (C) 2003-2011 by the gtk2-perl team.
384
385       This software is licensed under the LGPL.  See Gtk2 for a full notice.
386
387
388
389perl v5.32.1                      2021-01-27            Gtk2::Gdk::Drawable(3)
Impressum