This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-gdkdrawable.html is in python-gtk2-doc 2.24.0-5.1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.gdk.Drawable</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gdk-class-reference.html" title="The gtk.gdk Class Reference"><link rel="prev" href="class-gdkdragcontext.html" title="gtk.gdk.DragContext"><link rel="next" href="class-gdkevent.html" title="gtk.gdk.Event"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.gdk.Drawable</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gdkdragcontext.html">Prev</a> </td><th width="60%" align="center">The gtk.gdk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gdkevent.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.gdk.Drawable"><a name="class-gdkdrawable"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.gdk.Drawable</h2><p>gtk.gdk.Drawable — a base class for drawing methods</p></div><div class="refsect1" title="Synopsis"><a name="id2890315"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.gdk.Drawable</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-size" title="gtk.gdk.Drawable.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--set-colormap" title="gtk.gdk.Drawable.set_colormap">set_colormap</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-colormap" title="gtk.gdk.Drawable.get_colormap">get_colormap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-visual" title="gtk.gdk.Drawable.get_visual">get_visual</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-depth" title="gtk.gdk.Drawable.get_depth">get_depth</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-screen" title="gtk.gdk.Drawable.get_screen">get_screen</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-display" title="gtk.gdk.Drawable.get_display">get_display</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-point" title="gtk.gdk.Drawable.draw_point">draw_point</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-line" title="gtk.gdk.Drawable.draw_line">draw_line</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x2</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y2</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-rectangle" title="gtk.gdk.Drawable.draw_rectangle">draw_rectangle</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filled</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-arc" title="gtk.gdk.Drawable.draw_arc">draw_arc</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filled</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>angle1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>angle2</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-polygon" title="gtk.gdk.Drawable.draw_polygon">draw_polygon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filled</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>points</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-drawable" title="gtk.gdk.Drawable.draw_drawable">draw_drawable</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>src</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xsrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ysrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-image" title="gtk.gdk.Drawable.draw_image">draw_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>image</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xsrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ysrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-points" title="gtk.gdk.Drawable.draw_points">draw_points</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>points</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-segments" title="gtk.gdk.Drawable.draw_segments">draw_segments</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>segs</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-lines" title="gtk.gdk.Drawable.draw_lines">draw_lines</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>points</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-pixbuf" title="gtk.gdk.Drawable.draw_pixbuf">draw_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>src_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>src_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dest_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dest_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dither</code></strong></span><span class="initializer">=gtk.gdk.RGB_DITHER_NORMAL</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_dither</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_dither</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-glyphs" title="gtk.gdk.Drawable.draw_glyphs">draw_glyphs</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>glyphs</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-layout-line" title="gtk.gdk.Drawable.draw_layout_line">draw_layout_line</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>line</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>layout</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreground</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-layout" title="gtk.gdk.Drawable.draw_layout">draw_layout</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>layout</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreground</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-image" title="gtk.gdk.Drawable.get_image">get_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-clip-region" title="gtk.gdk.Drawable.get_clip_region">get_clip_region</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--get-visible-region" title="gtk.gdk.Drawable.get_visible_region">get_visible_region</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--new-gc" title="gtk.gdk.Drawable.new_gc">new_gc</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreground</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tile</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>stipple</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>clip_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>subwindow_mode</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ts_x_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ts_y_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>clip_x_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>clip_y_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>graphics_exposures</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>line_width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>line_style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cap_style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>join_style</code></strong></span>&gt;</span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-rgb-image" title="gtk.gdk.Drawable.draw_rgb_image">draw_rgb_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rgb_buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdith</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydith</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-rgb-32-image" title="gtk.gdk.Drawable.draw_rgb_32_image">draw_rgb_32_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rgb_buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdith</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydith</code></strong></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-gray-image" title="gtk.gdk.Drawable.draw_gray_image">draw_gray_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span><span class="initializer">=-1</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-indexed-image" title="gtk.gdk.Drawable.draw_indexed_image">draw_indexed_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cmap</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gdkdrawable.html#method-gdkdrawable--cairo-create" title="gtk.gdk.Drawable.cairo_create">cairo_create</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id2945689"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
  +-- <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable">gtk.gdk.Drawable</a>
</pre></div><div class="refsect1" title="Attributes"><a name="id2916267"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"handle"</td><td valign="top">Read</td><td valign="top">The handle of the MS Windows window associated with
the drawable. Not supported on X11.</td></tr><tr valign="top"><td valign="top">"xid"</td><td valign="top">Read</td><td valign="top">The id of the X window available with the
drawable. Not supported on MS Windows</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id2970700"></a><h2>Description</h2><p>A <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>
is a base class providing drawing primitives for its subclasses: <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> and
<a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>.</p><p>These methods provide support for drawing points, lines, arcs and
text onto what are called 'drawables'. Drawables, as the name suggests, are
things which support drawing onto them, and are either <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> or
<a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a>
objects.</p><p>Many of the drawing operations take a <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> argument,
which represents a graphics context. This <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> contains a
number of drawing attributes such as foreground color, background color and
line width, and is used to reduce the number of arguments needed for each
drawing operation. See the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">Graphics
Contexts</code></a> section for more information.</p><p>Some of the drawing operations take Pango objects like <a class="link" href="class-pangocontext.html" title="pango.Context"><code class="classname">pango.Context</code></a> or
<a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>
as arguments. Use the <a class="link" href="class-gtkwidget.html#method-gtkwidget--create-pango-context" title="gtk.Widget.create_pango_context"><code class="methodname">gtk.Widget.create_pango_context</code>()</a>
or <a class="link" href="class-gtkwidget.html#method-gtkwidget--create-pango-layout" title="gtk.Widget.create_pango_layout"><code class="methodname">gtk.Widget.create_pango_layout</code>()</a>
methods to obtain these objects.</p></div><div class="refsect1" title="Methods"><a name="id2964333"></a><h2>Methods</h2><div class="refsect2" title="gtk.gdk.Drawable.get_size"><a name="method-gdkdrawable--get-size"></a><h3>gtk.gdk.Drawable.get_size</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_size</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing the drawable's width and
height</td></tr></tbody></table><p>The <code class="methodname">get_size</code>() method returns a tuple
containing the width and height of the drawable.</p><p>On the X11 platform, if the drawable is a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>, the
returned size is the size reported in the most-recently-processed configure
event, rather than the current size on the X server.</p></div><div class="refsect2" title="gtk.gdk.Drawable.set_colormap"><a name="method-gdkdrawable--set-colormap"></a><h3>gtk.gdk.Drawable.set_colormap</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_colormap</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>colormap</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>colormap</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a></td></tr></tbody></table><p>The <code class="methodname">set_colormap</code>() method sets the
<a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
associated with the drawable to the value specified by
<em class="parameter"><code>colormap</code></em>. Normally this will happen automatically
when the drawable is created; you only need to use this function if the
drawable-creating function did not have a way to determine the colormap, and
you then use drawable operations that require a colormap. The colormap for
all drawables and graphics contexts you intend to use together should match.
i.e. when using a <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> to draw to a
drawable, or copying one drawable to another, the colormaps should
match.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_colormap"><a name="method-gdkdrawable--get-colormap"></a><h3>gtk.gdk.Drawable.get_colormap</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_colormap</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the colormap, or
<code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">get_colormap</code>() method returns the
<a class="link" href="class-gdkcolormap.html" title="gtk.gdk.Colormap"><code class="classname">gtk.gdk.Colormap</code></a>
for the drawable or <code class="literal">None</code> if no colormap is set.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_visual"><a name="method-gdkdrawable--get-visual"></a><h3>gtk.gdk.Drawable.get_visual</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_visual</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a></td></tr></tbody></table><p>The <code class="methodname">get_visual</code>() method returns the
<a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a>
describing the pixel format of the drawable.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_depth"><a name="method-gdkdrawable--get-depth"></a><h3>gtk.gdk.Drawable.get_depth</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_depth</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the number of bits per
pixel</td></tr></tbody></table><p>The <code class="methodname">get_depth</code>() method returns the bit
depth of the drawable, that is, the number of bits that make up a pixel in
the drawable's visual. Examples are 8 bits per pixel, 24 bits per pixel,
etc.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_screen"><a name="method-gdkdrawable--get-screen"></a><h3>gtk.gdk.Drawable.get_screen</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_screen</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>
	  associated with the drawable</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">get_screen</code>() method returns the
<a class="link" href="class-gdkscreen.html" title="gtk.gdk.Screen"><code class="classname">gtk.gdk.Screen</code></a>
associated with the drawable.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_display"><a name="method-gdkdrawable--get-display"></a><h3>gtk.gdk.Drawable.get_display</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_display</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the <a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
	  associated with the drawable</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">get_display</code>() method returns the
<a class="link" href="class-gdkdisplay.html" title="gtk.gdk.Display"><code class="classname">gtk.gdk.Display</code></a>
associated with the drawable.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_point"><a name="method-gdkdrawable--draw-point"></a><h3>gtk.gdk.Drawable.draw_point</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_point</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the point in drawable
coordinates</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the point in drawable
coordinates</td></tr></tbody></table><p>The <code class="methodname">draw_point</code>() method draws a point
at the location specified by <em class="parameter"><code>x</code></em> and
<em class="parameter"><code>y</code></em> in the drawable using the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> graphics
context specified by <em class="parameter"><code>gc</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_line"><a name="method-gdkdrawable--draw-line"></a><h3>gtk.gdk.Drawable.draw_line</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_line</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x2</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x1</code></strong> :</span></p></td><td>the X coordinate of the first
point</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y1</code></strong> :</span></p></td><td>the Y coordinate of the first
point</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x2</code></strong> :</span></p></td><td>the X coordinate of the second
point</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y2</code></strong> :</span></p></td><td>the Y coordinate of the second
point</td></tr></tbody></table><p>The <code class="methodname">draw_line</code>() method draws a line
between the two points specified by (<em class="parameter"><code>x1</code></em>,
<em class="parameter"><code>y1</code></em>) and (<em class="parameter"><code>x2</code></em>,
<em class="parameter"><code>y2</code></em>) using the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> graphics
context specified by <em class="parameter"><code>gc</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_rectangle"><a name="method-gdkdrawable--draw-rectangle"></a><h3>gtk.gdk.Drawable.draw_rectangle</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_rectangle</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filled</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>filled</code></strong> :</span></p></td><td>if <code class="literal">True</code> the rectangle will
be filled with the foreground color</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the top left
corner</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the top left
corner</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the rectangle</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the
rectangle</td></tr></tbody></table><p>The <code class="methodname">draw_rectangle</code>() method draws a
rectangle of the specified <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em> with its top left corner at the location
specified by (<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>) using the
<a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>
graphics context specified by <em class="parameter"><code>gc</code></em>. If
<em class="parameter"><code>filled</code></em> is <code class="literal">True</code> the rectangle will
be filled with the foreground color.</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>A rectangle drawn filled is 1 pixel smaller in both dimensions
than a rectangle outlined. Calling:</p><pre class="programlisting">
  window.draw_rectangle(gc, True, 0, 0, 20, 20)
</pre><p>results in a filled rectangle 20 pixels wide and 20 pixels
high. Calling:</p><pre class="programlisting">
  window.draw_rectangle(gc, False, 0, 0, 20, 20)
 </pre><p>results in an outlined rectangle with corners at (0, 0), (0,
20), (20, 20), and (20, 0), which makes it 21 pixels wide and 21 pixels
high.</p></div></div><div class="refsect2" title="gtk.gdk.Drawable.draw_arc"><a name="method-gdkdrawable--draw-arc"></a><h3>gtk.gdk.Drawable.draw_arc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_arc</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filled</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>angle1</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>angle2</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>filled</code></strong> :</span></p></td><td>if <code class="literal">True</code> the arc will be
filled with the foreground color creating a "pie slice"</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the left edge of the
bounding rectangle.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the top edge of the
bounding rectangle. </td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the bounding
rectangle.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the bounding
rectangle.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>angle1</code></strong> :</span></p></td><td>the start angle of the arc, relative to the 3
o'clock position, counter-clockwise, in 1/64ths of a
degree.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>angle2</code></strong> :</span></p></td><td>the end angle of the arc, relative to angle1,
counter-clockwise, in 1/64ths of a degree.</td></tr></tbody></table><p>The <code class="methodname">draw_arc</code>() method draws an arc or a
filled 'pie slice' if <em class="parameter"><code>filled</code></em> is
<code class="literal">True</code>. The arc is defined by the bounding rectangle of the
entire ellipse (specified by <em class="parameter"><code>x</code></em>,
<em class="parameter"><code>y</code></em>, <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em>), and the start and end angles of the part of
the ellipse to be drawn (specified by <em class="parameter"><code>angle1</code></em> and
<em class="parameter"><code>angle2</code></em>). The <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> graphics
context specified by <em class="parameter"><code>gc</code></em> is used to determine the
drawing attributes.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_polygon"><a name="method-gdkdrawable--draw-polygon"></a><h3>gtk.gdk.Drawable.draw_polygon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_polygon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>filled</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>points</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>filled</code></strong> :</span></p></td><td>if <code class="literal">True</code> the polygon will be
filled with the foreground color</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>points</code></strong> :</span></p></td><td>a sequence of 2-tuples</td></tr></tbody></table><p>The <code class="methodname">draw_polygon</code>() method draws an
outlined or filled polygon using the points specified by
<em class="parameter"><code>points</code></em>. <em class="parameter"><code>points</code></em> is a sequence
of 2-tuples that each contain an x and y coordinate of a point. The points
are connected in the order that they are specified and the last point is
automatically connected to the first point. The <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> graphics
context specified by <em class="parameter"><code>gc</code></em> is used to determine the
drawing attributes.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_drawable"><a name="method-gdkdrawable--draw-drawable"></a><h3>gtk.gdk.Drawable.draw_drawable</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_drawable</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>src</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xsrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ysrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> sharing the
drawable's visual and colormap</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>src</code></strong> :</span></p></td><td>another <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xsrc</code></strong> :</span></p></td><td>the X position in <em class="parameter"><code>src</code></em> of
rectangle to draw</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ysrc</code></strong> :</span></p></td><td>the Y position in <em class="parameter"><code>src</code></em> of
rectangle to draw</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xdest</code></strong> :</span></p></td><td>the X position in the drawable where the
rectangle should be drawn</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ydest</code></strong> :</span></p></td><td>the Y position in the drawable where the
rectangle should be drawn</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of rectangle to draw, or -1 for
entire <em class="parameter"><code>src</code></em> width</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of rectangle to draw, or -1 for
entire <em class="parameter"><code>src</code></em> height</td></tr></tbody></table><p>The draw_drawable() method copies the specified
<em class="parameter"><code>width</code></em> x <em class="parameter"><code>height</code></em> area of the
drawable specified by <em class="parameter"><code>src</code></em> at the specified
coordinates (<em class="parameter"><code>xsrc</code></em>, <em class="parameter"><code>ysrc</code></em>) to
the specified coordinates (<em class="parameter"><code>xdest</code></em>,
<em class="parameter"><code>ydest</code></em>) in the drawable. <em class="parameter"><code>width</code></em>
and <em class="parameter"><code>height</code></em> may be given as -1, to copy the entire
<em class="parameter"><code>src</code></em> drawable. Most fields in the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> specified by
<em class="parameter"><code>gc</code></em> are not used for this operation, but the clip mask
or clip region will be honored.</p><p>The source and destination drawables must have the same visual
and colormap, or errors will result. (On X11, failure to match visual and
colormap results in a <code class="literal">BadMatch</code> error from the X server.)
A common cause of this problem is an attempt to draw a bitmap to a color
drawable. The way to draw a bitmap is to set the bitmap as a clip mask on
your <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>,
then use the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-rectangle" title="gtk.gdk.Drawable.draw_rectangle"><code class="methodname">draw_rectangle</code>()</a> 
method to draw a rectangle clipped to the bitmap.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_image"><a name="method-gdkdrawable--draw-image"></a><h3>gtk.gdk.Drawable.draw_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>image</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xsrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ysrc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydest</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>image</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xsrc</code></strong> :</span></p></td><td>the left edge of the source rectangle within
<em class="parameter"><code>image</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ysrc</code></strong> :</span></p></td><td>the top edge of the source rectangle within
<em class="parameter"><code>image</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xdest</code></strong> :</span></p></td><td>the left edge of the destination within
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ydest</code></strong> :</span></p></td><td>the top edge of the destination within
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the area to be copied, or -1 to
make the area extend to the right edge of
<em class="parameter"><code>image</code></em>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the area to be copied, or -1 to
make the area extend to the bottom edge of
<em class="parameter"><code>image</code></em>.</td></tr></tbody></table><p>The <code class="methodname">draw_image</code>() method draws the
portion of the <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
specified by the rectangle (<em class="parameter"><code>xsrc</code></em>,
<em class="parameter"><code>ysrc</code></em>, <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em>) onto the drawable at the location specified
by <em class="parameter"><code>xdest</code></em> and <em class="parameter"><code>ydest</code></em>. The depth
of the <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a> must
match the depth of the <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>.
The <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>
graphics context specified by <em class="parameter"><code>gc</code></em> is used to determine
the drawing attributes.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_points"><a name="method-gdkdrawable--draw-points"></a><h3>gtk.gdk.Drawable.draw_points</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_points</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>points</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>points</code></strong> :</span></p></td><td>a sequence of 2-tuples</td></tr></tbody></table><p>The <code class="methodname">draw_points</code>() method draws the set
of points specified by <em class="parameter"><code>points</code></em> on the drawable using
the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>
graphics context specified by <em class="parameter"><code>gc</code></em>.
<em class="parameter"><code>points</code></em> is a sequence of 2-tuples each containing a
pair of x and y coordinates of a point location in the drawable.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_segments"><a name="method-gdkdrawable--draw-segments"></a><h3>gtk.gdk.Drawable.draw_segments</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_segments</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>segs</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>segs</code></strong> :</span></p></td><td>a sequence of 4-tuples</td></tr></tbody></table><p>The <code class="methodname">draw_segments</code>() method draws a set
of line segments specified by <em class="parameter"><code>segs</code></em> on the drawable
using the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> graphics
context specified by <em class="parameter"><code>gc</code></em> to specify the drawing
attributes. <em class="parameter"><code>segs</code></em> is a sequence of 4-tuples each
containing the coordinates of the start and end points of the line segment
in the format (x1, y1, x2, y2).</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_lines"><a name="method-gdkdrawable--draw-lines"></a><h3>gtk.gdk.Drawable.draw_lines</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_lines</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>points</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>points</code></strong> :</span></p></td><td>a sequence of 2-tuples</td></tr></tbody></table><p>The <code class="methodname">draw_lines</code>() method draws a series
of lines connecting the points specified by <em class="parameter"><code>points</code></em>.
<em class="parameter"><code>points</code></em> is a sequence of 2-tuples each containing the
x and y coordinates of a point location. The <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> graphics
context specified by <em class="parameter"><code>gc</code></em> is used to determine the
drawing attributes.The style of joins between lines is determined by the cap
style attribute in the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>. This can be
set with the <a class="link" href="class-gdkgc.html#method-gdkgc--set-line-attributes" title="gtk.gdk.GC.set_line_attributes"><code class="methodname">gtk.gdk.GC.set_line_attributes</code>()</a> 
method.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_pixbuf"><a name="method-gdkdrawable--draw-pixbuf"></a><h3>gtk.gdk.Drawable.draw_pixbuf</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_pixbuf</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>src_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>src_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dest_x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dest_y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dither</code></strong></span><span class="initializer">=gtk.gdk.RGB_DITHER_NORMAL</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x_dither</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y_dither</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>,
	  used for clipping, or <code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>src_x</code></strong> :</span></p></td><td>Source X coordinate within
	  pixbuf.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>src_y</code></strong> :</span></p></td><td>Source Y coordinate within
	  pixbuf.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dest_x</code></strong> :</span></p></td><td>Destination X coordinate within
	  drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dest_y</code></strong> :</span></p></td><td>Destination Y coordinate within
	  drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>Width of region to render, in pixels, or -1 to
	  use pixbuf width. Must be specified in PyGTK
	  2.2.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>Height of region to render, in pixels, or -1 to
	  use pixbuf height. Must be specified in PyGTK
	  2.2</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dither</code></strong> :</span></p></td><td>Dithering mode for
	  <code class="literal">GdkRGB</code>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x_dither</code></strong> :</span></p></td><td>X offset for dither.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y_dither</code></strong> :</span></p></td><td>Y offset for dither.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.2 and above.</p></div><p>The <code class="methodname">draw_pixbuf</code>() method renders a
rectangular portion of a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
specified by <em class="parameter"><code>pixbuf</code></em> to the drawable using the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> specified by
<em class="parameter"><code>gc</code></em>. The portion of <em class="parameter"><code>pixbuf</code></em> that
is rendered is specified by the origin point (<em class="parameter"><code>src_x</code></em>
<em class="parameter"><code>src_y</code></em>) and the <em class="parameter"><code>width</code></em> and
<em class="parameter"><code>height</code></em> arguments. <em class="parameter"><code>pixbuf</code></em> is
rendered to the location in the drawable specified by
(<em class="parameter"><code>dest_x</code></em>
<em class="parameter"><code>dest_y</code></em>). <em class="parameter"><code>dither</code></em> specifies the
dithering mode as one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><code class="literal">gtk.gdk.RGB_DITHER_NONE</code></span></p></td><td>Never use dithering.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.gdk.RGB_DITHER_NORMAL</code></span></p></td><td>Use dithering in 8 bits per pixel (and below)
	    only.</td></tr><tr><td><p><span class="term"><code class="literal">gtk.gdk.RGB_DITHER_MAX</code></span></p></td><td>Use dithering in 16 bits per pixel and below.</td></tr></tbody></table><p>The destination drawable must have a colormap. All windows have a
colormap, however, pixmaps only have colormap by default if they were
created with a non-<code class="literal">None</code> window argument. Otherwise a
colormap must be set on them with the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--set-colormap" title="gtk.gdk.Drawable.set_colormap"><code class="methodname">gtk.gdk.Drawable.set_colormap()</code></a>
method.</p><p>On older X servers, rendering pixbufs with an alpha channel
involves round trips to the X server, and may be somewhat slow. The clip
mask of <em class="parameter"><code>gc</code></em> is ignored, but clip rectangles and clip
regions work fine.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_glyphs"><a name="method-gdkdrawable--draw-glyphs"></a><h3>gtk.gdk.Drawable.draw_glyphs</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_glyphs</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>glyphs</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>font</code></strong> :</span></p></td><td>the font to be used</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of baseline
origin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of baseline
origin</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>glyphs</code></strong> :</span></p></td><td>the glyphs to render</td></tr></tbody></table><p>The <code class="methodname">draw_glyphs</code>() method draws the
sequence of glyphs (characters in  a font) specified by
<em class="parameter"><code>glyphs</code></em> at the location specified by
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> using the font
specified by <em class="parameter"><code>font</code></em>. Instead of using this method 99%
of text rendering should be done using the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-layout" title="gtk.gdk.Drawable.draw_layout"><code class="methodname">draw_layout</code>()</a> 
method.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_layout_line"><a name="method-gdkdrawable--draw-layout-line"></a><h3>gtk.gdk.Drawable.draw_layout_line</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_layout_line</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>line</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreground</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>base graphics to use</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the x position of start of string (in pixels)</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the y position of baseline (in pixels)</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>line</code></strong> :</span></p></td><td>a <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>foreground</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
          to override the foreground color or
          <code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>background</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>
          to override the background color or
          <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <em class="parameter"><code>draw_layout_line</code></em>() method renders the
      <a class="link" href="class-pangolayoutline.html" title="pango.LayoutLine"><code class="classname">pango.LayoutLine</code></a>
      specified by <em class="parameter"><code>line</code></em> onto the drawable at the
      position specified by (<em class="parameter"><code>x</code></em>,
      <em class="parameter"><code>y</code></em>). The <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>
      specified by <em class="parameter"><code>gc</code></em> is used as the graphics context
      but the layout's normal colors may be overriden with the <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>s
      specified by <em class="parameter"><code>foreground</code></em> and/or
      <em class="parameter"><code>background</code></em>. <em class="parameter"><code>foreground</code></em>
      and <em class="parameter"><code>background</code></em> are optional and default to
      <code class="literal">None</code>.</p><p>If the layout's <a class="link" href="class-pangocontext.html" title="pango.Context"><code class="classname">pango.Context</code></a>
      has a transformation matrix set, then <em class="parameter"><code>x</code></em> and
      <em class="parameter"><code>y</code></em> specify the position of the left edge of the
      baseline (left is in before-tranform user coordinates) in
      after-transform device coordinates.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_layout"><a name="method-gdkdrawable--draw-layout"></a><h3>gtk.gdk.Drawable.draw_layout</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_layout</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>layout</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreground</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>base graphics context to
use</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X position of the left of the layout (in
pixels)</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y position of the top of the layout (in
pixels)</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>layout</code></strong> :</span></p></td><td>a <a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>foreground</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to
override the foreground color or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>background</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a> to
override the background color or
<code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">draw_layout</code>() method renders the
<a class="link" href="class-pangolayout.html" title="pango.Layout"><code class="classname">pango.Layout</code></a>
specified by <em class="parameter"><code>layout</code></em> onto the drawable at the location
specified by <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>. If
<em class="parameter"><code>foreground</code></em> or <em class="parameter"><code>background</code></em> has a
value other than <code class="literal">None</code> it is used to override the
corresponding attribute specified by <em class="parameter"><code>gc</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_image"><a name="method-gdkdrawable--get-image"></a><h3>gtk.gdk.Drawable.get_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate on the
drawable</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate on the
drawable</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of region to get</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height or region to
get</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
containing the contents of the drawable</td></tr></tbody></table><p>The <code class="methodname">get_image</code>() method returns a <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a> 
object containing a copy of the region in the drawable specified by
<em class="parameter"><code>x</code></em>, <em class="parameter"><code>y</code></em>,
<em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em>. A <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a> stores
client-side image data (pixels). In contrast, a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> and
<a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a>
are server-side objects. The <code class="methodname">get_image</code>() method
retrieves the pixels from a server-side drawable as a client-side <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>. The
format of a <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a> depends
on the <a class="link" href="class-gdkvisual.html" title="gtk.gdk.Visual"><code class="classname">gtk.gdk.Visual</code></a> of
the current display, which makes manipulating <a class="link" href="class-gdkimage.html" title="gtk.gdk.Image"><code class="classname">gtk.gdk.Image</code></a>
extremely difficult; therefore, in most cases you should use the <a class="link" href="class-gdkpixbuf.html#method-gdkpixbuf--get-from-drawable" title="gtk.gdk.Pixbuf.get_from_drawable"><code class="methodname">gtk.gdk.Pixbuf.get_from_drawable</code>()</a> 
method instead of this lower-level function. A <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a>
contains image data in a canonicalized RGB format, rather than a
display-dependent format. Of course, there's a convenience vs. speed
tradeoff here, so you'll want to think about what makes sense for your
application.</p><p>You would usually copy image data to the client side if you
intend to examine the values of individual pixels, for example to darken an
image or add a red tint. It would be prohibitively slow to make a round-trip
request to the windowing system for each pixel, so instead you get all of
them at once, modify them, then copy them all back at once. If the X server
or other windowing system backend is on the local machine, this function may
use shared memory to avoid copying the image data. If the source drawable is
a <a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> and
partially off screen or obscured, then the obscured portions of the returned
image will contain undefined data.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_clip_region"><a name="method-gdkdrawable--get-clip-region"></a><h3>gtk.gdk.Drawable.get_clip_region</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_clip_region</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_clip_region</code>() method computes
      and returns the <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
      of the drawable that potentially can be written to by drawing
      primitives. This region will not take into account the clip region for
      the <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a>, and
      may also not take into account other factors such as if the window is
      obscured by other windows, but no area outside of this region will be
      affected by drawing primitives.</p></div><div class="refsect2" title="gtk.gdk.Drawable.get_visible_region"><a name="method-gdkdrawable--get-visible-region"></a><h3>gtk.gdk.Drawable.get_visible_region</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_visible_region</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>. This must be freed with <code class="function">gdk_region_destroy()</code>
          when you are done.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">get_visible_region</code>() method
      computes and returns the <a class="link" href="class-gdkregion.html" title="gtk.gdk.Region"><code class="classname">gtk.gdk.Region</code></a>
      of the drawable that is potentially visible.  This does not
      necessarily take into account if the window is obscured by other
      windows, but no area outside of this region is visible.</p></div><div class="refsect2" title="gtk.gdk.Drawable.new_gc"><a name="method-gdkdrawable--new-gc"></a><h3>gtk.gdk.Drawable.new_gc</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">new_gc</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>foreground</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>font</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>function</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>fill</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tile</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>stipple</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>clip_mask</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>subwindow_mode</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ts_x_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ts_y_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>clip_x_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>clip_y_origin</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>graphics_exposures</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>line_width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>line_style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cap_style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>join_style</code></strong></span>&gt;</span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>foreground</code></strong> :</span></p></td><td>the foreground <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>background</code></strong> :</span></p></td><td>the background <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>font</code></strong> :</span></p></td><td>a font (deprecated and
ignored)</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>function</code></strong> :</span></p></td><td>the bitwise operator used to combine the
existing pixel value and a new pixel value - usually one of:
<code class="literal">gtk.gdk.COPY</code>, <code class="literal">gtk.gdk.XOR</code> or
<code class="literal">gtk.gdk.INVERT</code>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>fill</code></strong> :</span></p></td><td>the fill style - one of:
<code class="literal">gtk.gdk.SOLID</code>, <code class="literal">gtk.gdk.TILED</code>,
<code class="literal">gtk.gdk.STIPPLED</code>,
<code class="literal">gtk.gdk.OPAQUE_STIPPLED</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>tile</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> used
for tiling the background</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>stipple</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> used
for stippling the background</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>clip_mask</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixmap.html" title="gtk.gdk.Pixmap"><code class="classname">gtk.gdk.Pixmap</code></a> of
depth 1 used to mask pixels to be drawn</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>subwindow_mode</code></strong> :</span></p></td><td>the mode of drawing on subwindows in a
<a class="link" href="class-gdkwindow.html" title="gtk.gdk.Window"><code class="classname">gtk.gdk.Window</code></a> - one of: <code class="literal">gtk.gdk.CLIP_BY_CHILDREN</code> or
<code class="literal">gtk.gdk.INCLUDE_INFERIORS</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ts_x_origin</code></strong> :</span></p></td><td>the X coordinate of the origin of
<em class="parameter"><code>tile</code></em> or
<em class="parameter"><code>stipple</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ts_y_origin</code></strong> :</span></p></td><td>the Y coordinate of the origin of
<em class="parameter"><code>tile</code></em> or
<em class="parameter"><code>stipple</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>clip_x_origin</code></strong> :</span></p></td><td>the X coordinate of the origin of
<em class="parameter"><code>clip_mask</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>clip_y_origin</code></strong> :</span></p></td><td>the Y coordinate of the origin of
<em class="parameter"><code>clip_mask</code></em></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>graphics_exposures</code></strong> :</span></p></td><td>if <code class="literal">True</code> graphics exposures
are enabled for calls to the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-drawable" title="gtk.gdk.Drawable.draw_drawable"><code class="methodname">draw_drawable</code>()</a> 
method.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>line_width</code></strong> :</span></p></td><td>the line width in pixels</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>line_style</code></strong> :</span></p></td><td>the line style - one of:
<code class="literal">gtk.gdk.LINE_SOLID</code>,
<code class="literal">gtk.gdk.LINE_ON_OFF_DASH</code>,
<code class="literal">gtk.gdk.LINE_DOUBLE_DASH</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cap_style</code></strong> :</span></p></td><td>the style of line ends - one of:
<code class="literal">gtk.gdk.CAP_NOT_LAST</code>,
<code class="literal">gtk.gdk.CAP_BUTT</code>, <code class="literal">gtk.gdk.CAP_ROUND</code>,
<code class="literal">gtk.gdk.CAP_PROJECTING</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>join_style</code></strong> :</span></p></td><td>the style of line joins - one of:
<code class="literal">gtk.gdk.JOIN_MITER</code>,
<code class="literal">gtk.gdk.JOIN_ROUND</code>,
<code class="literal">gtk.gdk.JOIN_BEVEL</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a graphics context</td></tr></tbody></table><p>The <code class="methodname">new_gc</code>() method creates a new <a class="link" href="class-gdkgc.html" title="gtk.gdk.GC"><code class="classname">gtk.gdk.GC</code></a> object with
the attributes as specified by the arguments. Since there are a large number
of parameters it's probably best to specify the attributes using keywords.
Any attributes not specified will use a default value.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_rgb_image"><a name="method-gdkdrawable--draw-rgb-image"></a><h3>gtk.gdk.Drawable.draw_rgb_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_rgb_image_dithalign</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rgb_buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdith</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydith</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the top-left corner in the
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the top-left corner in the
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the image to be
drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the image to be
drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dith</code></strong> :</span></p></td><td>a dither value - one of:
<code class="literal">gtk.gdk.RGB_DITHER_NONE</code>,
<code class="literal">gtk.gdk.RGB_DITHER_NORMAL</code>,
<code class="literal">gtk.gdk.RGB_DITHER_MAX</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>rgb_buf</code></strong> :</span></p></td><td>the pixel data, represented as packed 24-bit
data.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>rowstride</code></strong> :</span></p></td><td>the number of bytes from the start of one row
in <em class="parameter"><code>rgb_buf</code></em> to the start of the next or -1 to
calculate the number of bytes.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xdith</code></strong> :</span></p></td><td>an X offset for dither
alignment.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ydith</code></strong> :</span></p></td><td>a Y offset for dither
alignment.</td></tr></tbody></table><p>The <code class="methodname">draw_rgb_image</code>() method draws an
RGB image in the drawable, with an adjustment for dither alignment. This
method is useful when drawing dithered images into a window that may be
scrolled. Pixel (x, y) will be drawn dithered as if its actual location is
(x + xdith, y + ydith). Thus, if you draw an image into a window using zero
dither alignment, then scroll up one pixel, subsequent draws to the window
should have ydith = 1. Setting the dither alignment correctly allows
updating of small parts of the screen while avoiding visible "seams" between
the different dither textures.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_rgb_32_image"><a name="method-gdkdrawable--draw-rgb-32-image"></a><h3>gtk.gdk.Drawable.draw_rgb_32_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_rgb_32_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rgb_buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span><span class="initializer">=-1</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>xdith</code></strong></span><span class="initializer">=0</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>ydith</code></strong></span><span class="initializer">=0</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the top-left corner in the
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the top-left corner in the
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the image to be
drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the image to be
drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dith</code></strong> :</span></p></td><td>a dither value - one of:
<code class="literal">gtk.gdk.RGB_DITHER_NONE</code>,
<code class="literal">gtk.gdk.RGB_DITHER_NORMAL</code>,
<code class="literal">gtk.gdk.RGB_DITHER_MAX</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>buf</code></strong> :</span></p></td><td>the pixel data, represented as padded 32-bit
data.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>rowstride</code></strong> :</span></p></td><td>the number of bytes from the start of one row
in <em class="parameter"><code>buf</code></em> to the start of the next or -1 to calculate
the number of bytes.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>xdith</code></strong> :</span></p></td><td>an X offset for dither
alignment.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>ydith</code></strong> :</span></p></td><td>a Y offset for dither
alignment.</td></tr></tbody></table><p>The <code class="methodname">draw_rgb_32_image</code>() method draws a
padded RGB image in the drawable. The image is stored as one pixel per
32-bit word. It is laid out as a red byte, a green byte, a blue byte, and a
padding byte. Otherwise this method works the same as the <a class="link" href="class-gdkdrawable.html#method-gdkdrawable--draw-rgb-image" title="gtk.gdk.Drawable.draw_rgb_image"><code class="methodname">draw_rgb_image</code>()</a> 
method.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_gray_image"><a name="method-gdkdrawable--draw-gray-image"></a><h3>gtk.gdk.Drawable.draw_gray_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_gray_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span><span class="initializer">=-1</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>the X coordinate of the top-left corner in the
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the Y coordinate of the top-left corner in the
drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the image to be
drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the image to be
drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dith</code></strong> :</span></p></td><td>a dither value - one of:
<code class="literal">gtk.gdk.RGB_DITHER_NONE</code>,
<code class="literal">gtk.gdk.RGB_DITHER_NORMAL</code>,
<code class="literal">gtk.gdk.RGB_DITHER_MAX</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>buf</code></strong> :</span></p></td><td>the pixel data, represented as 8-bit gray
values.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>rowstride</code></strong> :</span></p></td><td>the number of bytes from the start of one row
in <em class="parameter"><code>buf</code></em> to the start of the next or -1 to calculate
the number of bytes.</td></tr></tbody></table><p>The <code class="methodname">draw_gray_image</code>() method draws a
grayscale image on the drawable at the location specified by
<em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em> with the image data in
<em class="parameter"><code>buf</code></em>.</p></div><div class="refsect2" title="gtk.gdk.Drawable.draw_indexed_image"><a name="method-gdkdrawable--draw-indexed-image"></a><h3>gtk.gdk.Drawable.draw_indexed_image</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">draw_indexed_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>gc</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>x</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>y</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>dith</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>buf</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>rowstride</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>colors</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>gc</code></strong> :</span></p></td><td>a graphics context</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>x</code></strong> :</span></p></td><td>The x coordinate of the top-left corner in the
        drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>y</code></strong> :</span></p></td><td>the y coordinate of the top-left corner in the
        drawable.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>width</code></strong> :</span></p></td><td>the width of the rectangle to be
        drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the rectangle to be
        drawn.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>dith</code></strong> :</span></p></td><td>a GdkRgbDither value, selecting the desired
        dither mode.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>buf</code></strong> :</span></p></td><td>the pixel data, represented as 8-bit color
        indices.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>rowstride</code></strong> :</span></p></td><td>the number of bytes from the start of one row in
        <em class="parameter"><code>buf</code></em> to the start of the
        next.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>colors</code></strong> :</span></p></td><td>a list of colors represented as 0xRRGGBB integer
        values.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">draw_indexed_image</code>() method draws an
    indexed image in the drawable, using the list of colors specified
    by <em class="parameter"><code>colors</code></em> to assign actual colors to the image's
    color indices.</p></div><div class="refsect2" title="gtk.gdk.Drawable.cairo_create"><a name="method-gdkdrawable--cairo-create"></a><h3>gtk.gdk.Drawable.cairo_create</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">cairo_create</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkcairocontext.html" title="gtk.gdk.CairoContext"><code class="classname">gtk.gdk.CairoContext</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">cairo_create</code>() method returns a
    <a class="link" href="class-gdkcairocontext.html" title="gtk.gdk.CairoContext"><code class="classname">gtk.gdk.CairoContext</code></a>
    object to be used for drawing on the drawable using Cairo drawing
    operations.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gdkdragcontext.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gdk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gdkevent.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.gdk.DragContext </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.gdk.Event</td></tr></table></div></body></html>