]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_gdi.py
added --enable-tga (on by default)
[wxWidgets.git] / wxPython / src / gtk / _gdi.py
CommitLineData
0085ce49 1# This file was created automatically by SWIG 1.3.29.
d14a1e28 2# Don't modify this file, modify the SWIG interface instead.
70551f47 3
54f9ee45 4import _gdi_
0085ce49
RD
5import new
6new_instancemethod = new.instancemethod
093d3ff1 7def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
0085ce49 8 if (name == "thisown"): return self.this.own(value)
093d3ff1 9 if (name == "this"):
0085ce49
RD
10 if type(value).__name__ == 'PySwigObject':
11 self.__dict__[name] = value
093d3ff1
RD
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
0085ce49 15 if (not static) or hasattr(self,name):
093d3ff1
RD
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
0085ce49 24 if (name == "thisown"): return self.this.own()
093d3ff1
RD
25 method = class_type.__swig_getmethods__.get(name,None)
26 if method: return method(self)
27 raise AttributeError,name
28
0085ce49
RD
29def _swig_repr(self):
30 try: strthis = "proxy of " + self.this.__repr__()
31 except: strthis = ""
32 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
33
093d3ff1
RD
34import types
35try:
36 _object = types.ObjectType
37 _newclass = 1
38except AttributeError:
39 class _object : pass
40 _newclass = 0
41del types
42
43
44def _swig_setattr_nondynamic_method(set):
45 def set_attr(self,name,value):
0085ce49
RD
46 if (name == "thisown"): return self.this.own(value)
47 if hasattr(self,name) or (name == "this"):
093d3ff1
RD
48 set(self,name,value)
49 else:
50 raise AttributeError("You cannot add attributes to %s" % self)
51 return set_attr
52
53
54f9ee45
RD
54import _core
55wx = _core
d14a1e28
RD
56#---------------------------------------------------------------------------
57
54f9ee45 58class GDIObject(_core.Object):
093d3ff1 59 """Proxy of C++ GDIObject class"""
0085ce49
RD
60 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
61 __repr__ = _swig_repr
62 def __init__(self, *args, **kwargs):
a95a7133 63 """__init__(self) -> GDIObject"""
0085ce49
RD
64 _gdi_.GDIObject_swiginit(self,_gdi_.new_GDIObject(*args, **kwargs))
65 __swig_destroy__ = _gdi_.delete_GDIObject
66 __del__ = lambda self : None;
e811c8ce 67 def IsNull(*args, **kwargs):
a95a7133 68 """IsNull(self) -> bool"""
54f9ee45 69 return _gdi_.GDIObject_IsNull(*args, **kwargs)
e811c8ce 70
2131d850 71_gdi_.GDIObject_swigregister(GDIObject)
9df61a29 72
d14a1e28
RD
73#---------------------------------------------------------------------------
74
01f6b6d3
RD
75C2S_NAME = _gdi_.C2S_NAME
76C2S_CSS_SYNTAX = _gdi_.C2S_CSS_SYNTAX
77C2S_HTML_SYNTAX = _gdi_.C2S_HTML_SYNTAX
fc46b7f3
RD
78ALPHA_TRANSPARENT = _gdi_.ALPHA_TRANSPARENT
79ALPHA_OPAQUE = _gdi_.ALPHA_OPAQUE
54f9ee45 80class Colour(_core.Object):
b88bce5f 81 """
41e2b43e
RD
82 A colour is an object representing a combination of Red, Green, and
83 Blue (RGB) intensity values, and is used to determine drawing colours,
84 window colours, etc. Valid RGB values are in the range 0 to 255.
b88bce5f 85
41e2b43e 86 In wxPython there are typemaps that will automatically convert from a
32fe5131
RD
87 colour name, from a '#RRGGBB' colour hex value string, or from a 3
88 integer tuple to a wx.Colour object when calling C++ methods that
89 expect a wxColour. This means that the following are all
90 equivallent::
b88bce5f
RD
91
92 win.SetBackgroundColour(wxColour(0,0,255))
b2df227b
RD
93 win.SetBackgroundColour('BLUE')
94 win.SetBackgroundColour('#0000FF')
32fe5131 95 win.SetBackgroundColour((0,0,255))
b88bce5f 96
41e2b43e
RD
97 Additional colour names and their coresponding values can be added
98 using `wx.ColourDatabase`. Various system colours (as set in the
99 user's system preferences) can be retrieved with
100 `wx.SystemSettings.GetColour`.
101
b88bce5f 102 """
0085ce49
RD
103 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
104 __repr__ = _swig_repr
105 def __init__(self, *args, **kwargs):
b88bce5f 106 """
fc46b7f3 107 __init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
b88bce5f
RD
108
109 Constructs a colour from red, green and blue values.
41e2b43e
RD
110
111 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
112
b88bce5f 113 """
0085ce49
RD
114 _gdi_.Colour_swiginit(self,_gdi_.new_Colour(*args, **kwargs))
115 __swig_destroy__ = _gdi_.delete_Colour
116 __del__ = lambda self : None;
e811c8ce 117 def Red(*args, **kwargs):
b88bce5f 118 """
41e2b43e 119 Red(self) -> byte
b88bce5f
RD
120
121 Returns the red intensity.
122 """
54f9ee45 123 return _gdi_.Colour_Red(*args, **kwargs)
e811c8ce
RD
124
125 def Green(*args, **kwargs):
b88bce5f 126 """
41e2b43e 127 Green(self) -> byte
b88bce5f
RD
128
129 Returns the green intensity.
130 """
54f9ee45 131 return _gdi_.Colour_Green(*args, **kwargs)
e811c8ce
RD
132
133 def Blue(*args, **kwargs):
b88bce5f 134 """
41e2b43e 135 Blue(self) -> byte
b88bce5f
RD
136
137 Returns the blue intensity.
138 """
54f9ee45 139 return _gdi_.Colour_Blue(*args, **kwargs)
e811c8ce 140
fc46b7f3
RD
141 def Alpha(*args, **kwargs):
142 """
143 Alpha(self) -> byte
144
145 Returns the Alpha value.
146 """
147 return _gdi_.Colour_Alpha(*args, **kwargs)
148
b39fe951 149 def IsOk(*args, **kwargs):
b88bce5f 150 """
b39fe951 151 IsOk(self) -> bool
b88bce5f
RD
152
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
155 """
b39fe951 156 return _gdi_.Colour_IsOk(*args, **kwargs)
e811c8ce 157
b39fe951 158 Ok = IsOk
e811c8ce 159 def Set(*args, **kwargs):
b88bce5f 160 """
fc46b7f3 161 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
b88bce5f
RD
162
163 Sets the RGB intensity values.
164 """
54f9ee45 165 return _gdi_.Colour_Set(*args, **kwargs)
e811c8ce 166
c9c7117a 167 def SetRGB(*args, **kwargs):
b88bce5f 168 """
a95a7133 169 SetRGB(self, unsigned long colRGB)
b88bce5f
RD
170
171 Sets the RGB intensity values from a packed RGB value.
172 """
54f9ee45 173 return _gdi_.Colour_SetRGB(*args, **kwargs)
e811c8ce 174
b88bce5f
RD
175 def SetFromName(*args, **kwargs):
176 """
a95a7133 177 SetFromName(self, String colourName)
b88bce5f 178
41e2b43e
RD
179 Sets the RGB intensity values using a colour name listed in
180 ``wx.TheColourDatabase``.
b88bce5f 181 """
54f9ee45 182 return _gdi_.Colour_SetFromName(*args, **kwargs)
b88bce5f 183
01f6b6d3
RD
184 def GetAsString(*args, **kwargs):
185 """
186 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
187
188 Return the colour as a string. Acceptable flags are:
189
190 =================== ==================================
191 wx.C2S_NAME return colour name, when possible
192 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
193 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
194 =================== ==================================
195 """
196 return _gdi_.Colour_GetAsString(*args, **kwargs)
197
b88bce5f
RD
198 def GetPixel(*args, **kwargs):
199 """
a95a7133 200 GetPixel(self) -> long
b88bce5f
RD
201
202 Returns a pixel value which is platform-dependent. On Windows, a
41e2b43e
RD
203 COLORREF is returned. On X, an allocated pixel value is returned. -1
204 is returned if the pixel is invalid (on X, unallocated).
b88bce5f 205 """
54f9ee45 206 return _gdi_.Colour_GetPixel(*args, **kwargs)
b88bce5f 207
e811c8ce 208 def __eq__(*args, **kwargs):
b88bce5f 209 """
e9d6f3a4 210 __eq__(self, PyObject other) -> bool
b88bce5f 211
e9d6f3a4 212 Compare colours for equality.
b88bce5f 213 """
54f9ee45 214 return _gdi_.Colour___eq__(*args, **kwargs)
e811c8ce
RD
215
216 def __ne__(*args, **kwargs):
b88bce5f 217 """
e9d6f3a4 218 __ne__(self, PyObject other) -> bool
e811c8ce 219
e9d6f3a4 220 Compare colours for inequality.
b88bce5f 221 """
54f9ee45 222 return _gdi_.Colour___ne__(*args, **kwargs)
c9c7117a 223
e811c8ce 224 def Get(*args, **kwargs):
b88bce5f
RD
225 """
226 Get() -> (r, g, b)
227
228 Returns the RGB intensity values as a tuple.
229 """
54f9ee45 230 return _gdi_.Colour_Get(*args, **kwargs)
e811c8ce 231
b88bce5f
RD
232 def GetRGB(*args, **kwargs):
233 """
a95a7133 234 GetRGB(self) -> unsigned long
b88bce5f
RD
235
236 Return the colour as a packed RGB value
237 """
54f9ee45 238 return _gdi_.Colour_GetRGB(*args, **kwargs)
b88bce5f 239
41e2b43e 240 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
fc46b7f3
RD
241 def __str__(self): return str(self.Get(True))
242 def __repr__(self): return 'wx.Colour' + str(self.Get(True))
b39fe951
RD
243 def __len__(self): return len(self.Get())
244 def __getitem__(self, index): return self.Get()[index]
245 def __nonzero__(self): return self.IsOk()
74e96f3d 246 __safe_for_unpickling__ = True
fc46b7f3 247 def __reduce__(self): return (Colour, self.Get(True))
9df61a29 248
2bf58437
RD
249 Pixel = property(GetPixel,doc="See `GetPixel`")
250 RGB = property(GetRGB,SetRGB,doc="See `GetRGB` and `SetRGB`")
2131d850 251_gdi_.Colour_swigregister(Colour)
70551f47 252
d14a1e28 253def NamedColour(*args, **kwargs):
b88bce5f
RD
254 """
255 NamedColour(String colorName) -> Colour
256
41e2b43e
RD
257 Constructs a colour object using a colour name listed in
258 ``wx.TheColourDatabase``.
b88bce5f 259 """
54f9ee45 260 val = _gdi_.new_NamedColour(*args, **kwargs)
d14a1e28 261 return val
70551f47 262
d14a1e28 263def ColourRGB(*args, **kwargs):
b88bce5f
RD
264 """
265 ColourRGB(unsigned long colRGB) -> Colour
266
267 Constructs a colour from a packed RGB value.
268 """
54f9ee45 269 val = _gdi_.new_ColourRGB(*args, **kwargs)
d14a1e28 270 return val
70551f47 271
994141e6
RD
272Color = Colour
273NamedColor = NamedColour
274ColorRGB = ColourRGB
275
d14a1e28 276class Palette(GDIObject):
093d3ff1 277 """Proxy of C++ Palette class"""
0085ce49
RD
278 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
279 __repr__ = _swig_repr
280 def __init__(self, *args, **kwargs):
a95a7133 281 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
0085ce49
RD
282 _gdi_.Palette_swiginit(self,_gdi_.new_Palette(*args, **kwargs))
283 __swig_destroy__ = _gdi_.delete_Palette
284 __del__ = lambda self : None;
e811c8ce 285 def GetPixel(*args, **kwargs):
a95a7133 286 """GetPixel(self, byte red, byte green, byte blue) -> int"""
54f9ee45 287 return _gdi_.Palette_GetPixel(*args, **kwargs)
e811c8ce
RD
288
289 def GetRGB(*args, **kwargs):
d3b6e4ff 290 """GetRGB(self, int pixel) -> (R,G,B)"""
54f9ee45 291 return _gdi_.Palette_GetRGB(*args, **kwargs)
e811c8ce 292
5cbf236d
RD
293 def GetColoursCount(*args, **kwargs):
294 """GetColoursCount(self) -> int"""
295 return _gdi_.Palette_GetColoursCount(*args, **kwargs)
296
b39fe951
RD
297 def IsOk(*args, **kwargs):
298 """IsOk(self) -> bool"""
299 return _gdi_.Palette_IsOk(*args, **kwargs)
e811c8ce 300
b39fe951
RD
301 Ok = IsOk
302 def __nonzero__(self): return self.IsOk()
33d6fd3b 303 ColoursCount = property(GetColoursCount,doc="See `GetColoursCount`")
2131d850 304_gdi_.Palette_swigregister(Palette)
d14a1e28
RD
305
306#---------------------------------------------------------------------------
307
308class Pen(GDIObject):
093d3ff1 309 """Proxy of C++ Pen class"""
0085ce49
RD
310 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
311 __repr__ = _swig_repr
312 def __init__(self, *args, **kwargs):
a95a7133 313 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
0085ce49
RD
314 _gdi_.Pen_swiginit(self,_gdi_.new_Pen(*args, **kwargs))
315 __swig_destroy__ = _gdi_.delete_Pen
316 __del__ = lambda self : None;
e811c8ce 317 def GetCap(*args, **kwargs):
a95a7133 318 """GetCap(self) -> int"""
54f9ee45 319 return _gdi_.Pen_GetCap(*args, **kwargs)
e811c8ce
RD
320
321 def GetColour(*args, **kwargs):
a95a7133 322 """GetColour(self) -> Colour"""
54f9ee45 323 return _gdi_.Pen_GetColour(*args, **kwargs)
e811c8ce
RD
324
325 def GetJoin(*args, **kwargs):
a95a7133 326 """GetJoin(self) -> int"""
54f9ee45 327 return _gdi_.Pen_GetJoin(*args, **kwargs)
e811c8ce
RD
328
329 def GetStyle(*args, **kwargs):
a95a7133 330 """GetStyle(self) -> int"""
54f9ee45 331 return _gdi_.Pen_GetStyle(*args, **kwargs)
e811c8ce
RD
332
333 def GetWidth(*args, **kwargs):
a95a7133 334 """GetWidth(self) -> int"""
54f9ee45 335 return _gdi_.Pen_GetWidth(*args, **kwargs)
e811c8ce 336
b39fe951
RD
337 def IsOk(*args, **kwargs):
338 """IsOk(self) -> bool"""
339 return _gdi_.Pen_IsOk(*args, **kwargs)
e811c8ce 340
b39fe951 341 Ok = IsOk
e811c8ce 342 def SetCap(*args, **kwargs):
a95a7133 343 """SetCap(self, int cap_style)"""
54f9ee45 344 return _gdi_.Pen_SetCap(*args, **kwargs)
e811c8ce
RD
345
346 def SetColour(*args, **kwargs):
a95a7133 347 """SetColour(self, Colour colour)"""
54f9ee45 348 return _gdi_.Pen_SetColour(*args, **kwargs)
e811c8ce
RD
349
350 def SetJoin(*args, **kwargs):
a95a7133 351 """SetJoin(self, int join_style)"""
54f9ee45 352 return _gdi_.Pen_SetJoin(*args, **kwargs)
e811c8ce
RD
353
354 def SetStyle(*args, **kwargs):
a95a7133 355 """SetStyle(self, int style)"""
54f9ee45 356 return _gdi_.Pen_SetStyle(*args, **kwargs)
e811c8ce
RD
357
358 def SetWidth(*args, **kwargs):
a95a7133 359 """SetWidth(self, int width)"""
54f9ee45 360 return _gdi_.Pen_SetWidth(*args, **kwargs)
e811c8ce
RD
361
362 def SetDashes(*args, **kwargs):
093d3ff1 363 """SetDashes(self, int dashes)"""
54f9ee45 364 return _gdi_.Pen_SetDashes(*args, **kwargs)
e811c8ce
RD
365
366 def GetDashes(*args, **kwargs):
a95a7133 367 """GetDashes(self) -> PyObject"""
54f9ee45 368 return _gdi_.Pen_GetDashes(*args, **kwargs)
e811c8ce 369
66c033b4
RD
370 def _SetDashes(*args, **kwargs):
371 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
372 return _gdi_.Pen__SetDashes(*args, **kwargs)
373
374 def SetDashes(self, dashes):
375 """
376 Associate a list of dash lengths with the Pen.
377 """
378 self._SetDashes(self, dashes)
379
380 def GetDashCount(*args, **kwargs):
381 """GetDashCount(self) -> int"""
382 return _gdi_.Pen_GetDashCount(*args, **kwargs)
383
33d6fd3b 384 DashCount = property(GetDashCount,doc="See `GetDashCount`")
3adfb63b 385 def __eq__(*args, **kwargs):
a95a7133 386 """__eq__(self, Pen other) -> bool"""
54f9ee45 387 return _gdi_.Pen___eq__(*args, **kwargs)
3adfb63b 388
22faec7d 389 def __ne__(*args, **kwargs):
a95a7133 390 """__ne__(self, Pen other) -> bool"""
54f9ee45 391 return _gdi_.Pen___ne__(*args, **kwargs)
22faec7d 392
b39fe951 393 def __nonzero__(self): return self.IsOk()
33d6fd3b
RD
394 Cap = property(GetCap,SetCap,doc="See `GetCap` and `SetCap`")
395 Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
396 Dashes = property(GetDashes,SetDashes,doc="See `GetDashes` and `SetDashes`")
397 Join = property(GetJoin,SetJoin,doc="See `GetJoin` and `SetJoin`")
398 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
399 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
2131d850 400_gdi_.Pen_swigregister(Pen)
d14a1e28 401
66c033b4 402#---------------------------------------------------------------------------
e811c8ce 403
66c033b4
RD
404class Brush(GDIObject):
405 """
406 A brush is a drawing tool for filling in areas. It is used for
407 painting the background of rectangles, ellipses, etc. when drawing on
408 a `wx.DC`. It has a colour and a style.
0df68c9f 409 """
0085ce49
RD
410 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
411 __repr__ = _swig_repr
412 def __init__(self, *args, **kwargs):
0df68c9f 413 """
a95a7133 414 __init__(self, Colour colour, int style=SOLID) -> Brush
1e0c8722 415
f1b46404 416 Constructs a brush from a `wx.Colour` object and a style.
0df68c9f 417 """
0085ce49
RD
418 _gdi_.Brush_swiginit(self,_gdi_.new_Brush(*args, **kwargs))
419 __swig_destroy__ = _gdi_.delete_Brush
420 __del__ = lambda self : None;
e811c8ce 421 def SetColour(*args, **kwargs):
66c033b4
RD
422 """
423 SetColour(self, Colour col)
424
425 Set the brush's `wx.Colour`.
426 """
54f9ee45 427 return _gdi_.Brush_SetColour(*args, **kwargs)
e811c8ce
RD
428
429 def SetStyle(*args, **kwargs):
66c033b4
RD
430 """
431 SetStyle(self, int style)
432
433 Sets the style of the brush. See `__init__` for a listing of styles.
434 """
54f9ee45 435 return _gdi_.Brush_SetStyle(*args, **kwargs)
e811c8ce
RD
436
437 def SetStipple(*args, **kwargs):
66c033b4
RD
438 """
439 SetStipple(self, Bitmap stipple)
440
441 Sets the stipple `wx.Bitmap`.
442 """
54f9ee45 443 return _gdi_.Brush_SetStipple(*args, **kwargs)
e811c8ce
RD
444
445 def GetColour(*args, **kwargs):
66c033b4
RD
446 """
447 GetColour(self) -> Colour
448
449 Returns the `wx.Colour` of the brush.
450 """
54f9ee45 451 return _gdi_.Brush_GetColour(*args, **kwargs)
e811c8ce
RD
452
453 def GetStyle(*args, **kwargs):
66c033b4
RD
454 """
455 GetStyle(self) -> int
456
457 Returns the style of the brush. See `__init__` for a listing of
458 styles.
459 """
54f9ee45 460 return _gdi_.Brush_GetStyle(*args, **kwargs)
e811c8ce
RD
461
462 def GetStipple(*args, **kwargs):
66c033b4
RD
463 """
464 GetStipple(self) -> Bitmap
465
466 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
467 have a wx.STIPPLE style, then the return value may be non-None but an
468 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
469 """
54f9ee45 470 return _gdi_.Brush_GetStipple(*args, **kwargs)
e811c8ce 471
f78cc896
RD
472 def IsHatch(*args, **kwargs):
473 """
474 IsHatch(self) -> bool
475
476 Is the current style a hatch type?
477 """
478 return _gdi_.Brush_IsHatch(*args, **kwargs)
479
b39fe951 480 def IsOk(*args, **kwargs):
66c033b4 481 """
b39fe951 482 IsOk(self) -> bool
66c033b4
RD
483
484 Returns True if the brush is initialised and valid.
485 """
b39fe951 486 return _gdi_.Brush_IsOk(*args, **kwargs)
e811c8ce 487
b39fe951
RD
488 Ok = IsOk
489 def __nonzero__(self): return self.IsOk()
2bf58437
RD
490 Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
491 Stipple = property(GetStipple,SetStipple,doc="See `GetStipple` and `SetStipple`")
492 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
2131d850 493_gdi_.Brush_swigregister(Brush)
d14a1e28 494
d04418a7
RD
495def BrushFromBitmap(*args, **kwargs):
496 """
497 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
498
499 Constructs a stippled brush using a bitmap.
500 """
501 val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
d04418a7
RD
502 return val
503
d14a1e28 504class Bitmap(GDIObject):
66c033b4
RD
505 """
506 The wx.Bitmap class encapsulates the concept of a platform-dependent
507 bitmap. It can be either monochrome or colour, and either loaded from
508 a file or created dynamically. A bitmap can be selected into a memory
509 device context (instance of `wx.MemoryDC`). This enables the bitmap to
510 be copied to a window or memory device context using `wx.DC.Blit`, or
511 to be used as a drawing surface.
66c033b4 512 """
0085ce49
RD
513 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
514 __repr__ = _swig_repr
515 def __init__(self, *args, **kwargs):
0df68c9f 516 """
a95a7133 517 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
1e0c8722 518
0df68c9f
RD
519 Loads a bitmap from a file.
520 """
0085ce49
RD
521 _gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
522 __swig_destroy__ = _gdi_.delete_Bitmap
523 __del__ = lambda self : None;
b39fe951
RD
524 def IsOk(*args, **kwargs):
525 """IsOk(self) -> bool"""
526 return _gdi_.Bitmap_IsOk(*args, **kwargs)
e811c8ce 527
b39fe951 528 Ok = IsOk
e811c8ce 529 def GetWidth(*args, **kwargs):
0df68c9f 530 """
a95a7133 531 GetWidth(self) -> int
1e0c8722 532
0df68c9f
RD
533 Gets the width of the bitmap in pixels.
534 """
54f9ee45 535 return _gdi_.Bitmap_GetWidth(*args, **kwargs)
e811c8ce
RD
536
537 def GetHeight(*args, **kwargs):
0df68c9f 538 """
a95a7133 539 GetHeight(self) -> int
1e0c8722 540
0df68c9f
RD
541 Gets the height of the bitmap in pixels.
542 """
54f9ee45 543 return _gdi_.Bitmap_GetHeight(*args, **kwargs)
e811c8ce
RD
544
545 def GetDepth(*args, **kwargs):
0df68c9f 546 """
a95a7133 547 GetDepth(self) -> int
1e0c8722 548
0df68c9f
RD
549 Gets the colour depth of the bitmap. A value of 1 indicates a
550 monochrome bitmap.
551 """
54f9ee45 552 return _gdi_.Bitmap_GetDepth(*args, **kwargs)
e811c8ce 553
b2df227b
RD
554 def GetSize(*args, **kwargs):
555 """
a95a7133 556 GetSize(self) -> Size
b2df227b
RD
557
558 Get the size of the bitmap.
559 """
54f9ee45 560 return _gdi_.Bitmap_GetSize(*args, **kwargs)
b2df227b 561
e811c8ce 562 def ConvertToImage(*args, **kwargs):
0df68c9f 563 """
a95a7133 564 ConvertToImage(self) -> Image
1e0c8722 565
66c033b4
RD
566 Creates a platform-independent image from a platform-dependent
567 bitmap. This preserves mask information so that bitmaps and images can
568 be converted back and forth without loss in that respect.
0df68c9f 569 """
54f9ee45 570 return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
e811c8ce
RD
571
572 def GetMask(*args, **kwargs):
0df68c9f 573 """
a95a7133 574 GetMask(self) -> Mask
1e0c8722 575
66c033b4
RD
576 Gets the associated mask (if any) which may have been loaded from a
577 file or explpicitly set for the bitmap.
578
579 :see: `SetMask`, `wx.Mask`
580
0df68c9f 581 """
54f9ee45 582 return _gdi_.Bitmap_GetMask(*args, **kwargs)
e811c8ce
RD
583
584 def SetMask(*args, **kwargs):
0df68c9f 585 """
a95a7133 586 SetMask(self, Mask mask)
1e0c8722 587
0df68c9f 588 Sets the mask for this bitmap.
66c033b4
RD
589
590 :see: `GetMask`, `wx.Mask`
591
0df68c9f 592 """
54f9ee45 593 return _gdi_.Bitmap_SetMask(*args, **kwargs)
e811c8ce
RD
594
595 def SetMaskColour(*args, **kwargs):
0df68c9f 596 """
a95a7133 597 SetMaskColour(self, Colour colour)
1e0c8722 598
0df68c9f
RD
599 Create a Mask based on a specified colour in the Bitmap.
600 """
54f9ee45 601 return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
e811c8ce
RD
602
603 def GetSubBitmap(*args, **kwargs):
0df68c9f 604 """
a95a7133 605 GetSubBitmap(self, Rect rect) -> Bitmap
1e0c8722 606
66c033b4
RD
607 Returns a sub-bitmap of the current one as long as the rect belongs
608 entirely to the bitmap. This function preserves bit depth and mask
609 information.
0df68c9f 610 """
54f9ee45 611 return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
e811c8ce
RD
612
613 def SaveFile(*args, **kwargs):
0df68c9f 614 """
66c033b4 615 SaveFile(self, String name, int type, Palette palette=None) -> bool
1e0c8722 616
66c033b4
RD
617 Saves a bitmap in the named file. See `__init__` for a description of
618 the ``type`` parameter.
0df68c9f 619 """
54f9ee45 620 return _gdi_.Bitmap_SaveFile(*args, **kwargs)
e811c8ce
RD
621
622 def LoadFile(*args, **kwargs):
0df68c9f 623 """
a95a7133 624 LoadFile(self, String name, int type) -> bool
1e0c8722 625
66c033b4
RD
626 Loads a bitmap from a file. See `__init__` for a description of the
627 ``type`` parameter.
0df68c9f 628 """
54f9ee45 629 return _gdi_.Bitmap_LoadFile(*args, **kwargs)
e811c8ce 630
d3b6e4ff
RD
631 def GetPalette(*args, **kwargs):
632 """GetPalette(self) -> Palette"""
633 return _gdi_.Bitmap_GetPalette(*args, **kwargs)
634
e811c8ce 635 def CopyFromIcon(*args, **kwargs):
a95a7133 636 """CopyFromIcon(self, Icon icon) -> bool"""
54f9ee45 637 return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
e811c8ce
RD
638
639 def SetHeight(*args, **kwargs):
0df68c9f 640 """
a95a7133 641 SetHeight(self, int height)
1e0c8722 642
66c033b4 643 Set the height property (does not affect the existing bitmap data).
0df68c9f 644 """
54f9ee45 645 return _gdi_.Bitmap_SetHeight(*args, **kwargs)
e811c8ce
RD
646
647 def SetWidth(*args, **kwargs):
0df68c9f 648 """
a95a7133 649 SetWidth(self, int width)
1e0c8722 650
66c033b4 651 Set the width property (does not affect the existing bitmap data).
0df68c9f 652 """
54f9ee45 653 return _gdi_.Bitmap_SetWidth(*args, **kwargs)
e811c8ce
RD
654
655 def SetDepth(*args, **kwargs):
0df68c9f 656 """
a95a7133 657 SetDepth(self, int depth)
1e0c8722 658
66c033b4 659 Set the depth property (does not affect the existing bitmap data).
0df68c9f 660 """
54f9ee45 661 return _gdi_.Bitmap_SetDepth(*args, **kwargs)
e811c8ce 662
b2df227b
RD
663 def SetSize(*args, **kwargs):
664 """
a95a7133 665 SetSize(self, Size size)
b2df227b 666
66c033b4 667 Set the bitmap size (does not affect the existing bitmap data).
b2df227b 668 """
54f9ee45 669 return _gdi_.Bitmap_SetSize(*args, **kwargs)
b2df227b 670
b39fe951 671 def __nonzero__(self): return self.IsOk()
4276dc52 672 def __eq__(*args, **kwargs):
a95a7133 673 """__eq__(self, Bitmap other) -> bool"""
54f9ee45 674 return _gdi_.Bitmap___eq__(*args, **kwargs)
4276dc52
RD
675
676 def __ne__(*args, **kwargs):
a95a7133 677 """__ne__(self, Bitmap other) -> bool"""
54f9ee45 678 return _gdi_.Bitmap___ne__(*args, **kwargs)
4276dc52 679
2bf58437
RD
680 Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
681 Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
682 Mask = property(GetMask,SetMask,doc="See `GetMask` and `SetMask`")
683 Palette = property(GetPalette,doc="See `GetPalette`")
684 Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`")
685 SubBitmap = property(GetSubBitmap,doc="See `GetSubBitmap`")
686 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
2131d850 687_gdi_.Bitmap_swigregister(Bitmap)
70551f47 688
66c033b4
RD
689def EmptyBitmap(*args, **kwargs):
690 """
691 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
692
693 Creates a new bitmap of the given size. A depth of -1 indicates the
694 depth of the current screen or visual. Some platforms only support 1
0085ce49 695 for monochrome and -1 for the current display depth.
66c033b4
RD
696 """
697 val = _gdi_.new_EmptyBitmap(*args, **kwargs)
66c033b4
RD
698 return val
699
d14a1e28 700def BitmapFromIcon(*args, **kwargs):
0df68c9f
RD
701 """
702 BitmapFromIcon(Icon icon) -> Bitmap
1e0c8722 703
66c033b4 704 Create a new bitmap from a `wx.Icon` object.
0df68c9f 705 """
54f9ee45 706 val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
d14a1e28 707 return val
70551f47 708
d14a1e28 709def BitmapFromImage(*args, **kwargs):
0df68c9f
RD
710 """
711 BitmapFromImage(Image image, int depth=-1) -> Bitmap
712
66c033b4
RD
713 Creates bitmap object from a `wx.Image`. This has to be done to
714 actually display a `wx.Image` as you cannot draw an image directly on
715 a window. The resulting bitmap will use the provided colour depth (or
716 that of the current screen colour depth if depth is -1) which entails
717 that a colour reduction may have to take place.
0df68c9f 718 """
54f9ee45 719 val = _gdi_.new_BitmapFromImage(*args, **kwargs)
d14a1e28 720 return val
3ef86e32 721
d14a1e28 722def BitmapFromXPMData(*args, **kwargs):
0df68c9f
RD
723 """
724 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
1e0c8722 725
0df68c9f
RD
726 Construct a Bitmap from a list of strings formatted as XPM data.
727 """
54f9ee45 728 val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
d14a1e28 729 return val
3ef86e32 730
d14a1e28 731def BitmapFromBits(*args, **kwargs):
0df68c9f
RD
732 """
733 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
734
66c033b4
RD
735 Creates a bitmap from an array of bits. You should only use this
736 function for monochrome bitmaps (depth 1) in portable programs: in
737 this case the bits parameter should contain an XBM image. For other
738 bit depths, the behaviour is platform dependent.
0df68c9f 739 """
54f9ee45 740 val = _gdi_.new_BitmapFromBits(*args, **kwargs)
d14a1e28 741 return val
3ef86e32 742
fc46b7f3
RD
743
744def _BitmapFromBufferAlpha(*args, **kwargs):
745 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
746 return _gdi_._BitmapFromBufferAlpha(*args, **kwargs)
747
748def _BitmapFromBuffer(*args, **kwargs):
749 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
750 return _gdi_._BitmapFromBuffer(*args, **kwargs)
751def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
752 """
753 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
eec1c382
RD
754 parameter must be a Python object that implements the buffer
755 interface, such as a string, array, etc. The dataBuffer object is
756 expected to contain a series of RGB bytes and be width*height*3
757 bytes long. A buffer object can optionally be supplied for the
758 image's alpha channel data, and it is expected to be width*height
759 bytes long. On Windows the RGB values are 'premultiplied' by the
760 alpha values. (The other platforms do the multiplication
761 themselves.)
762
763 Unlike `wx.ImageFromBuffer` the bitmap created with this function
764 does not share the memory buffer with the buffer object. This is
765 because the native pixel buffer format varies on different
766 platforms, and so instead an efficient as possible copy of the
767 data is made from the buffer objects to the bitmap's native pixel
768 buffer. For direct access to a bitmap's pixel buffer see
769 `wx.NativePixelData` and `wx.AlphaPixelData`.
fc46b7f3
RD
770
771 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
772 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
773 """
fc46b7f3
RD
774 if alphaBuffer is not None:
775 return _gdi_._BitmapFromBufferAlpha(width, height, dataBuffer, alphaBuffer)
776 else:
777 return _gdi_._BitmapFromBuffer(width, height, dataBuffer)
778
779
780def _BitmapFromBufferRGBA(*args, **kwargs):
781 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
782 return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)
783def BitmapFromBufferRGBA(width, height, dataBuffer):
784 """
785 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
eec1c382
RD
786 parameter must be a Python object that implements the buffer
787 interface, such as a string, array, etc. The dataBuffer object is
788 expected to contain a series of RGBA bytes (red, green, blue and
789 alpha) and be width*height*4 bytes long. On Windows the RGB
790 values are 'premultiplied' by the alpha values. (The other
791 platforms do the multiplication themselves.)
792
793 Unlike `wx.ImageFromBuffer` the bitmap created with this function
794 does not share the memory buffer with the buffer object. This is
795 because the native pixel buffer format varies on different
796 platforms, and so instead an efficient as possible copy of the
797 data is made from the buffer object to the bitmap's native pixel
798 buffer. For direct access to a bitmap's pixel buffer see
799 `wx.NativePixelData` and `wx.AlphaPixelData`.
fc46b7f3
RD
800
801 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
802 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
803 """
fc46b7f3
RD
804 return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
805
806class PixelDataBase(object):
807 """Proxy of C++ PixelDataBase class"""
808 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
809 def __init__(self): raise AttributeError, "No constructor defined"
810 __repr__ = _swig_repr
811 def GetOrigin(*args, **kwargs):
812 """GetOrigin(self) -> Point"""
813 return _gdi_.PixelDataBase_GetOrigin(*args, **kwargs)
814
815 def GetWidth(*args, **kwargs):
816 """GetWidth(self) -> int"""
817 return _gdi_.PixelDataBase_GetWidth(*args, **kwargs)
818
819 def GetHeight(*args, **kwargs):
820 """GetHeight(self) -> int"""
821 return _gdi_.PixelDataBase_GetHeight(*args, **kwargs)
822
823 def GetSize(*args, **kwargs):
824 """GetSize(self) -> Size"""
825 return _gdi_.PixelDataBase_GetSize(*args, **kwargs)
826
827 def GetRowStride(*args, **kwargs):
828 """GetRowStride(self) -> int"""
829 return _gdi_.PixelDataBase_GetRowStride(*args, **kwargs)
830
33d6fd3b
RD
831 Height = property(GetHeight,doc="See `GetHeight`")
832 Origin = property(GetOrigin,doc="See `GetOrigin`")
833 RowStride = property(GetRowStride,doc="See `GetRowStride`")
834 Size = property(GetSize,doc="See `GetSize`")
835 Width = property(GetWidth,doc="See `GetWidth`")
fc46b7f3
RD
836_gdi_.PixelDataBase_swigregister(PixelDataBase)
837
838class NativePixelData(PixelDataBase):
839 """Proxy of C++ NativePixelData class"""
840 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
841 __repr__ = _swig_repr
842 def __init__(self, *args):
843 """
844 __init__(self, Bitmap bmp) -> NativePixelData
845 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
846 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
847 """
848 _gdi_.NativePixelData_swiginit(self,_gdi_.new_NativePixelData(*args))
849 __swig_destroy__ = _gdi_.delete_NativePixelData
850 __del__ = lambda self : None;
851 def GetPixels(*args, **kwargs):
852 """GetPixels(self) -> NativePixelData_Accessor"""
853 return _gdi_.NativePixelData_GetPixels(*args, **kwargs)
854
855 def UseAlpha(*args, **kwargs):
856 """UseAlpha(self)"""
857 return _gdi_.NativePixelData_UseAlpha(*args, **kwargs)
858
859 def __nonzero__(*args, **kwargs):
860 """__nonzero__(self) -> bool"""
861 return _gdi_.NativePixelData___nonzero__(*args, **kwargs)
862
863 def __iter__(self):
195a89b4
RD
864 """
865 Create and return an iterator object for this pixel data
866 object. (It's really a generator but I won't tell if you
867 don't tell.)
868 """
869 width = self.GetWidth()
870 height = self.GetHeight()
871 pixels = self.GetPixels()
872
873
874
875
876 class PixelFacade(object):
fc46b7f3 877 def Get(self):
195a89b4
RD
878 return pixels.Get()
879 def Set(self, *args, **kw):
880 return pixels.Set(*args, **kw)
881 def __str__(self):
882 return str(self.Get())
883 def __repr__(self):
884 return 'pixel(%d,%d): %s' % (x,y,self.Get())
885 X = property(lambda self: x)
886 Y = property(lambda self: y)
887
888 pf = PixelFacade()
889 for y in xrange(height):
890 for x in xrange(width):
891
892
893
894 yield pf
895 pixels.nextPixel()
896 pixels.MoveTo(self, 0, y)
fc46b7f3 897
2bf58437 898 Pixels = property(GetPixels,doc="See `GetPixels`")
fc46b7f3
RD
899_gdi_.NativePixelData_swigregister(NativePixelData)
900
901class NativePixelData_Accessor(object):
902 """Proxy of C++ NativePixelData_Accessor class"""
903 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
904 __repr__ = _swig_repr
905 def __init__(self, *args):
906 """
907 __init__(self, NativePixelData data) -> NativePixelData_Accessor
908 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
909 __init__(self) -> NativePixelData_Accessor
910 """
911 _gdi_.NativePixelData_Accessor_swiginit(self,_gdi_.new_NativePixelData_Accessor(*args))
912 __swig_destroy__ = _gdi_.delete_NativePixelData_Accessor
913 __del__ = lambda self : None;
914 def Reset(*args, **kwargs):
915 """Reset(self, NativePixelData data)"""
916 return _gdi_.NativePixelData_Accessor_Reset(*args, **kwargs)
917
918 def IsOk(*args, **kwargs):
919 """IsOk(self) -> bool"""
920 return _gdi_.NativePixelData_Accessor_IsOk(*args, **kwargs)
921
922 def nextPixel(*args, **kwargs):
923 """nextPixel(self)"""
924 return _gdi_.NativePixelData_Accessor_nextPixel(*args, **kwargs)
925
926 def Offset(*args, **kwargs):
927 """Offset(self, NativePixelData data, int x, int y)"""
928 return _gdi_.NativePixelData_Accessor_Offset(*args, **kwargs)
929
930 def OffsetX(*args, **kwargs):
931 """OffsetX(self, NativePixelData data, int x)"""
932 return _gdi_.NativePixelData_Accessor_OffsetX(*args, **kwargs)
933
934 def OffsetY(*args, **kwargs):
935 """OffsetY(self, NativePixelData data, int y)"""
936 return _gdi_.NativePixelData_Accessor_OffsetY(*args, **kwargs)
937
938 def MoveTo(*args, **kwargs):
939 """MoveTo(self, NativePixelData data, int x, int y)"""
940 return _gdi_.NativePixelData_Accessor_MoveTo(*args, **kwargs)
941
942 def Set(*args, **kwargs):
943 """Set(self, byte red, byte green, byte blue)"""
944 return _gdi_.NativePixelData_Accessor_Set(*args, **kwargs)
945
946 def Get(*args, **kwargs):
947 """Get(self) -> PyObject"""
948 return _gdi_.NativePixelData_Accessor_Get(*args, **kwargs)
949
950_gdi_.NativePixelData_Accessor_swigregister(NativePixelData_Accessor)
951
952class AlphaPixelData(PixelDataBase):
953 """Proxy of C++ AlphaPixelData class"""
954 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
955 __repr__ = _swig_repr
956 def __init__(self, *args):
957 """
958 __init__(self, Bitmap bmp) -> AlphaPixelData
959 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
960 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
961 """
962 _gdi_.AlphaPixelData_swiginit(self,_gdi_.new_AlphaPixelData(*args))
963 self.UseAlpha()
964
965 __swig_destroy__ = _gdi_.delete_AlphaPixelData
966 __del__ = lambda self : None;
967 def GetPixels(*args, **kwargs):
968 """GetPixels(self) -> AlphaPixelData_Accessor"""
969 return _gdi_.AlphaPixelData_GetPixels(*args, **kwargs)
970
971 def UseAlpha(*args, **kwargs):
972 """UseAlpha(self)"""
973 return _gdi_.AlphaPixelData_UseAlpha(*args, **kwargs)
974
975 def __nonzero__(*args, **kwargs):
976 """__nonzero__(self) -> bool"""
977 return _gdi_.AlphaPixelData___nonzero__(*args, **kwargs)
978
979 def __iter__(self):
195a89b4
RD
980 """
981 Create and return an iterator object for this pixel data
982 object. (It's really a generator but I won't tell if you
983 don't tell.)
984 """
985 width = self.GetWidth()
986 height = self.GetHeight()
987 pixels = self.GetPixels()
988
989
990
991
992 class PixelFacade(object):
fc46b7f3 993 def Get(self):
195a89b4
RD
994 return pixels.Get()
995 def Set(self, *args, **kw):
996 return pixels.Set(*args, **kw)
997 def __str__(self):
998 return str(self.Get())
999 def __repr__(self):
1000 return 'pixel(%d,%d): %s' % (x,y,self.Get())
1001 X = property(lambda self: x)
1002 Y = property(lambda self: y)
1003
1004 pf = PixelFacade()
1005 for y in xrange(height):
1006 for x in xrange(width):
1007
1008
1009
1010 yield pf
1011 pixels.nextPixel()
1012 pixels.MoveTo(self, 0, y)
fc46b7f3 1013
2bf58437 1014 Pixels = property(GetPixels,doc="See `GetPixels`")
fc46b7f3
RD
1015_gdi_.AlphaPixelData_swigregister(AlphaPixelData)
1016
1017class AlphaPixelData_Accessor(object):
1018 """Proxy of C++ AlphaPixelData_Accessor class"""
1019 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1020 __repr__ = _swig_repr
1021 def __init__(self, *args):
1022 """
1023 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1024 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1025 __init__(self) -> AlphaPixelData_Accessor
1026 """
1027 _gdi_.AlphaPixelData_Accessor_swiginit(self,_gdi_.new_AlphaPixelData_Accessor(*args))
1028 __swig_destroy__ = _gdi_.delete_AlphaPixelData_Accessor
1029 __del__ = lambda self : None;
1030 def Reset(*args, **kwargs):
1031 """Reset(self, AlphaPixelData data)"""
1032 return _gdi_.AlphaPixelData_Accessor_Reset(*args, **kwargs)
1033
1034 def IsOk(*args, **kwargs):
1035 """IsOk(self) -> bool"""
1036 return _gdi_.AlphaPixelData_Accessor_IsOk(*args, **kwargs)
1037
1038 def nextPixel(*args, **kwargs):
1039 """nextPixel(self)"""
1040 return _gdi_.AlphaPixelData_Accessor_nextPixel(*args, **kwargs)
1041
1042 def Offset(*args, **kwargs):
1043 """Offset(self, AlphaPixelData data, int x, int y)"""
1044 return _gdi_.AlphaPixelData_Accessor_Offset(*args, **kwargs)
1045
1046 def OffsetX(*args, **kwargs):
1047 """OffsetX(self, AlphaPixelData data, int x)"""
1048 return _gdi_.AlphaPixelData_Accessor_OffsetX(*args, **kwargs)
1049
1050 def OffsetY(*args, **kwargs):
1051 """OffsetY(self, AlphaPixelData data, int y)"""
1052 return _gdi_.AlphaPixelData_Accessor_OffsetY(*args, **kwargs)
1053
1054 def MoveTo(*args, **kwargs):
1055 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1056 return _gdi_.AlphaPixelData_Accessor_MoveTo(*args, **kwargs)
1057
1058 def Set(*args, **kwargs):
1059 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1060 return _gdi_.AlphaPixelData_Accessor_Set(*args, **kwargs)
1061
1062 def Get(*args, **kwargs):
1063 """Get(self) -> PyObject"""
1064 return _gdi_.AlphaPixelData_Accessor_Get(*args, **kwargs)
1065
1066_gdi_.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor)
1067
66c033b4 1068class Mask(_core.Object):
b2df227b 1069 """
66c033b4
RD
1070 This class encapsulates a monochrome mask bitmap, where the masked
1071 area is black and the unmasked area is white. When associated with a
1072 bitmap and drawn in a device context, the unmasked area of the bitmap
1073 will be drawn, and the masked area will not be drawn.
b2df227b 1074
66c033b4
RD
1075 A mask may be associated with a `wx.Bitmap`. It is used in
1076 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1077 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1078 mask.
0df68c9f 1079 """
0085ce49
RD
1080 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1081 __repr__ = _swig_repr
1082 def __init__(self, *args, **kwargs):
0df68c9f 1083 """
a95a7133 1084 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1e0c8722 1085
66c033b4
RD
1086 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1087 that indicates the transparent portions of the mask. In other words,
1088 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1089 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1090 passed then BLACK is used.
1091
1092 :see: `wx.Bitmap`, `wx.Colour`
0df68c9f 1093 """
0085ce49
RD
1094 _gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs))
1095 __swig_destroy__ = _gdi_.delete_Mask
1096 __del__ = lambda self : None;
2131d850 1097_gdi_.Mask_swigregister(Mask)
d14a1e28 1098
66c033b4 1099MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
d14a1e28 1100class Icon(GDIObject):
093d3ff1 1101 """Proxy of C++ Icon class"""
0085ce49
RD
1102 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1103 __repr__ = _swig_repr
1104 def __init__(self, *args, **kwargs):
a95a7133 1105 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
0085ce49
RD
1106 _gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
1107 __swig_destroy__ = _gdi_.delete_Icon
1108 __del__ = lambda self : None;
e811c8ce 1109 def LoadFile(*args, **kwargs):
a95a7133 1110 """LoadFile(self, String name, int type) -> bool"""
54f9ee45 1111 return _gdi_.Icon_LoadFile(*args, **kwargs)
e811c8ce 1112
b39fe951
RD
1113 def IsOk(*args, **kwargs):
1114 """IsOk(self) -> bool"""
1115 return _gdi_.Icon_IsOk(*args, **kwargs)
e811c8ce 1116
b39fe951 1117 Ok = IsOk
e811c8ce 1118 def GetWidth(*args, **kwargs):
a95a7133 1119 """GetWidth(self) -> int"""
54f9ee45 1120 return _gdi_.Icon_GetWidth(*args, **kwargs)
e811c8ce
RD
1121
1122 def GetHeight(*args, **kwargs):
a95a7133 1123 """GetHeight(self) -> int"""
54f9ee45 1124 return _gdi_.Icon_GetHeight(*args, **kwargs)
e811c8ce
RD
1125
1126 def GetDepth(*args, **kwargs):
a95a7133 1127 """GetDepth(self) -> int"""
54f9ee45 1128 return _gdi_.Icon_GetDepth(*args, **kwargs)
e811c8ce
RD
1129
1130 def SetWidth(*args, **kwargs):
a95a7133 1131 """SetWidth(self, int w)"""
54f9ee45 1132 return _gdi_.Icon_SetWidth(*args, **kwargs)
e811c8ce
RD
1133
1134 def SetHeight(*args, **kwargs):
a95a7133 1135 """SetHeight(self, int h)"""
54f9ee45 1136 return _gdi_.Icon_SetHeight(*args, **kwargs)
e811c8ce
RD
1137
1138 def SetDepth(*args, **kwargs):
a95a7133 1139 """SetDepth(self, int d)"""
54f9ee45 1140 return _gdi_.Icon_SetDepth(*args, **kwargs)
e811c8ce
RD
1141
1142 def CopyFromBitmap(*args, **kwargs):
a95a7133 1143 """CopyFromBitmap(self, Bitmap bmp)"""
54f9ee45 1144 return _gdi_.Icon_CopyFromBitmap(*args, **kwargs)
e811c8ce 1145
b39fe951 1146 def __nonzero__(self): return self.IsOk()
97ab0f6a
RD
1147 Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
1148 Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
1149 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
2131d850 1150_gdi_.Icon_swigregister(Icon)
059a841c 1151
d14a1e28 1152def EmptyIcon(*args, **kwargs):
e811c8ce 1153 """EmptyIcon() -> Icon"""
54f9ee45 1154 val = _gdi_.new_EmptyIcon(*args, **kwargs)
d14a1e28 1155 return val
059a841c 1156
d14a1e28 1157def IconFromLocation(*args, **kwargs):
e811c8ce 1158 """IconFromLocation(IconLocation loc) -> Icon"""
54f9ee45 1159 val = _gdi_.new_IconFromLocation(*args, **kwargs)
a323d3bd 1160 return val
059a841c 1161
d14a1e28 1162def IconFromBitmap(*args, **kwargs):
e811c8ce 1163 """IconFromBitmap(Bitmap bmp) -> Icon"""
54f9ee45 1164 val = _gdi_.new_IconFromBitmap(*args, **kwargs)
a323d3bd 1165 return val
059a841c 1166
d14a1e28 1167def IconFromXPMData(*args, **kwargs):
e811c8ce 1168 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
54f9ee45 1169 val = _gdi_.new_IconFromXPMData(*args, **kwargs)
d14a1e28 1170 return val
059a841c 1171
d14a1e28 1172class IconLocation(object):
093d3ff1 1173 """Proxy of C++ IconLocation class"""
0085ce49
RD
1174 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1175 __repr__ = _swig_repr
1176 def __init__(self, *args, **kwargs):
a95a7133 1177 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
0085ce49
RD
1178 _gdi_.IconLocation_swiginit(self,_gdi_.new_IconLocation(*args, **kwargs))
1179 __swig_destroy__ = _gdi_.delete_IconLocation
1180 __del__ = lambda self : None;
e811c8ce 1181 def IsOk(*args, **kwargs):
a95a7133 1182 """IsOk(self) -> bool"""
54f9ee45 1183 return _gdi_.IconLocation_IsOk(*args, **kwargs)
e811c8ce 1184
b39fe951 1185 def __nonzero__(self): return self.IsOk()
e811c8ce 1186 def SetFileName(*args, **kwargs):
a95a7133 1187 """SetFileName(self, String filename)"""
54f9ee45 1188 return _gdi_.IconLocation_SetFileName(*args, **kwargs)
e811c8ce
RD
1189
1190 def GetFileName(*args, **kwargs):
a95a7133 1191 """GetFileName(self) -> String"""
54f9ee45 1192 return _gdi_.IconLocation_GetFileName(*args, **kwargs)
e811c8ce
RD
1193
1194 def SetIndex(*args, **kwargs):
a95a7133 1195 """SetIndex(self, int num)"""
54f9ee45 1196 return _gdi_.IconLocation_SetIndex(*args, **kwargs)
e811c8ce
RD
1197
1198 def GetIndex(*args, **kwargs):
a95a7133 1199 """GetIndex(self) -> int"""
54f9ee45 1200 return _gdi_.IconLocation_GetIndex(*args, **kwargs)
e811c8ce 1201
97ab0f6a
RD
1202 FileName = property(GetFileName,SetFileName,doc="See `GetFileName` and `SetFileName`")
1203 Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`")
2131d850 1204_gdi_.IconLocation_swigregister(IconLocation)
d14a1e28
RD
1205
1206class IconBundle(object):
093d3ff1 1207 """Proxy of C++ IconBundle class"""
0085ce49
RD
1208 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1209 __repr__ = _swig_repr
1210 def __init__(self, *args, **kwargs):
a95a7133 1211 """__init__(self) -> IconBundle"""
0085ce49
RD
1212 _gdi_.IconBundle_swiginit(self,_gdi_.new_IconBundle(*args, **kwargs))
1213 __swig_destroy__ = _gdi_.delete_IconBundle
1214 __del__ = lambda self : None;
e811c8ce 1215 def AddIcon(*args, **kwargs):
a95a7133 1216 """AddIcon(self, Icon icon)"""
54f9ee45 1217 return _gdi_.IconBundle_AddIcon(*args, **kwargs)
e811c8ce
RD
1218
1219 def AddIconFromFile(*args, **kwargs):
a95a7133 1220 """AddIconFromFile(self, String file, long type)"""
54f9ee45 1221 return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs)
e811c8ce
RD
1222
1223 def GetIcon(*args, **kwargs):
a95a7133 1224 """GetIcon(self, Size size) -> Icon"""
54f9ee45 1225 return _gdi_.IconBundle_GetIcon(*args, **kwargs)
e811c8ce 1226
97ab0f6a 1227 Icon = property(GetIcon,doc="See `GetIcon`")
2131d850 1228_gdi_.IconBundle_swigregister(IconBundle)
5e40f9dd 1229
d14a1e28 1230def IconBundleFromFile(*args, **kwargs):
196addbf 1231 """IconBundleFromFile(String file, long type) -> IconBundle"""
54f9ee45 1232 val = _gdi_.new_IconBundleFromFile(*args, **kwargs)
d14a1e28 1233 return val
5e40f9dd 1234
d14a1e28 1235def IconBundleFromIcon(*args, **kwargs):
e811c8ce 1236 """IconBundleFromIcon(Icon icon) -> IconBundle"""
54f9ee45 1237 val = _gdi_.new_IconBundleFromIcon(*args, **kwargs)
d14a1e28 1238 return val
5e40f9dd 1239
d14a1e28 1240class Cursor(GDIObject):
15afbcd0 1241 """
41e2b43e
RD
1242 A cursor is a small bitmap usually used for denoting where the mouse
1243 pointer is, with a picture that might indicate the interpretation of a
1244 mouse click.
15afbcd0
RD
1245
1246 A single cursor object may be used in many windows (any subwindow
41e2b43e
RD
1247 type). The wxWindows convention is to set the cursor for a window, as
1248 in X, rather than to set it globally as in MS Windows, although a
1249 global `wx.SetCursor` function is also available for use on MS Windows.
1250
15afbcd0 1251 """
0085ce49
RD
1252 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1253 __repr__ = _swig_repr
1254 def __init__(self, *args, **kwargs):
15afbcd0 1255 """
a95a7133 1256 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
15afbcd0
RD
1257
1258 Construct a Cursor from a file. Specify the type of file using
7557b9b5 1259 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
41e2b43e 1260 file.
15afbcd0 1261 """
0085ce49
RD
1262 _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
1263 __swig_destroy__ = _gdi_.delete_Cursor
1264 __del__ = lambda self : None;
b39fe951
RD
1265 def IsOk(*args, **kwargs):
1266 """IsOk(self) -> bool"""
1267 return _gdi_.Cursor_IsOk(*args, **kwargs)
e811c8ce 1268
b39fe951
RD
1269 Ok = IsOk
1270 def __nonzero__(self): return self.IsOk()
2131d850 1271_gdi_.Cursor_swigregister(Cursor)
70551f47 1272
d14a1e28 1273def StockCursor(*args, **kwargs):
15afbcd0
RD
1274 """
1275 StockCursor(int id) -> Cursor
1276
41e2b43e 1277 Create a cursor using one of the stock cursors. Note that not all
7557b9b5 1278 stock cursors are available on all platforms.
15afbcd0 1279 """
54f9ee45 1280 val = _gdi_.new_StockCursor(*args, **kwargs)
d14a1e28 1281 return val
70551f47 1282
d14a1e28 1283def CursorFromImage(*args, **kwargs):
0df68c9f 1284 """
15afbcd0
RD
1285 CursorFromImage(Image image) -> Cursor
1286
7557b9b5 1287 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
53aa7709 1288 for setting the transparent portions of the cursor.
0df68c9f 1289 """
54f9ee45 1290 val = _gdi_.new_CursorFromImage(*args, **kwargs)
d14a1e28 1291 return val
70551f47 1292
d14a1e28
RD
1293#---------------------------------------------------------------------------
1294
54f9ee45
RD
1295OutRegion = _gdi_.OutRegion
1296PartRegion = _gdi_.PartRegion
1297InRegion = _gdi_.InRegion
d14a1e28 1298class Region(GDIObject):
093d3ff1 1299 """Proxy of C++ Region class"""
0085ce49
RD
1300 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1301 __repr__ = _swig_repr
1302 def __init__(self, *args, **kwargs):
a95a7133 1303 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
0085ce49
RD
1304 _gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs))
1305 __swig_destroy__ = _gdi_.delete_Region
1306 __del__ = lambda self : None;
e811c8ce 1307 def Clear(*args, **kwargs):
a95a7133 1308 """Clear(self)"""
54f9ee45 1309 return _gdi_.Region_Clear(*args, **kwargs)
e811c8ce
RD
1310
1311 def Offset(*args, **kwargs):
a95a7133 1312 """Offset(self, int x, int y) -> bool"""
54f9ee45 1313 return _gdi_.Region_Offset(*args, **kwargs)
e811c8ce
RD
1314
1315 def Contains(*args, **kwargs):
a95a7133 1316 """Contains(self, int x, int y) -> int"""
54f9ee45 1317 return _gdi_.Region_Contains(*args, **kwargs)
e811c8ce
RD
1318
1319 def ContainsPoint(*args, **kwargs):
a95a7133 1320 """ContainsPoint(self, Point pt) -> int"""
54f9ee45 1321 return _gdi_.Region_ContainsPoint(*args, **kwargs)
e811c8ce
RD
1322
1323 def ContainsRect(*args, **kwargs):
a95a7133 1324 """ContainsRect(self, Rect rect) -> int"""
54f9ee45 1325 return _gdi_.Region_ContainsRect(*args, **kwargs)
e811c8ce
RD
1326
1327 def ContainsRectDim(*args, **kwargs):
a95a7133 1328 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
54f9ee45 1329 return _gdi_.Region_ContainsRectDim(*args, **kwargs)
e811c8ce
RD
1330
1331 def GetBox(*args, **kwargs):
a95a7133 1332 """GetBox(self) -> Rect"""
54f9ee45 1333 return _gdi_.Region_GetBox(*args, **kwargs)
e811c8ce
RD
1334
1335 def Intersect(*args, **kwargs):
a95a7133 1336 """Intersect(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1337 return _gdi_.Region_Intersect(*args, **kwargs)
e811c8ce
RD
1338
1339 def IntersectRect(*args, **kwargs):
a95a7133 1340 """IntersectRect(self, Rect rect) -> bool"""
54f9ee45 1341 return _gdi_.Region_IntersectRect(*args, **kwargs)
e811c8ce
RD
1342
1343 def IntersectRegion(*args, **kwargs):
a95a7133 1344 """IntersectRegion(self, Region region) -> bool"""
54f9ee45 1345 return _gdi_.Region_IntersectRegion(*args, **kwargs)
e811c8ce
RD
1346
1347 def IsEmpty(*args, **kwargs):
a95a7133 1348 """IsEmpty(self) -> bool"""
54f9ee45 1349 return _gdi_.Region_IsEmpty(*args, **kwargs)
e811c8ce 1350
f5263701
RD
1351 def IsEqual(*args, **kwargs):
1352 """IsEqual(self, Region region) -> bool"""
1353 return _gdi_.Region_IsEqual(*args, **kwargs)
1354
e811c8ce 1355 def Union(*args, **kwargs):
a95a7133 1356 """Union(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1357 return _gdi_.Region_Union(*args, **kwargs)
e811c8ce
RD
1358
1359 def UnionRect(*args, **kwargs):
a95a7133 1360 """UnionRect(self, Rect rect) -> bool"""
54f9ee45 1361 return _gdi_.Region_UnionRect(*args, **kwargs)
e811c8ce
RD
1362
1363 def UnionRegion(*args, **kwargs):
a95a7133 1364 """UnionRegion(self, Region region) -> bool"""
54f9ee45 1365 return _gdi_.Region_UnionRegion(*args, **kwargs)
e811c8ce
RD
1366
1367 def Subtract(*args, **kwargs):
a95a7133 1368 """Subtract(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1369 return _gdi_.Region_Subtract(*args, **kwargs)
e811c8ce
RD
1370
1371 def SubtractRect(*args, **kwargs):
a95a7133 1372 """SubtractRect(self, Rect rect) -> bool"""
54f9ee45 1373 return _gdi_.Region_SubtractRect(*args, **kwargs)
e811c8ce
RD
1374
1375 def SubtractRegion(*args, **kwargs):
a95a7133 1376 """SubtractRegion(self, Region region) -> bool"""
54f9ee45 1377 return _gdi_.Region_SubtractRegion(*args, **kwargs)
e811c8ce
RD
1378
1379 def Xor(*args, **kwargs):
a95a7133 1380 """Xor(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1381 return _gdi_.Region_Xor(*args, **kwargs)
e811c8ce
RD
1382
1383 def XorRect(*args, **kwargs):
a95a7133 1384 """XorRect(self, Rect rect) -> bool"""
54f9ee45 1385 return _gdi_.Region_XorRect(*args, **kwargs)
e811c8ce
RD
1386
1387 def XorRegion(*args, **kwargs):
a95a7133 1388 """XorRegion(self, Region region) -> bool"""
54f9ee45 1389 return _gdi_.Region_XorRegion(*args, **kwargs)
e811c8ce
RD
1390
1391 def ConvertToBitmap(*args, **kwargs):
a95a7133 1392 """ConvertToBitmap(self) -> Bitmap"""
54f9ee45 1393 return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
1394
1395 def UnionBitmap(*args, **kwargs):
e6ffcedd 1396 """UnionBitmap(self, Bitmap bmp) -> bool"""
54f9ee45 1397 return _gdi_.Region_UnionBitmap(*args, **kwargs)
e811c8ce 1398
e6ffcedd
RD
1399 def UnionBitmapColour(*args, **kwargs):
1400 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1401 return _gdi_.Region_UnionBitmapColour(*args, **kwargs)
1402
33d6fd3b 1403 Box = property(GetBox,doc="See `GetBox`")
2131d850 1404_gdi_.Region_swigregister(Region)
5e40f9dd 1405
d14a1e28 1406def RegionFromBitmap(*args, **kwargs):
e6ffcedd 1407 """RegionFromBitmap(Bitmap bmp) -> Region"""
54f9ee45 1408 val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
d14a1e28 1409 return val
5e40f9dd 1410
e6ffcedd
RD
1411def RegionFromBitmapColour(*args, **kwargs):
1412 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1413 val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs)
e6ffcedd
RD
1414 return val
1415
d14a1e28 1416def RegionFromPoints(*args, **kwargs):
093d3ff1 1417 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
54f9ee45 1418 val = _gdi_.new_RegionFromPoints(*args, **kwargs)
d14a1e28 1419 return val
5e40f9dd 1420
54f9ee45 1421class RegionIterator(_core.Object):
093d3ff1 1422 """Proxy of C++ RegionIterator class"""
0085ce49
RD
1423 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1424 __repr__ = _swig_repr
1425 def __init__(self, *args, **kwargs):
a95a7133 1426 """__init__(self, Region region) -> RegionIterator"""
0085ce49
RD
1427 _gdi_.RegionIterator_swiginit(self,_gdi_.new_RegionIterator(*args, **kwargs))
1428 __swig_destroy__ = _gdi_.delete_RegionIterator
1429 __del__ = lambda self : None;
e811c8ce 1430 def GetX(*args, **kwargs):
a95a7133 1431 """GetX(self) -> int"""
54f9ee45 1432 return _gdi_.RegionIterator_GetX(*args, **kwargs)
e811c8ce
RD
1433
1434 def GetY(*args, **kwargs):
a95a7133 1435 """GetY(self) -> int"""
54f9ee45 1436 return _gdi_.RegionIterator_GetY(*args, **kwargs)
e811c8ce
RD
1437
1438 def GetW(*args, **kwargs):
a95a7133 1439 """GetW(self) -> int"""
54f9ee45 1440 return _gdi_.RegionIterator_GetW(*args, **kwargs)
e811c8ce
RD
1441
1442 def GetWidth(*args, **kwargs):
a95a7133 1443 """GetWidth(self) -> int"""
54f9ee45 1444 return _gdi_.RegionIterator_GetWidth(*args, **kwargs)
e811c8ce
RD
1445
1446 def GetH(*args, **kwargs):
a95a7133 1447 """GetH(self) -> int"""
54f9ee45 1448 return _gdi_.RegionIterator_GetH(*args, **kwargs)
e811c8ce
RD
1449
1450 def GetHeight(*args, **kwargs):
a95a7133 1451 """GetHeight(self) -> int"""
54f9ee45 1452 return _gdi_.RegionIterator_GetHeight(*args, **kwargs)
e811c8ce
RD
1453
1454 def GetRect(*args, **kwargs):
a95a7133 1455 """GetRect(self) -> Rect"""
54f9ee45 1456 return _gdi_.RegionIterator_GetRect(*args, **kwargs)
e811c8ce
RD
1457
1458 def HaveRects(*args, **kwargs):
a95a7133 1459 """HaveRects(self) -> bool"""
54f9ee45 1460 return _gdi_.RegionIterator_HaveRects(*args, **kwargs)
e811c8ce
RD
1461
1462 def Reset(*args, **kwargs):
a95a7133 1463 """Reset(self)"""
54f9ee45 1464 return _gdi_.RegionIterator_Reset(*args, **kwargs)
e811c8ce
RD
1465
1466 def Next(*args, **kwargs):
a95a7133 1467 """Next(self)"""
54f9ee45 1468 return _gdi_.RegionIterator_Next(*args, **kwargs)
e811c8ce
RD
1469
1470 def __nonzero__(*args, **kwargs):
a95a7133 1471 """__nonzero__(self) -> bool"""
54f9ee45 1472 return _gdi_.RegionIterator___nonzero__(*args, **kwargs)
e811c8ce 1473
33d6fd3b
RD
1474 H = property(GetH,doc="See `GetH`")
1475 Height = property(GetHeight,doc="See `GetHeight`")
1476 Rect = property(GetRect,doc="See `GetRect`")
1477 W = property(GetW,doc="See `GetW`")
1478 Width = property(GetWidth,doc="See `GetWidth`")
1479 X = property(GetX,doc="See `GetX`")
1480 Y = property(GetY,doc="See `GetY`")
2131d850 1481_gdi_.RegionIterator_swigregister(RegionIterator)
d14a1e28
RD
1482
1483#---------------------------------------------------------------------------
1484
54f9ee45
RD
1485FONTFAMILY_DEFAULT = _gdi_.FONTFAMILY_DEFAULT
1486FONTFAMILY_DECORATIVE = _gdi_.FONTFAMILY_DECORATIVE
1487FONTFAMILY_ROMAN = _gdi_.FONTFAMILY_ROMAN
1488FONTFAMILY_SCRIPT = _gdi_.FONTFAMILY_SCRIPT
1489FONTFAMILY_SWISS = _gdi_.FONTFAMILY_SWISS
1490FONTFAMILY_MODERN = _gdi_.FONTFAMILY_MODERN
1491FONTFAMILY_TELETYPE = _gdi_.FONTFAMILY_TELETYPE
1492FONTFAMILY_MAX = _gdi_.FONTFAMILY_MAX
1493FONTFAMILY_UNKNOWN = _gdi_.FONTFAMILY_UNKNOWN
1494FONTSTYLE_NORMAL = _gdi_.FONTSTYLE_NORMAL
1495FONTSTYLE_ITALIC = _gdi_.FONTSTYLE_ITALIC
1496FONTSTYLE_SLANT = _gdi_.FONTSTYLE_SLANT
1497FONTSTYLE_MAX = _gdi_.FONTSTYLE_MAX
1498FONTWEIGHT_NORMAL = _gdi_.FONTWEIGHT_NORMAL
1499FONTWEIGHT_LIGHT = _gdi_.FONTWEIGHT_LIGHT
1500FONTWEIGHT_BOLD = _gdi_.FONTWEIGHT_BOLD
1501FONTWEIGHT_MAX = _gdi_.FONTWEIGHT_MAX
1502FONTFLAG_DEFAULT = _gdi_.FONTFLAG_DEFAULT
1503FONTFLAG_ITALIC = _gdi_.FONTFLAG_ITALIC
1504FONTFLAG_SLANT = _gdi_.FONTFLAG_SLANT
1505FONTFLAG_LIGHT = _gdi_.FONTFLAG_LIGHT
1506FONTFLAG_BOLD = _gdi_.FONTFLAG_BOLD
1507FONTFLAG_ANTIALIASED = _gdi_.FONTFLAG_ANTIALIASED
1508FONTFLAG_NOT_ANTIALIASED = _gdi_.FONTFLAG_NOT_ANTIALIASED
1509FONTFLAG_UNDERLINED = _gdi_.FONTFLAG_UNDERLINED
1510FONTFLAG_STRIKETHROUGH = _gdi_.FONTFLAG_STRIKETHROUGH
1511FONTFLAG_MASK = _gdi_.FONTFLAG_MASK
1512FONTENCODING_SYSTEM = _gdi_.FONTENCODING_SYSTEM
1513FONTENCODING_DEFAULT = _gdi_.FONTENCODING_DEFAULT
1514FONTENCODING_ISO8859_1 = _gdi_.FONTENCODING_ISO8859_1
1515FONTENCODING_ISO8859_2 = _gdi_.FONTENCODING_ISO8859_2
1516FONTENCODING_ISO8859_3 = _gdi_.FONTENCODING_ISO8859_3
1517FONTENCODING_ISO8859_4 = _gdi_.FONTENCODING_ISO8859_4
1518FONTENCODING_ISO8859_5 = _gdi_.FONTENCODING_ISO8859_5
1519FONTENCODING_ISO8859_6 = _gdi_.FONTENCODING_ISO8859_6
1520FONTENCODING_ISO8859_7 = _gdi_.FONTENCODING_ISO8859_7
1521FONTENCODING_ISO8859_8 = _gdi_.FONTENCODING_ISO8859_8
1522FONTENCODING_ISO8859_9 = _gdi_.FONTENCODING_ISO8859_9
1523FONTENCODING_ISO8859_10 = _gdi_.FONTENCODING_ISO8859_10
1524FONTENCODING_ISO8859_11 = _gdi_.FONTENCODING_ISO8859_11
1525FONTENCODING_ISO8859_12 = _gdi_.FONTENCODING_ISO8859_12
1526FONTENCODING_ISO8859_13 = _gdi_.FONTENCODING_ISO8859_13
1527FONTENCODING_ISO8859_14 = _gdi_.FONTENCODING_ISO8859_14
1528FONTENCODING_ISO8859_15 = _gdi_.FONTENCODING_ISO8859_15
1529FONTENCODING_ISO8859_MAX = _gdi_.FONTENCODING_ISO8859_MAX
1530FONTENCODING_KOI8 = _gdi_.FONTENCODING_KOI8
1531FONTENCODING_KOI8_U = _gdi_.FONTENCODING_KOI8_U
1532FONTENCODING_ALTERNATIVE = _gdi_.FONTENCODING_ALTERNATIVE
1533FONTENCODING_BULGARIAN = _gdi_.FONTENCODING_BULGARIAN
1534FONTENCODING_CP437 = _gdi_.FONTENCODING_CP437
1535FONTENCODING_CP850 = _gdi_.FONTENCODING_CP850
1536FONTENCODING_CP852 = _gdi_.FONTENCODING_CP852
1537FONTENCODING_CP855 = _gdi_.FONTENCODING_CP855
1538FONTENCODING_CP866 = _gdi_.FONTENCODING_CP866
1539FONTENCODING_CP874 = _gdi_.FONTENCODING_CP874
1540FONTENCODING_CP932 = _gdi_.FONTENCODING_CP932
1541FONTENCODING_CP936 = _gdi_.FONTENCODING_CP936
1542FONTENCODING_CP949 = _gdi_.FONTENCODING_CP949
1543FONTENCODING_CP950 = _gdi_.FONTENCODING_CP950
1544FONTENCODING_CP1250 = _gdi_.FONTENCODING_CP1250
1545FONTENCODING_CP1251 = _gdi_.FONTENCODING_CP1251
1546FONTENCODING_CP1252 = _gdi_.FONTENCODING_CP1252
1547FONTENCODING_CP1253 = _gdi_.FONTENCODING_CP1253
1548FONTENCODING_CP1254 = _gdi_.FONTENCODING_CP1254
1549FONTENCODING_CP1255 = _gdi_.FONTENCODING_CP1255
1550FONTENCODING_CP1256 = _gdi_.FONTENCODING_CP1256
1551FONTENCODING_CP1257 = _gdi_.FONTENCODING_CP1257
1552FONTENCODING_CP12_MAX = _gdi_.FONTENCODING_CP12_MAX
1553FONTENCODING_UTF7 = _gdi_.FONTENCODING_UTF7
1554FONTENCODING_UTF8 = _gdi_.FONTENCODING_UTF8
1555FONTENCODING_EUC_JP = _gdi_.FONTENCODING_EUC_JP
1556FONTENCODING_UTF16BE = _gdi_.FONTENCODING_UTF16BE
1557FONTENCODING_UTF16LE = _gdi_.FONTENCODING_UTF16LE
1558FONTENCODING_UTF32BE = _gdi_.FONTENCODING_UTF32BE
1559FONTENCODING_UTF32LE = _gdi_.FONTENCODING_UTF32LE
1560FONTENCODING_MACROMAN = _gdi_.FONTENCODING_MACROMAN
1561FONTENCODING_MACJAPANESE = _gdi_.FONTENCODING_MACJAPANESE
1562FONTENCODING_MACCHINESETRAD = _gdi_.FONTENCODING_MACCHINESETRAD
1563FONTENCODING_MACKOREAN = _gdi_.FONTENCODING_MACKOREAN
1564FONTENCODING_MACARABIC = _gdi_.FONTENCODING_MACARABIC
1565FONTENCODING_MACHEBREW = _gdi_.FONTENCODING_MACHEBREW
1566FONTENCODING_MACGREEK = _gdi_.FONTENCODING_MACGREEK
1567FONTENCODING_MACCYRILLIC = _gdi_.FONTENCODING_MACCYRILLIC
1568FONTENCODING_MACDEVANAGARI = _gdi_.FONTENCODING_MACDEVANAGARI
1569FONTENCODING_MACGURMUKHI = _gdi_.FONTENCODING_MACGURMUKHI
1570FONTENCODING_MACGUJARATI = _gdi_.FONTENCODING_MACGUJARATI
1571FONTENCODING_MACORIYA = _gdi_.FONTENCODING_MACORIYA
1572FONTENCODING_MACBENGALI = _gdi_.FONTENCODING_MACBENGALI
1573FONTENCODING_MACTAMIL = _gdi_.FONTENCODING_MACTAMIL
1574FONTENCODING_MACTELUGU = _gdi_.FONTENCODING_MACTELUGU
1575FONTENCODING_MACKANNADA = _gdi_.FONTENCODING_MACKANNADA
1576FONTENCODING_MACMALAJALAM = _gdi_.FONTENCODING_MACMALAJALAM
1577FONTENCODING_MACSINHALESE = _gdi_.FONTENCODING_MACSINHALESE
1578FONTENCODING_MACBURMESE = _gdi_.FONTENCODING_MACBURMESE
1579FONTENCODING_MACKHMER = _gdi_.FONTENCODING_MACKHMER
1580FONTENCODING_MACTHAI = _gdi_.FONTENCODING_MACTHAI
1581FONTENCODING_MACLAOTIAN = _gdi_.FONTENCODING_MACLAOTIAN
1582FONTENCODING_MACGEORGIAN = _gdi_.FONTENCODING_MACGEORGIAN
1583FONTENCODING_MACARMENIAN = _gdi_.FONTENCODING_MACARMENIAN
1584FONTENCODING_MACCHINESESIMP = _gdi_.FONTENCODING_MACCHINESESIMP
1585FONTENCODING_MACTIBETAN = _gdi_.FONTENCODING_MACTIBETAN
1586FONTENCODING_MACMONGOLIAN = _gdi_.FONTENCODING_MACMONGOLIAN
1587FONTENCODING_MACETHIOPIC = _gdi_.FONTENCODING_MACETHIOPIC
1588FONTENCODING_MACCENTRALEUR = _gdi_.FONTENCODING_MACCENTRALEUR
1589FONTENCODING_MACVIATNAMESE = _gdi_.FONTENCODING_MACVIATNAMESE
1590FONTENCODING_MACARABICEXT = _gdi_.FONTENCODING_MACARABICEXT
1591FONTENCODING_MACSYMBOL = _gdi_.FONTENCODING_MACSYMBOL
1592FONTENCODING_MACDINGBATS = _gdi_.FONTENCODING_MACDINGBATS
1593FONTENCODING_MACTURKISH = _gdi_.FONTENCODING_MACTURKISH
1594FONTENCODING_MACCROATIAN = _gdi_.FONTENCODING_MACCROATIAN
1595FONTENCODING_MACICELANDIC = _gdi_.FONTENCODING_MACICELANDIC
1596FONTENCODING_MACROMANIAN = _gdi_.FONTENCODING_MACROMANIAN
1597FONTENCODING_MACCELTIC = _gdi_.FONTENCODING_MACCELTIC
1598FONTENCODING_MACGAELIC = _gdi_.FONTENCODING_MACGAELIC
1599FONTENCODING_MACKEYBOARD = _gdi_.FONTENCODING_MACKEYBOARD
1600FONTENCODING_MACMIN = _gdi_.FONTENCODING_MACMIN
1601FONTENCODING_MACMAX = _gdi_.FONTENCODING_MACMAX
1602FONTENCODING_MAX = _gdi_.FONTENCODING_MAX
1603FONTENCODING_UTF16 = _gdi_.FONTENCODING_UTF16
1604FONTENCODING_UTF32 = _gdi_.FONTENCODING_UTF32
1605FONTENCODING_UNICODE = _gdi_.FONTENCODING_UNICODE
1606FONTENCODING_GB2312 = _gdi_.FONTENCODING_GB2312
1607FONTENCODING_BIG5 = _gdi_.FONTENCODING_BIG5
1608FONTENCODING_SHIFT_JIS = _gdi_.FONTENCODING_SHIFT_JIS
d14a1e28
RD
1609#---------------------------------------------------------------------------
1610
1611class NativeFontInfo(object):
093d3ff1 1612 """Proxy of C++ NativeFontInfo class"""
0085ce49
RD
1613 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1614 __repr__ = _swig_repr
1615 def __init__(self, *args, **kwargs):
a95a7133 1616 """__init__(self) -> NativeFontInfo"""
0085ce49
RD
1617 _gdi_.NativeFontInfo_swiginit(self,_gdi_.new_NativeFontInfo(*args, **kwargs))
1618 __swig_destroy__ = _gdi_.delete_NativeFontInfo
1619 __del__ = lambda self : None;
e811c8ce 1620 def Init(*args, **kwargs):
a95a7133 1621 """Init(self)"""
54f9ee45 1622 return _gdi_.NativeFontInfo_Init(*args, **kwargs)
e811c8ce
RD
1623
1624 def InitFromFont(*args, **kwargs):
a95a7133 1625 """InitFromFont(self, Font font)"""
54f9ee45 1626 return _gdi_.NativeFontInfo_InitFromFont(*args, **kwargs)
e811c8ce
RD
1627
1628 def GetPointSize(*args, **kwargs):
a95a7133 1629 """GetPointSize(self) -> int"""
54f9ee45 1630 return _gdi_.NativeFontInfo_GetPointSize(*args, **kwargs)
e811c8ce
RD
1631
1632 def GetStyle(*args, **kwargs):
a95a7133 1633 """GetStyle(self) -> int"""
54f9ee45 1634 return _gdi_.NativeFontInfo_GetStyle(*args, **kwargs)
e811c8ce
RD
1635
1636 def GetWeight(*args, **kwargs):
a95a7133 1637 """GetWeight(self) -> int"""
54f9ee45 1638 return _gdi_.NativeFontInfo_GetWeight(*args, **kwargs)
e811c8ce
RD
1639
1640 def GetUnderlined(*args, **kwargs):
a95a7133 1641 """GetUnderlined(self) -> bool"""
54f9ee45 1642 return _gdi_.NativeFontInfo_GetUnderlined(*args, **kwargs)
e811c8ce
RD
1643
1644 def GetFaceName(*args, **kwargs):
a95a7133 1645 """GetFaceName(self) -> String"""
54f9ee45 1646 return _gdi_.NativeFontInfo_GetFaceName(*args, **kwargs)
e811c8ce
RD
1647
1648 def GetFamily(*args, **kwargs):
a95a7133 1649 """GetFamily(self) -> int"""
54f9ee45 1650 return _gdi_.NativeFontInfo_GetFamily(*args, **kwargs)
e811c8ce
RD
1651
1652 def GetEncoding(*args, **kwargs):
a95a7133 1653 """GetEncoding(self) -> int"""
54f9ee45 1654 return _gdi_.NativeFontInfo_GetEncoding(*args, **kwargs)
e811c8ce
RD
1655
1656 def SetPointSize(*args, **kwargs):
a95a7133 1657 """SetPointSize(self, int pointsize)"""
54f9ee45 1658 return _gdi_.NativeFontInfo_SetPointSize(*args, **kwargs)
e811c8ce
RD
1659
1660 def SetStyle(*args, **kwargs):
a95a7133 1661 """SetStyle(self, int style)"""
54f9ee45 1662 return _gdi_.NativeFontInfo_SetStyle(*args, **kwargs)
e811c8ce
RD
1663
1664 def SetWeight(*args, **kwargs):
a95a7133 1665 """SetWeight(self, int weight)"""
54f9ee45 1666 return _gdi_.NativeFontInfo_SetWeight(*args, **kwargs)
e811c8ce
RD
1667
1668 def SetUnderlined(*args, **kwargs):
a95a7133 1669 """SetUnderlined(self, bool underlined)"""
54f9ee45 1670 return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs)
e811c8ce
RD
1671
1672 def SetFaceName(*args, **kwargs):
704eda0c 1673 """SetFaceName(self, String facename) -> bool"""
54f9ee45 1674 return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs)
e811c8ce
RD
1675
1676 def SetFamily(*args, **kwargs):
a95a7133 1677 """SetFamily(self, int family)"""
54f9ee45 1678 return _gdi_.NativeFontInfo_SetFamily(*args, **kwargs)
e811c8ce
RD
1679
1680 def SetEncoding(*args, **kwargs):
a95a7133 1681 """SetEncoding(self, int encoding)"""
54f9ee45 1682 return _gdi_.NativeFontInfo_SetEncoding(*args, **kwargs)
e811c8ce
RD
1683
1684 def FromString(*args, **kwargs):
a95a7133 1685 """FromString(self, String s) -> bool"""
54f9ee45 1686 return _gdi_.NativeFontInfo_FromString(*args, **kwargs)
e811c8ce
RD
1687
1688 def ToString(*args, **kwargs):
a95a7133 1689 """ToString(self) -> String"""
54f9ee45 1690 return _gdi_.NativeFontInfo_ToString(*args, **kwargs)
e811c8ce
RD
1691
1692 def __str__(*args, **kwargs):
a95a7133 1693 """__str__(self) -> String"""
54f9ee45 1694 return _gdi_.NativeFontInfo___str__(*args, **kwargs)
e811c8ce
RD
1695
1696 def FromUserString(*args, **kwargs):
a95a7133 1697 """FromUserString(self, String s) -> bool"""
54f9ee45 1698 return _gdi_.NativeFontInfo_FromUserString(*args, **kwargs)
e811c8ce
RD
1699
1700 def ToUserString(*args, **kwargs):
a95a7133 1701 """ToUserString(self) -> String"""
54f9ee45 1702 return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs)
e811c8ce 1703
57332a5a
RD
1704 Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
1705 FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
1706 Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
1707 PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
1708 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
1709 Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
1710 Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
2131d850 1711_gdi_.NativeFontInfo_swigregister(NativeFontInfo)
d14a1e28
RD
1712
1713class NativeEncodingInfo(object):
093d3ff1 1714 """Proxy of C++ NativeEncodingInfo class"""
0085ce49
RD
1715 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1716 __repr__ = _swig_repr
54f9ee45
RD
1717 facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set)
1718 encoding = property(_gdi_.NativeEncodingInfo_encoding_get, _gdi_.NativeEncodingInfo_encoding_set)
0085ce49 1719 def __init__(self, *args, **kwargs):
a95a7133 1720 """__init__(self) -> NativeEncodingInfo"""
0085ce49
RD
1721 _gdi_.NativeEncodingInfo_swiginit(self,_gdi_.new_NativeEncodingInfo(*args, **kwargs))
1722 __swig_destroy__ = _gdi_.delete_NativeEncodingInfo
1723 __del__ = lambda self : None;
e811c8ce 1724 def FromString(*args, **kwargs):
a95a7133 1725 """FromString(self, String s) -> bool"""
54f9ee45 1726 return _gdi_.NativeEncodingInfo_FromString(*args, **kwargs)
e811c8ce
RD
1727
1728 def ToString(*args, **kwargs):
a95a7133 1729 """ToString(self) -> String"""
54f9ee45 1730 return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs)
e811c8ce 1731
2131d850 1732_gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfo)
70551f47
RD
1733
1734
e811c8ce 1735def GetNativeFontEncoding(*args, **kwargs):
0085ce49
RD
1736 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1737 return _gdi_.GetNativeFontEncoding(*args, **kwargs)
70551f47 1738
e811c8ce 1739def TestFontEncoding(*args, **kwargs):
0085ce49
RD
1740 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1741 return _gdi_.TestFontEncoding(*args, **kwargs)
d14a1e28
RD
1742#---------------------------------------------------------------------------
1743
1744class FontMapper(object):
093d3ff1 1745 """Proxy of C++ FontMapper class"""
0085ce49
RD
1746 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1747 __repr__ = _swig_repr
1748 def __init__(self, *args, **kwargs):
a95a7133 1749 """__init__(self) -> FontMapper"""
0085ce49
RD
1750 _gdi_.FontMapper_swiginit(self,_gdi_.new_FontMapper(*args, **kwargs))
1751 __swig_destroy__ = _gdi_.delete_FontMapper
1752 __del__ = lambda self : None;
e811c8ce 1753 def Get(*args, **kwargs):
66c033b4 1754 """Get() -> FontMapper"""
54f9ee45 1755 return _gdi_.FontMapper_Get(*args, **kwargs)
e811c8ce
RD
1756
1757 Get = staticmethod(Get)
1758 def Set(*args, **kwargs):
66c033b4 1759 """Set(FontMapper mapper) -> FontMapper"""
54f9ee45 1760 return _gdi_.FontMapper_Set(*args, **kwargs)
e811c8ce
RD
1761
1762 Set = staticmethod(Set)
1763 def CharsetToEncoding(*args, **kwargs):
a95a7133 1764 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
54f9ee45 1765 return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs)
e811c8ce
RD
1766
1767 def GetSupportedEncodingsCount(*args, **kwargs):
66c033b4 1768 """GetSupportedEncodingsCount() -> size_t"""
54f9ee45 1769 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
e811c8ce
RD
1770
1771 GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount)
1772 def GetEncoding(*args, **kwargs):
66c033b4 1773 """GetEncoding(size_t n) -> int"""
54f9ee45 1774 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
e811c8ce
RD
1775
1776 GetEncoding = staticmethod(GetEncoding)
1777 def GetEncodingName(*args, **kwargs):
66c033b4 1778 """GetEncodingName(int encoding) -> String"""
54f9ee45 1779 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
e811c8ce
RD
1780
1781 GetEncodingName = staticmethod(GetEncodingName)
1782 def GetEncodingDescription(*args, **kwargs):
66c033b4 1783 """GetEncodingDescription(int encoding) -> String"""
54f9ee45 1784 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
e811c8ce
RD
1785
1786 GetEncodingDescription = staticmethod(GetEncodingDescription)
b2df227b 1787 def GetEncodingFromName(*args, **kwargs):
66c033b4 1788 """GetEncodingFromName(String name) -> int"""
54f9ee45 1789 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
b2df227b
RD
1790
1791 GetEncodingFromName = staticmethod(GetEncodingFromName)
e811c8ce 1792 def SetConfigPath(*args, **kwargs):
a95a7133 1793 """SetConfigPath(self, String prefix)"""
54f9ee45 1794 return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
e811c8ce
RD
1795
1796 def GetDefaultConfigPath(*args, **kwargs):
66c033b4 1797 """GetDefaultConfigPath() -> String"""
54f9ee45 1798 return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
e811c8ce
RD
1799
1800 GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
1801 def GetAltForEncoding(*args, **kwargs):
a95a7133 1802 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
54f9ee45 1803 return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs)
e811c8ce
RD
1804
1805 def IsEncodingAvailable(*args, **kwargs):
a95a7133 1806 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
54f9ee45 1807 return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs)
e811c8ce
RD
1808
1809 def SetDialogParent(*args, **kwargs):
a95a7133 1810 """SetDialogParent(self, Window parent)"""
54f9ee45 1811 return _gdi_.FontMapper_SetDialogParent(*args, **kwargs)
e811c8ce
RD
1812
1813 def SetDialogTitle(*args, **kwargs):
a95a7133 1814 """SetDialogTitle(self, String title)"""
54f9ee45 1815 return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs)
e811c8ce 1816
97ab0f6a 1817 AltForEncoding = property(GetAltForEncoding,doc="See `GetAltForEncoding`")
2131d850 1818_gdi_.FontMapper_swigregister(FontMapper)
65191ae8 1819
0085ce49
RD
1820def FontMapper_Get(*args):
1821 """FontMapper_Get() -> FontMapper"""
1822 return _gdi_.FontMapper_Get(*args)
65191ae8 1823
e811c8ce 1824def FontMapper_Set(*args, **kwargs):
0085ce49
RD
1825 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1826 return _gdi_.FontMapper_Set(*args, **kwargs)
65191ae8 1827
0085ce49
RD
1828def FontMapper_GetSupportedEncodingsCount(*args):
1829 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1830 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args)
d14a1e28 1831
e811c8ce 1832def FontMapper_GetEncoding(*args, **kwargs):
0085ce49
RD
1833 """FontMapper_GetEncoding(size_t n) -> int"""
1834 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
d14a1e28 1835
e811c8ce 1836def FontMapper_GetEncodingName(*args, **kwargs):
0085ce49
RD
1837 """FontMapper_GetEncodingName(int encoding) -> String"""
1838 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
d14a1e28 1839
e811c8ce 1840def FontMapper_GetEncodingDescription(*args, **kwargs):
0085ce49
RD
1841 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1842 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
d14a1e28 1843
b2df227b 1844def FontMapper_GetEncodingFromName(*args, **kwargs):
0085ce49
RD
1845 """FontMapper_GetEncodingFromName(String name) -> int"""
1846 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
b2df227b 1847
0085ce49
RD
1848def FontMapper_GetDefaultConfigPath(*args):
1849 """FontMapper_GetDefaultConfigPath() -> String"""
1850 return _gdi_.FontMapper_GetDefaultConfigPath(*args)
d14a1e28
RD
1851
1852#---------------------------------------------------------------------------
1853
1854class Font(GDIObject):
a97cefba
RD
1855 """
1856 A font is an object which determines the appearance of text. Fonts are
1857 used for drawing text to a device context, and setting the appearance
1858 of a window's text.
1859
1860 You can retrieve the current system font settings with `wx.SystemSettings`.
1861 """
0085ce49
RD
1862 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1863 __repr__ = _swig_repr
1864 def __init__(self, *args, **kwargs):
0df68c9f 1865 """
a95a7133 1866 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
196addbf
RD
1867 String face=EmptyString,
1868 int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
1869
1870 Creates a font object with the specified attributes.
1871
1872 :param pointSize: The size of the font in points.
1873
1874 :param family: Font family. A generic way of referring to fonts
1875 without specifying actual facename. It can be One of
1876 the ``wx.FONTFAMILY_xxx`` constants.
1877
1878 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1879
1880 :param weight: Font weight, sometimes also referred to as font
1881 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1882
1883 :param underline: The value can be ``True`` or ``False`` and
1884 indicates whether the font will include an underline. This
1885 may not be supported on all platforms.
1886
1887 :param face: An optional string specifying the actual typeface to
1888 be used. If it is an empty string, a default typeface will be
1889 chosen based on the family.
1890
1891 :param encoding: An encoding which may be one of the
1892 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1893 available, no font is created.
1894
1895 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1896 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1897
0df68c9f 1898 """
db3e571a 1899 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
0085ce49
RD
1900 _gdi_.Font_swiginit(self,_gdi_.new_Font(*args, **kwargs))
1901 __swig_destroy__ = _gdi_.delete_Font
1902 __del__ = lambda self : None;
b39fe951 1903 def IsOk(*args, **kwargs):
a97cefba 1904 """
b39fe951 1905 IsOk(self) -> bool
a97cefba
RD
1906
1907 Returns ``True`` if this font was successfully created.
1908 """
b39fe951 1909 return _gdi_.Font_IsOk(*args, **kwargs)
e811c8ce 1910
b39fe951
RD
1911 Ok = IsOk
1912 def __nonzero__(self): return self.IsOk()
e811c8ce 1913 def __eq__(*args, **kwargs):
a95a7133 1914 """__eq__(self, Font other) -> bool"""
54f9ee45 1915 return _gdi_.Font___eq__(*args, **kwargs)
e811c8ce
RD
1916
1917 def __ne__(*args, **kwargs):
a95a7133 1918 """__ne__(self, Font other) -> bool"""
54f9ee45 1919 return _gdi_.Font___ne__(*args, **kwargs)
e811c8ce
RD
1920
1921 def GetPointSize(*args, **kwargs):
a97cefba
RD
1922 """
1923 GetPointSize(self) -> int
1924
1925 Gets the point size.
1926 """
54f9ee45 1927 return _gdi_.Font_GetPointSize(*args, **kwargs)
e811c8ce 1928
b6294124 1929 def GetPixelSize(*args, **kwargs):
a97cefba
RD
1930 """
1931 GetPixelSize(self) -> Size
1932
1933 Returns the size in pixels if the font was constructed with a pixel
1934 size.
1935 """
b6294124
RD
1936 return _gdi_.Font_GetPixelSize(*args, **kwargs)
1937
1938 def IsUsingSizeInPixels(*args, **kwargs):
a97cefba
RD
1939 """
1940 IsUsingSizeInPixels(self) -> bool
1941
1942 Returns ``True`` if the font is using a pixelSize.
1943 """
b6294124
RD
1944 return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
1945
e811c8ce 1946 def GetFamily(*args, **kwargs):
a97cefba
RD
1947 """
1948 GetFamily(self) -> int
1949
1950 Gets the font family.
1951 """
54f9ee45 1952 return _gdi_.Font_GetFamily(*args, **kwargs)
e811c8ce
RD
1953
1954 def GetStyle(*args, **kwargs):
a97cefba
RD
1955 """
1956 GetStyle(self) -> int
1957
1958 Gets the font style.
1959 """
54f9ee45 1960 return _gdi_.Font_GetStyle(*args, **kwargs)
e811c8ce
RD
1961
1962 def GetWeight(*args, **kwargs):
a97cefba
RD
1963 """
1964 GetWeight(self) -> int
1965
1966 Gets the font weight.
1967 """
54f9ee45 1968 return _gdi_.Font_GetWeight(*args, **kwargs)
e811c8ce
RD
1969
1970 def GetUnderlined(*args, **kwargs):
a97cefba
RD
1971 """
1972 GetUnderlined(self) -> bool
1973
1974 Returns ``True`` if the font is underlined, ``False`` otherwise.
1975 """
54f9ee45 1976 return _gdi_.Font_GetUnderlined(*args, **kwargs)
e811c8ce
RD
1977
1978 def GetFaceName(*args, **kwargs):
a97cefba
RD
1979 """
1980 GetFaceName(self) -> String
1981
1982 Returns the typeface name associated with the font, or the empty
1983 string if there is no typeface information.
1984 """
54f9ee45 1985 return _gdi_.Font_GetFaceName(*args, **kwargs)
e811c8ce
RD
1986
1987 def GetEncoding(*args, **kwargs):
a97cefba
RD
1988 """
1989 GetEncoding(self) -> int
1990
1991 Get the font's encoding.
1992 """
54f9ee45 1993 return _gdi_.Font_GetEncoding(*args, **kwargs)
e811c8ce
RD
1994
1995 def GetNativeFontInfo(*args, **kwargs):
a97cefba
RD
1996 """
1997 GetNativeFontInfo(self) -> NativeFontInfo
1998
1999 Constructs a `wx.NativeFontInfo` object from this font.
2000 """
54f9ee45 2001 return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
e811c8ce
RD
2002
2003 def IsFixedWidth(*args, **kwargs):
a97cefba
RD
2004 """
2005 IsFixedWidth(self) -> bool
2006
2007 Returns true if the font is a fixed width (or monospaced) font, false
2008 if it is a proportional one or font is invalid.
2009 """
54f9ee45 2010 return _gdi_.Font_IsFixedWidth(*args, **kwargs)
e811c8ce
RD
2011
2012 def GetNativeFontInfoDesc(*args, **kwargs):
a97cefba
RD
2013 """
2014 GetNativeFontInfoDesc(self) -> String
2015
2016 Returns the platform-dependent string completely describing this font
2017 or an empty string if the font isn't valid.
2018 """
54f9ee45 2019 return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
e811c8ce
RD
2020
2021 def GetNativeFontInfoUserDesc(*args, **kwargs):
a97cefba
RD
2022 """
2023 GetNativeFontInfoUserDesc(self) -> String
2024
2025 Returns a human readable version of `GetNativeFontInfoDesc`.
2026 """
54f9ee45 2027 return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
e811c8ce
RD
2028
2029 def SetPointSize(*args, **kwargs):
a97cefba
RD
2030 """
2031 SetPointSize(self, int pointSize)
2032
2033 Sets the point size.
2034 """
54f9ee45 2035 return _gdi_.Font_SetPointSize(*args, **kwargs)
e811c8ce 2036
b6294124 2037 def SetPixelSize(*args, **kwargs):
a97cefba
RD
2038 """
2039 SetPixelSize(self, Size pixelSize)
2040
2041 Sets the size in pixels rather than points. If there is platform API
2042 support for this then it is used, otherwise a font with the closest
2043 size is found using a binary search.
2044 """
b6294124
RD
2045 return _gdi_.Font_SetPixelSize(*args, **kwargs)
2046
e811c8ce 2047 def SetFamily(*args, **kwargs):
a97cefba
RD
2048 """
2049 SetFamily(self, int family)
2050
2051 Sets the font family.
2052 """
54f9ee45 2053 return _gdi_.Font_SetFamily(*args, **kwargs)
e811c8ce
RD
2054
2055 def SetStyle(*args, **kwargs):
a97cefba
RD
2056 """
2057 SetStyle(self, int style)
2058
2059 Sets the font style.
2060 """
54f9ee45 2061 return _gdi_.Font_SetStyle(*args, **kwargs)
e811c8ce
RD
2062
2063 def SetWeight(*args, **kwargs):
a97cefba
RD
2064 """
2065 SetWeight(self, int weight)
2066
2067 Sets the font weight.
2068 """
54f9ee45 2069 return _gdi_.Font_SetWeight(*args, **kwargs)
e811c8ce
RD
2070
2071 def SetFaceName(*args, **kwargs):
a97cefba 2072 """
704eda0c 2073 SetFaceName(self, String faceName) -> bool
a97cefba
RD
2074
2075 Sets the facename for the font. The facename, which should be a valid
2076 font installed on the end-user's system.
2077
2078 To avoid portability problems, don't rely on a specific face, but
2079 specify the font family instead or as well. A suitable font will be
2080 found on the end-user's system. If both the family and the facename
2081 are specified, wxWidgets will first search for the specific face, and
2082 then for a font belonging to the same family.
2083 """
54f9ee45 2084 return _gdi_.Font_SetFaceName(*args, **kwargs)
e811c8ce
RD
2085
2086 def SetUnderlined(*args, **kwargs):
a97cefba
RD
2087 """
2088 SetUnderlined(self, bool underlined)
2089
2090 Sets underlining.
2091 """
54f9ee45 2092 return _gdi_.Font_SetUnderlined(*args, **kwargs)
e811c8ce
RD
2093
2094 def SetEncoding(*args, **kwargs):
a97cefba
RD
2095 """
2096 SetEncoding(self, int encoding)
2097
2098 Set the font encoding.
2099 """
54f9ee45 2100 return _gdi_.Font_SetEncoding(*args, **kwargs)
e811c8ce
RD
2101
2102 def SetNativeFontInfo(*args, **kwargs):
a97cefba
RD
2103 """
2104 SetNativeFontInfo(self, NativeFontInfo info)
2105
2106 Set the font's attributes from a `wx.NativeFontInfo` object.
2107 """
54f9ee45 2108 return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
e811c8ce
RD
2109
2110 def SetNativeFontInfoFromString(*args, **kwargs):
a97cefba 2111 """
704eda0c 2112 SetNativeFontInfoFromString(self, String info) -> bool
a97cefba
RD
2113
2114 Set the font's attributes from string representation of a
2115 `wx.NativeFontInfo` object.
2116 """
54f9ee45 2117 return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
e811c8ce
RD
2118
2119 def SetNativeFontInfoUserDesc(*args, **kwargs):
a97cefba 2120 """
704eda0c 2121 SetNativeFontInfoUserDesc(self, String info) -> bool
a97cefba
RD
2122
2123 Set the font's attributes from a string formerly returned from
2124 `GetNativeFontInfoDesc`.
2125 """
54f9ee45 2126 return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
e811c8ce
RD
2127
2128 def GetFamilyString(*args, **kwargs):
a97cefba
RD
2129 """
2130 GetFamilyString(self) -> String
2131
2132 Returns a string representation of the font family.
2133 """
54f9ee45 2134 return _gdi_.Font_GetFamilyString(*args, **kwargs)
e811c8ce
RD
2135
2136 def GetStyleString(*args, **kwargs):
a97cefba
RD
2137 """
2138 GetStyleString(self) -> String
2139
2140 Returns a string representation of the font style.
2141 """
54f9ee45 2142 return _gdi_.Font_GetStyleString(*args, **kwargs)
e811c8ce
RD
2143
2144 def GetWeightString(*args, **kwargs):
a97cefba
RD
2145 """
2146 GetWeightString(self) -> String
2147
2148 Return a string representation of the font weight.
2149 """
54f9ee45 2150 return _gdi_.Font_GetWeightString(*args, **kwargs)
e811c8ce
RD
2151
2152 def SetNoAntiAliasing(*args, **kwargs):
a95a7133 2153 """SetNoAntiAliasing(self, bool no=True)"""
54f9ee45 2154 return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
e811c8ce
RD
2155
2156 def GetNoAntiAliasing(*args, **kwargs):
a95a7133 2157 """GetNoAntiAliasing(self) -> bool"""
54f9ee45 2158 return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
e811c8ce
RD
2159
2160 def GetDefaultEncoding(*args, **kwargs):
a97cefba
RD
2161 """
2162 GetDefaultEncoding() -> int
2163
2164 Returns the encoding used for all fonts created with an encoding of
2165 ``wx.FONTENCODING_DEFAULT``.
2166 """
54f9ee45 2167 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
e811c8ce
RD
2168
2169 GetDefaultEncoding = staticmethod(GetDefaultEncoding)
2170 def SetDefaultEncoding(*args, **kwargs):
a97cefba
RD
2171 """
2172 SetDefaultEncoding(int encoding)
2173
2174 Sets the default font encoding.
2175 """
54f9ee45 2176 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
e811c8ce
RD
2177
2178 SetDefaultEncoding = staticmethod(SetDefaultEncoding)
97ab0f6a
RD
2179 Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
2180 FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
2181 Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
2182 FamilyString = property(GetFamilyString,doc="See `GetFamilyString`")
2183 NativeFontInfo = property(GetNativeFontInfo,SetNativeFontInfo,doc="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2184 NativeFontInfoDesc = property(GetNativeFontInfoDesc,doc="See `GetNativeFontInfoDesc`")
2185 NativeFontInfoUserDesc = property(GetNativeFontInfoUserDesc,SetNativeFontInfoUserDesc,doc="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2186 NoAntiAliasing = property(GetNoAntiAliasing,SetNoAntiAliasing,doc="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2187 PixelSize = property(GetPixelSize,SetPixelSize,doc="See `GetPixelSize` and `SetPixelSize`")
2188 PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
2189 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
2190 StyleString = property(GetStyleString,doc="See `GetStyleString`")
2191 Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
2192 Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
2193 WeightString = property(GetWeightString,doc="See `GetWeightString`")
2131d850 2194_gdi_.Font_swigregister(Font)
5e40f9dd 2195
d14a1e28 2196def FontFromNativeInfo(*args, **kwargs):
a97cefba
RD
2197 """
2198 FontFromNativeInfo(NativeFontInfo info) -> Font
2199
2200 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2201 """
db3e571a 2202 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
54f9ee45 2203 val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
d14a1e28 2204 return val
5e40f9dd 2205
d14a1e28 2206def FontFromNativeInfoString(*args, **kwargs):
a97cefba
RD
2207 """
2208 FontFromNativeInfoString(String info) -> Font
2209
2210 Construct a `wx.Font` from the string representation of a
2211 `wx.NativeFontInfo` object.
2212 """
db3e571a 2213 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
54f9ee45 2214 val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
d14a1e28 2215 return val
5e40f9dd 2216
73c8ef6a 2217def FFont(*args, **kwargs):
0df68c9f 2218 """
73c8ef6a 2219 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
196addbf 2220 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2221
2222 A bit of a simpler way to create a `wx.Font` using flags instead of
2223 individual attribute settings. The value of flags can be a
2224 combination of the following:
2225
2226 ============================ ==
2227 wx.FONTFLAG_DEFAULT
2228 wx.FONTFLAG_ITALIC
2229 wx.FONTFLAG_SLANT
2230 wx.FONTFLAG_LIGHT
2231 wx.FONTFLAG_BOLD
2232 wx.FONTFLAG_ANTIALIASED
2233 wx.FONTFLAG_NOT_ANTIALIASED
2234 wx.FONTFLAG_UNDERLINED
2235 wx.FONTFLAG_STRIKETHROUGH
2236 ============================ ==
2237
2238 :see: `wx.Font.__init__`
0df68c9f 2239 """
db3e571a 2240 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
73c8ef6a 2241 val = _gdi_.new_FFont(*args, **kwargs)
d14a1e28 2242 return val
5e40f9dd 2243
b6294124
RD
2244def FontFromPixelSize(*args, **kwargs):
2245 """
2246 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2247 bool underlined=False, String face=wxEmptyString,
2248 int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2249
2250 Creates a font using a size in pixels rather than points. If there is
2251 platform API support for this then it is used, otherwise a font with
2252 the closest size is found using a binary search.
2253
2254 :see: `wx.Font.__init__`
b6294124
RD
2255 """
2256 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2257 val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
b6294124
RD
2258 return val
2259
73c8ef6a
RD
2260def FFontFromPixelSize(*args, **kwargs):
2261 """
2262 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2263 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2264
2265 Creates a font using a size in pixels rather than points. If there is
2266 platform API support for this then it is used, otherwise a font with
2267 the closest size is found using a binary search.
2268
2269 :see: `wx.Font.__init__`, `wx.FFont`
73c8ef6a
RD
2270 """
2271 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2272 val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
73c8ef6a
RD
2273 return val
2274
0085ce49
RD
2275def Font_GetDefaultEncoding(*args):
2276 """
a97cefba
RD
2277 Font_GetDefaultEncoding() -> int
2278
2279 Returns the encoding used for all fonts created with an encoding of
2280 ``wx.FONTENCODING_DEFAULT``.
2281 """
0085ce49 2282 return _gdi_.Font_GetDefaultEncoding(*args)
70551f47 2283
e811c8ce 2284def Font_SetDefaultEncoding(*args, **kwargs):
0085ce49 2285 """
a97cefba
RD
2286 Font_SetDefaultEncoding(int encoding)
2287
2288 Sets the default font encoding.
2289 """
0085ce49 2290 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
70551f47 2291
a97cefba 2292Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.")
d14a1e28 2293#---------------------------------------------------------------------------
70551f47 2294
d14a1e28 2295class FontEnumerator(object):
093d3ff1 2296 """Proxy of C++ FontEnumerator class"""
0085ce49
RD
2297 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2298 __repr__ = _swig_repr
2299 def __init__(self, *args, **kwargs):
a95a7133 2300 """__init__(self) -> FontEnumerator"""
0085ce49 2301 _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs))
d14a1e28 2302 self._setCallbackInfo(self, FontEnumerator, 0)
e811c8ce 2303
0085ce49
RD
2304 __swig_destroy__ = _gdi_.delete_FontEnumerator
2305 __del__ = lambda self : None;
e811c8ce 2306 def _setCallbackInfo(*args, **kwargs):
a95a7133 2307 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
54f9ee45 2308 return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
2309
2310 def EnumerateFacenames(*args, **kwargs):
a95a7133 2311 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
54f9ee45 2312 return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
e811c8ce
RD
2313
2314 def EnumerateEncodings(*args, **kwargs):
a95a7133 2315 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
54f9ee45 2316 return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
e811c8ce
RD
2317
2318 def GetEncodings(*args, **kwargs):
704eda0c 2319 """GetEncodings() -> PyObject"""
54f9ee45 2320 return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
e811c8ce 2321
704eda0c 2322 GetEncodings = staticmethod(GetEncodings)
e811c8ce 2323 def GetFacenames(*args, **kwargs):
704eda0c 2324 """GetFacenames() -> PyObject"""
54f9ee45 2325 return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
e811c8ce 2326
704eda0c
RD
2327 GetFacenames = staticmethod(GetFacenames)
2328 def IsValidFacename(*args, **kwargs):
2329 """
2330 IsValidFacename(String str) -> bool
2331
2332 Convenience function that returns true if the given face name exist in
2333 the user's system
2334 """
2335 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2336
2337 IsValidFacename = staticmethod(IsValidFacename)
2131d850 2338_gdi_.FontEnumerator_swigregister(FontEnumerator)
d14a1e28 2339
704eda0c
RD
2340def FontEnumerator_GetEncodings(*args):
2341 """FontEnumerator_GetEncodings() -> PyObject"""
2342 return _gdi_.FontEnumerator_GetEncodings(*args)
2343
2344def FontEnumerator_GetFacenames(*args):
2345 """FontEnumerator_GetFacenames() -> PyObject"""
2346 return _gdi_.FontEnumerator_GetFacenames(*args)
2347
2348def FontEnumerator_IsValidFacename(*args, **kwargs):
2349 """
2350 FontEnumerator_IsValidFacename(String str) -> bool
2351
2352 Convenience function that returns true if the given face name exist in
2353 the user's system
2354 """
2355 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2356
d14a1e28
RD
2357#---------------------------------------------------------------------------
2358
54f9ee45
RD
2359LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
2360LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
2361LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
2362LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
2363LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
2364LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
2365LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
2366LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
2367LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
2368LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
2369LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
2370LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
2371LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
2372LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
2373LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
2374LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
2375LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
2376LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
2377LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
2378LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
2379LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
2380LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
2381LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
2382LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
2383LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
2384LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
2385LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
2386LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
2387LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
2388LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
2389LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
2390LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
2391LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
2392LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
2393LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
2394LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
2395LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
2396LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
2397LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
2398LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
2399LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
2400LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
2401LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
2402LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
2403LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
2404LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
2405LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
2406LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
2407LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
2408LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
2409LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
2410LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
2411LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
2412LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
2413LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
2414LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
2415LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2416LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2417LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2418LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2419LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2420LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2421LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2422LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2423LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2424LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2425LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2426LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2427LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2428LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2429LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2430LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2431LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2432LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2433LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2434LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2435LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2436LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2437LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2438LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2439LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2440LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2441LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2442LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2443LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2444LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2445LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2446LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2447LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2448LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2449LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2450LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2451LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2452LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2453LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2454LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2455LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2456LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2457LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2458LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2459LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2460LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2461LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2462LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2463LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2464LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2465LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2466LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2467LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2468LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2469LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2470LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2471LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2472LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2473LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2474LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2475LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2476LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2477LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2478LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2479LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2480LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2481LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2482LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2483LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2484LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2485LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2486LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2487LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2488LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2489LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2490LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2491LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2492LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2493LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2494LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2495LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2496LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2497LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2498LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2499LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2500LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2501LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2502LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2503LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2504LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2505LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2506LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2507LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2508LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2509LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2510LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2511LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2512LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2513LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2514LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2515LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2516LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2517LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2518LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2519LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2520LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2521LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2522LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2523LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2524LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2525LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2526LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2527LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2528LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2529LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2530LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2531LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2532LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2533LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2534LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2535LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2536LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2537LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2538LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2539LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2540LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2541LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2542LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2543LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2544LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2545LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2546LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2547LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2548LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2549LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2550LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2551LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2552LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2553LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2554LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2555LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2556LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2557LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2558LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2559LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2560LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2561LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2562LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2563LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2564LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2565LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2566LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2567LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2568LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2569LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2570LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2571LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2572LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2573LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2574LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2575LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2576LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2577LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2578LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2579LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2580LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2581LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2582LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2583LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2584LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2585LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2586LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2587LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2588LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2589LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
d14a1e28 2590class LanguageInfo(object):
093d3ff1 2591 """Proxy of C++ LanguageInfo class"""
0085ce49
RD
2592 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2593 def __init__(self): raise AttributeError, "No constructor defined"
2594 __repr__ = _swig_repr
54f9ee45
RD
2595 Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2596 CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2597 Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2131d850 2598_gdi_.LanguageInfo_swigregister(LanguageInfo)
54f9ee45
RD
2599
2600LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2601LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2602LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2603LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2604LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2605LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2606LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2607LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
d14a1e28 2608class Locale(object):
093d3ff1 2609 """Proxy of C++ Locale class"""
0085ce49
RD
2610 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2611 __repr__ = _swig_repr
2612 def __init__(self, *args, **kwargs):
41e2b43e 2613 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
0085ce49
RD
2614 _gdi_.Locale_swiginit(self,_gdi_.new_Locale(*args, **kwargs))
2615 __swig_destroy__ = _gdi_.delete_Locale
2616 __del__ = lambda self : None;
e811c8ce 2617 def Init1(*args, **kwargs):
0df68c9f 2618 """
a95a7133 2619 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
196addbf 2620 bool bLoadDefault=True,
0df68c9f
RD
2621 bool bConvertEncoding=False) -> bool
2622 """
54f9ee45 2623 return _gdi_.Locale_Init1(*args, **kwargs)
e811c8ce
RD
2624
2625 def Init2(*args, **kwargs):
a95a7133 2626 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
54f9ee45 2627 return _gdi_.Locale_Init2(*args, **kwargs)
e811c8ce 2628
d14a1e28
RD
2629 def Init(self, *_args, **_kwargs):
2630 if type(_args[0]) in [type(''), type(u'')]:
2631 val = self.Init1(*_args, **_kwargs)
2632 else:
2633 val = self.Init2(*_args, **_kwargs)
2634 return val
2635
e811c8ce 2636 def GetSystemLanguage(*args, **kwargs):
66c033b4 2637 """GetSystemLanguage() -> int"""
54f9ee45 2638 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
e811c8ce
RD
2639
2640 GetSystemLanguage = staticmethod(GetSystemLanguage)
2641 def GetSystemEncoding(*args, **kwargs):
66c033b4 2642 """GetSystemEncoding() -> int"""
54f9ee45 2643 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
e811c8ce
RD
2644
2645 GetSystemEncoding = staticmethod(GetSystemEncoding)
2646 def GetSystemEncodingName(*args, **kwargs):
66c033b4 2647 """GetSystemEncodingName() -> String"""
54f9ee45 2648 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
e811c8ce
RD
2649
2650 GetSystemEncodingName = staticmethod(GetSystemEncodingName)
2651 def IsOk(*args, **kwargs):
a95a7133 2652 """IsOk(self) -> bool"""
54f9ee45 2653 return _gdi_.Locale_IsOk(*args, **kwargs)
e811c8ce 2654
d14a1e28 2655 def __nonzero__(self): return self.IsOk()
e811c8ce 2656 def GetLocale(*args, **kwargs):
a95a7133 2657 """GetLocale(self) -> String"""
54f9ee45 2658 return _gdi_.Locale_GetLocale(*args, **kwargs)
e811c8ce
RD
2659
2660 def GetLanguage(*args, **kwargs):
a95a7133 2661 """GetLanguage(self) -> int"""
54f9ee45 2662 return _gdi_.Locale_GetLanguage(*args, **kwargs)
e811c8ce
RD
2663
2664 def GetSysName(*args, **kwargs):
a95a7133 2665 """GetSysName(self) -> String"""
54f9ee45 2666 return _gdi_.Locale_GetSysName(*args, **kwargs)
e811c8ce
RD
2667
2668 def GetCanonicalName(*args, **kwargs):
a95a7133 2669 """GetCanonicalName(self) -> String"""
54f9ee45 2670 return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
e811c8ce
RD
2671
2672 def AddCatalogLookupPathPrefix(*args, **kwargs):
66c033b4 2673 """AddCatalogLookupPathPrefix(String prefix)"""
54f9ee45 2674 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
e811c8ce
RD
2675
2676 AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
2677 def AddCatalog(*args, **kwargs):
a95a7133 2678 """AddCatalog(self, String szDomain) -> bool"""
54f9ee45 2679 return _gdi_.Locale_AddCatalog(*args, **kwargs)
e811c8ce 2680
33d6fd3b
RD
2681 def IsAvailable(*args, **kwargs):
2682 """IsAvailable(int lang) -> bool"""
2683 return _gdi_.Locale_IsAvailable(*args, **kwargs)
2684
2685 IsAvailable = staticmethod(IsAvailable)
e811c8ce 2686 def IsLoaded(*args, **kwargs):
a95a7133 2687 """IsLoaded(self, String szDomain) -> bool"""
54f9ee45 2688 return _gdi_.Locale_IsLoaded(*args, **kwargs)
e811c8ce
RD
2689
2690 def GetLanguageInfo(*args, **kwargs):
66c033b4 2691 """GetLanguageInfo(int lang) -> LanguageInfo"""
54f9ee45 2692 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
e811c8ce
RD
2693
2694 GetLanguageInfo = staticmethod(GetLanguageInfo)
2695 def GetLanguageName(*args, **kwargs):
66c033b4 2696 """GetLanguageName(int lang) -> String"""
54f9ee45 2697 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
e811c8ce
RD
2698
2699 GetLanguageName = staticmethod(GetLanguageName)
2700 def FindLanguageInfo(*args, **kwargs):
66c033b4 2701 """FindLanguageInfo(String locale) -> LanguageInfo"""
54f9ee45 2702 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
e811c8ce
RD
2703
2704 FindLanguageInfo = staticmethod(FindLanguageInfo)
2705 def AddLanguage(*args, **kwargs):
66c033b4 2706 """AddLanguage(LanguageInfo info)"""
54f9ee45 2707 return _gdi_.Locale_AddLanguage(*args, **kwargs)
e811c8ce
RD
2708
2709 AddLanguage = staticmethod(AddLanguage)
2710 def GetString(*args, **kwargs):
a95a7133 2711 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
54f9ee45 2712 return _gdi_.Locale_GetString(*args, **kwargs)
e811c8ce
RD
2713
2714 def GetName(*args, **kwargs):
a95a7133 2715 """GetName(self) -> String"""
54f9ee45 2716 return _gdi_.Locale_GetName(*args, **kwargs)
e811c8ce 2717
97ab0f6a
RD
2718 CanonicalName = property(GetCanonicalName,doc="See `GetCanonicalName`")
2719 Language = property(GetLanguage,doc="See `GetLanguage`")
2720 Locale = property(GetLocale,doc="See `GetLocale`")
2721 Name = property(GetName,doc="See `GetName`")
2722 String = property(GetString,doc="See `GetString`")
2723 SysName = property(GetSysName,doc="See `GetSysName`")
2131d850 2724_gdi_.Locale_swigregister(Locale)
5e40f9dd 2725
0085ce49
RD
2726def Locale_GetSystemLanguage(*args):
2727 """Locale_GetSystemLanguage() -> int"""
2728 return _gdi_.Locale_GetSystemLanguage(*args)
5e40f9dd 2729
0085ce49
RD
2730def Locale_GetSystemEncoding(*args):
2731 """Locale_GetSystemEncoding() -> int"""
2732 return _gdi_.Locale_GetSystemEncoding(*args)
5e40f9dd 2733
0085ce49
RD
2734def Locale_GetSystemEncodingName(*args):
2735 """Locale_GetSystemEncodingName() -> String"""
2736 return _gdi_.Locale_GetSystemEncodingName(*args)
d14a1e28 2737
e811c8ce 2738def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
0085ce49
RD
2739 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2740 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
d14a1e28 2741
33d6fd3b
RD
2742def Locale_IsAvailable(*args, **kwargs):
2743 """Locale_IsAvailable(int lang) -> bool"""
2744 return _gdi_.Locale_IsAvailable(*args, **kwargs)
2745
e811c8ce 2746def Locale_GetLanguageInfo(*args, **kwargs):
0085ce49
RD
2747 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2748 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
d14a1e28 2749
e811c8ce 2750def Locale_GetLanguageName(*args, **kwargs):
0085ce49
RD
2751 """Locale_GetLanguageName(int lang) -> String"""
2752 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
d14a1e28 2753
e811c8ce 2754def Locale_FindLanguageInfo(*args, **kwargs):
0085ce49
RD
2755 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2756 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
d14a1e28 2757
e811c8ce 2758def Locale_AddLanguage(*args, **kwargs):
0085ce49
RD
2759 """Locale_AddLanguage(LanguageInfo info)"""
2760 return _gdi_.Locale_AddLanguage(*args, **kwargs)
d14a1e28 2761
fc46b7f3
RD
2762class PyLocale(Locale):
2763 """Proxy of C++ PyLocale class"""
2764 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2765 __repr__ = _swig_repr
2766 def __init__(self, *args, **kwargs):
2767 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2768 _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
2769 self._setCallbackInfo(self, PyLocale)
2770
2771 __swig_destroy__ = _gdi_.delete_PyLocale
2772 __del__ = lambda self : None;
2773 def _setCallbackInfo(*args, **kwargs):
2774 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2775 return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs)
2776
2777 def GetSingularString(*args, **kwargs):
2778 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2779 return _gdi_.PyLocale_GetSingularString(*args, **kwargs)
2780
2781 def GetPluralString(*args, **kwargs):
2782 """
2783 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2784 wxChar szDomain=None) -> wxChar
2785 """
2786 return _gdi_.PyLocale_GetPluralString(*args, **kwargs)
2787
2788_gdi_.PyLocale_swigregister(PyLocale)
2789
d14a1e28 2790
0085ce49
RD
2791def GetLocale(*args):
2792 """GetLocale() -> Locale"""
2793 return _gdi_.GetLocale(*args)
d14a1e28
RD
2794#---------------------------------------------------------------------------
2795
54f9ee45
RD
2796CONVERT_STRICT = _gdi_.CONVERT_STRICT
2797CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
2798PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
2799PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
2800PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
2801PLATFORM_OS2 = _gdi_.PLATFORM_OS2
2802PLATFORM_MAC = _gdi_.PLATFORM_MAC
2803class EncodingConverter(_core.Object):
093d3ff1 2804 """Proxy of C++ EncodingConverter class"""
0085ce49
RD
2805 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2806 __repr__ = _swig_repr
2807 def __init__(self, *args, **kwargs):
a95a7133 2808 """__init__(self) -> EncodingConverter"""
0085ce49
RD
2809 _gdi_.EncodingConverter_swiginit(self,_gdi_.new_EncodingConverter(*args, **kwargs))
2810 __swig_destroy__ = _gdi_.delete_EncodingConverter
2811 __del__ = lambda self : None;
e811c8ce 2812 def Init(*args, **kwargs):
a95a7133 2813 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
54f9ee45 2814 return _gdi_.EncodingConverter_Init(*args, **kwargs)
e811c8ce
RD
2815
2816 def Convert(*args, **kwargs):
a95a7133 2817 """Convert(self, String input) -> String"""
54f9ee45 2818 return _gdi_.EncodingConverter_Convert(*args, **kwargs)
e811c8ce
RD
2819
2820 def GetPlatformEquivalents(*args, **kwargs):
66c033b4 2821 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
54f9ee45 2822 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
e811c8ce
RD
2823
2824 GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
2825 def GetAllEquivalents(*args, **kwargs):
66c033b4 2826 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
54f9ee45 2827 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
e811c8ce
RD
2828
2829 GetAllEquivalents = staticmethod(GetAllEquivalents)
2830 def CanConvert(*args, **kwargs):
66c033b4 2831 """CanConvert(int encIn, int encOut) -> bool"""
54f9ee45 2832 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
e811c8ce
RD
2833
2834 CanConvert = staticmethod(CanConvert)
d14a1e28 2835 def __nonzero__(self): return self.IsOk()
2131d850 2836_gdi_.EncodingConverter_swigregister(EncodingConverter)
d14a1e28 2837
e811c8ce 2838def GetTranslation(*args):
0085ce49 2839 """
3adfb63b 2840 GetTranslation(String str) -> String
fc46b7f3 2841 GetTranslation(String str, String domain) -> String
3adfb63b 2842 GetTranslation(String str, String strPlural, size_t n) -> String
fc46b7f3 2843 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
0df68c9f 2844 """
0085ce49 2845 return _gdi_.GetTranslation(*args)
d14a1e28 2846
e811c8ce 2847def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
0085ce49
RD
2848 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2849 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
d14a1e28 2850
e811c8ce 2851def EncodingConverter_GetAllEquivalents(*args, **kwargs):
0085ce49
RD
2852 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2853 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
d14a1e28 2854
e811c8ce 2855def EncodingConverter_CanConvert(*args, **kwargs):
0085ce49
RD
2856 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2857 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
d14a1e28
RD
2858
2859#----------------------------------------------------------------------------
89c876de 2860# On MSW add the directory where the wxWidgets catalogs were installed
d14a1e28
RD
2861# to the default catalog path.
2862if wx.Platform == "__WXMSW__":
2863 import os
72ef6efb 2864 _localedir = os.path.join(os.path.split(__file__)[0], "locale")
8fb0e70a 2865 Locale.AddCatalogLookupPathPrefix(_localedir)
d14a1e28
RD
2866 del os
2867
2868#----------------------------------------------------------------------------
2869
2870#---------------------------------------------------------------------------
2871
54f9ee45 2872class DC(_core.Object):
f5b96ee1
RD
2873 """
2874 A wx.DC is a device context onto which graphics and text can be
2875 drawn. It is intended to represent a number of output devices in a
2876 generic way, so a window can have a device context associated with it,
2877 and a printer also has a device context. In this way, the same piece
2878 of code may write to a number of different devices, if the device
2879 context is used as a parameter.
2880
2881 Derived types of wxDC have documentation for specific features only,
2882 so refer to this section for most device context information.
2883
2884 The wx.DC class is abstract and can not be instantiated, you must use
2885 one of the derived classes instead. Which one will depend on the
2886 situation in which it is used.
2887 """
0085ce49
RD
2888 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2889 def __init__(self): raise AttributeError, "No constructor defined"
2890 __repr__ = _swig_repr
2891 __swig_destroy__ = _gdi_.delete_DC
2892 __del__ = lambda self : None;
c26d9ab4
RD
2893 # These have been deprecated in wxWidgets. Since they never
2894 # really did anything to begin with, just make them be NOPs.
2895 def BeginDrawing(self): pass
2896 def EndDrawing(self): pass
e811c8ce 2897
e811c8ce 2898 def FloodFill(*args, **kwargs):
f5b96ee1
RD
2899 """
2900 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2901
2902 Flood fills the device context starting from the given point, using
2903 the current brush colour, and using a style:
2904
2905 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2906 the given colour is encountered.
2907
2908 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2909 colour.
2910
2911 Returns False if the operation failed.
2912
2913 Note: The present implementation for non-Windows platforms may fail to
2914 find colour borders if the pixels do not match the colour
2915 exactly. However the function will still return true.
2916 """
54f9ee45 2917 return _gdi_.DC_FloodFill(*args, **kwargs)
e811c8ce 2918
03e37cd5 2919 def FloodFillPoint(*args, **kwargs):
f5b96ee1
RD
2920 """
2921 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2922
2923 Flood fills the device context starting from the given point, using
2924 the current brush colour, and using a style:
2925
2926 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2927 the given colour is encountered.
2928
2929 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2930 colour.
2931
2932 Returns False if the operation failed.
2933
2934 Note: The present implementation for non-Windows platforms may fail to
2935 find colour borders if the pixels do not match the colour
2936 exactly. However the function will still return true.
2937 """
03e37cd5 2938 return _gdi_.DC_FloodFillPoint(*args, **kwargs)
e811c8ce 2939
b1fcee84
RD
2940 def GradientFillConcentric(*args, **kwargs):
2941 """
2942 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2943 Point circleCenter)
2944
2945 Fill the area specified by rect with a radial gradient, starting from
2946 initialColour in the center of the circle and fading to destColour on
2947 the outside of the circle. The circleCenter argument is the relative
2948 coordinants of the center of the circle in the specified rect.
2949
2950 Note: Currently this function is very slow, don't use it for real-time
2951 drawing.
2952 """
2953 return _gdi_.DC_GradientFillConcentric(*args, **kwargs)
2954
2955 def GradientFillLinear(*args, **kwargs):
2956 """
2957 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2958 int nDirection=EAST)
2959
2960 Fill the area specified by rect with a linear gradient, starting from
2961 initialColour and eventually fading to destColour. The nDirection
2962 parameter specifies the direction of the colour change, default is to
2963 use initialColour on the left part of the rectangle and destColour on
2964 the right side.
2965 """
2966 return _gdi_.DC_GradientFillLinear(*args, **kwargs)
2967
e811c8ce 2968 def GetPixel(*args, **kwargs):
f5b96ee1
RD
2969 """
2970 GetPixel(self, int x, int y) -> Colour
2971
2972 Gets the colour at the specified location on the DC.
2973 """
54f9ee45 2974 return _gdi_.DC_GetPixel(*args, **kwargs)
e811c8ce 2975
03e37cd5
RD
2976 def GetPixelPoint(*args, **kwargs):
2977 """GetPixelPoint(self, Point pt) -> Colour"""
2978 return _gdi_.DC_GetPixelPoint(*args, **kwargs)
e811c8ce
RD
2979
2980 def DrawLine(*args, **kwargs):
f5b96ee1
RD
2981 """
2982 DrawLine(self, int x1, int y1, int x2, int y2)
2983
2984 Draws a line from the first point to the second. The current pen is
2985 used for drawing the line. Note that the second point is *not* part of
2986 the line and is not drawn by this function (this is consistent with
2987 the behaviour of many other toolkits).
2988 """
54f9ee45 2989 return _gdi_.DC_DrawLine(*args, **kwargs)
e811c8ce 2990
03e37cd5 2991 def DrawLinePoint(*args, **kwargs):
f5b96ee1
RD
2992 """
2993 DrawLinePoint(self, Point pt1, Point pt2)
2994
2995 Draws a line from the first point to the second. The current pen is
2996 used for drawing the line. Note that the second point is *not* part of
2997 the line and is not drawn by this function (this is consistent with
2998 the behaviour of many other toolkits).
2999 """
03e37cd5 3000 return _gdi_.DC_DrawLinePoint(*args, **kwargs)
e811c8ce
RD
3001
3002 def CrossHair(*args, **kwargs):
f5b96ee1
RD
3003 """
3004 CrossHair(self, int x, int y)
3005
3006 Displays a cross hair using the current pen. This is a vertical and
3007 horizontal line the height and width of the window, centred on the
3008 given point.
3009 """
54f9ee45 3010 return _gdi_.DC_CrossHair(*args, **kwargs)
e811c8ce 3011
03e37cd5 3012 def CrossHairPoint(*args, **kwargs):
f5b96ee1
RD
3013 """
3014 CrossHairPoint(self, Point pt)
3015
3016 Displays a cross hair using the current pen. This is a vertical and
3017 horizontal line the height and width of the window, centred on the
3018 given point.
3019 """
03e37cd5 3020 return _gdi_.DC_CrossHairPoint(*args, **kwargs)
e811c8ce
RD
3021
3022 def DrawArc(*args, **kwargs):
f5b96ee1
RD
3023 """
3024 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
3025
3026 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3027 the first point to the second. The current pen is used for the outline
3028 and the current brush for filling the shape.
3029
3030 The arc is drawn in an anticlockwise direction from the start point to
3031 the end point.
3032 """
54f9ee45 3033 return _gdi_.DC_DrawArc(*args, **kwargs)
e811c8ce 3034
03e37cd5 3035 def DrawArcPoint(*args, **kwargs):
f5b96ee1
RD
3036 """
3037 DrawArcPoint(self, Point pt1, Point pt2, Point center)
3038
3039 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3040 the first point to the second. The current pen is used for the outline
3041 and the current brush for filling the shape.
3042
3043 The arc is drawn in an anticlockwise direction from the start point to
3044 the end point.
3045 """
03e37cd5 3046 return _gdi_.DC_DrawArcPoint(*args, **kwargs)
e811c8ce
RD
3047
3048 def DrawCheckMark(*args, **kwargs):
f5b96ee1
RD
3049 """
3050 DrawCheckMark(self, int x, int y, int width, int height)
3051
3052 Draws a check mark inside the given rectangle.
3053 """
54f9ee45 3054 return _gdi_.DC_DrawCheckMark(*args, **kwargs)
e811c8ce 3055
03e37cd5 3056 def DrawCheckMarkRect(*args, **kwargs):
f5b96ee1
RD
3057 """
3058 DrawCheckMarkRect(self, Rect rect)
3059
3060 Draws a check mark inside the given rectangle.
3061 """
03e37cd5 3062 return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
e811c8ce
RD
3063
3064 def DrawEllipticArc(*args, **kwargs):
f5b96ee1
RD
3065 """
3066 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3067
3068 Draws an arc of an ellipse, with the given rectangle defining the
3069 bounds of the ellipse. The current pen is used for drawing the arc and
3070 the current brush is used for drawing the pie.
3071
3072 The *start* and *end* parameters specify the start and end of the arc
3073 relative to the three-o'clock position from the center of the
3074 rectangle. Angles are specified in degrees (360 is a complete
3075 circle). Positive values mean counter-clockwise motion. If start is
3076 equal to end, a complete ellipse will be drawn.
3077 """
54f9ee45 3078 return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
e811c8ce 3079
03e37cd5 3080 def DrawEllipticArcPointSize(*args, **kwargs):
f5b96ee1
RD
3081 """
3082 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3083
3084 Draws an arc of an ellipse, with the given rectangle defining the
3085 bounds of the ellipse. The current pen is used for drawing the arc and
3086 the current brush is used for drawing the pie.
3087
3088 The *start* and *end* parameters specify the start and end of the arc
3089 relative to the three-o'clock position from the center of the
3090 rectangle. Angles are specified in degrees (360 is a complete
3091 circle). Positive values mean counter-clockwise motion. If start is
3092 equal to end, a complete ellipse will be drawn.
3093 """
03e37cd5 3094 return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
e811c8ce
RD
3095
3096 def DrawPoint(*args, **kwargs):
f5b96ee1
RD
3097 """
3098 DrawPoint(self, int x, int y)
3099
3100 Draws a point using the current pen.
3101 """
54f9ee45 3102 return _gdi_.DC_DrawPoint(*args, **kwargs)
e811c8ce 3103
03e37cd5 3104 def DrawPointPoint(*args, **kwargs):
f5b96ee1
RD
3105 """
3106 DrawPointPoint(self, Point pt)
3107
3108 Draws a point using the current pen.
3109 """
03e37cd5 3110 return _gdi_.DC_DrawPointPoint(*args, **kwargs)
e811c8ce
RD
3111
3112 def DrawRectangle(*args, **kwargs):
f5b96ee1
RD
3113 """
3114 DrawRectangle(self, int x, int y, int width, int height)
3115
3116 Draws a rectangle with the given top left corner, and with the given
3117 size. The current pen is used for the outline and the current brush
3118 for filling the shape.
3119 """
54f9ee45 3120 return _gdi_.DC_DrawRectangle(*args, **kwargs)
e811c8ce
RD
3121
3122 def DrawRectangleRect(*args, **kwargs):
f5b96ee1
RD
3123 """
3124 DrawRectangleRect(self, Rect rect)
3125
3126 Draws a rectangle with the given top left corner, and with the given
3127 size. The current pen is used for the outline and the current brush
3128 for filling the shape.
3129 """
54f9ee45 3130 return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
e811c8ce 3131
03e37cd5 3132 def DrawRectanglePointSize(*args, **kwargs):
f5b96ee1
RD
3133 """
3134 DrawRectanglePointSize(self, Point pt, Size sz)
3135
3136 Draws a rectangle with the given top left corner, and with the given
3137 size. The current pen is used for the outline and the current brush
3138 for filling the shape.
3139 """
03e37cd5 3140 return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
e811c8ce
RD
3141
3142 def DrawRoundedRectangle(*args, **kwargs):
f5b96ee1
RD
3143 """
3144 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3145
3146 Draws a rectangle with the given top left corner, and with the given
3147 size. The corners are quarter-circles using the given radius. The
3148 current pen is used for the outline and the current brush for filling
3149 the shape.
3150
3151 If radius is positive, the value is assumed to be the radius of the
3152 rounded corner. If radius is negative, the absolute value is assumed
3153 to be the proportion of the smallest dimension of the rectangle. This
3154 means that the corner can be a sensible size relative to the size of
3155 the rectangle, and also avoids the strange effects X produces when the
3156 corners are too big for the rectangle.
3157 """
54f9ee45 3158 return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
e811c8ce
RD
3159
3160 def DrawRoundedRectangleRect(*args, **kwargs):
f5b96ee1
RD
3161 """
3162 DrawRoundedRectangleRect(self, Rect r, double radius)
3163
3164 Draws a rectangle with the given top left corner, and with the given
3165 size. The corners are quarter-circles using the given radius. The
3166 current pen is used for the outline and the current brush for filling
3167 the shape.
3168
3169 If radius is positive, the value is assumed to be the radius of the
3170 rounded corner. If radius is negative, the absolute value is assumed
3171 to be the proportion of the smallest dimension of the rectangle. This
3172 means that the corner can be a sensible size relative to the size of
3173 the rectangle, and also avoids the strange effects X produces when the
3174 corners are too big for the rectangle.
3175 """
54f9ee45 3176 return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
e811c8ce 3177
03e37cd5 3178 def DrawRoundedRectanglePointSize(*args, **kwargs):
f5b96ee1
RD
3179 """
3180 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3181
3182 Draws a rectangle with the given top left corner, and with the given
3183 size. The corners are quarter-circles using the given radius. The
3184 current pen is used for the outline and the current brush for filling
3185 the shape.
3186
3187 If radius is positive, the value is assumed to be the radius of the
3188 rounded corner. If radius is negative, the absolute value is assumed
3189 to be the proportion of the smallest dimension of the rectangle. This
3190 means that the corner can be a sensible size relative to the size of
3191 the rectangle, and also avoids the strange effects X produces when the
3192 corners are too big for the rectangle.
3193 """
03e37cd5 3194 return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
e811c8ce
RD
3195
3196 def DrawCircle(*args, **kwargs):
f5b96ee1
RD
3197 """
3198 DrawCircle(self, int x, int y, int radius)
3199
3200 Draws a circle with the given center point and radius. The current
3201 pen is used for the outline and the current brush for filling the
3202 shape.
3203 """
54f9ee45 3204 return _gdi_.DC_DrawCircle(*args, **kwargs)
e811c8ce 3205
03e37cd5 3206 def DrawCirclePoint(*args, **kwargs):
f5b96ee1
RD
3207 """
3208 DrawCirclePoint(self, Point pt, int radius)
3209
3210 Draws a circle with the given center point and radius. The current
3211 pen is used for the outline and the current brush for filling the
3212 shape.
3213 """
03e37cd5 3214 return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
e811c8ce
RD
3215
3216 def DrawEllipse(*args, **kwargs):
f5b96ee1
RD
3217 """
3218 DrawEllipse(self, int x, int y, int width, int height)
3219
3220 Draws an ellipse contained in the specified rectangle. The current pen
3221 is used for the outline and the current brush for filling the shape.
3222 """
54f9ee45 3223 return _gdi_.DC_DrawEllipse(*args, **kwargs)
e811c8ce
RD
3224
3225 def DrawEllipseRect(*args, **kwargs):
f5b96ee1
RD
3226 """
3227 DrawEllipseRect(self, Rect rect)
3228
3229 Draws an ellipse contained in the specified rectangle. The current pen
3230 is used for the outline and the current brush for filling the shape.
3231 """
54f9ee45 3232 return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
e811c8ce 3233
03e37cd5 3234 def DrawEllipsePointSize(*args, **kwargs):
f5b96ee1
RD
3235 """
3236 DrawEllipsePointSize(self, Point pt, Size sz)
3237
3238 Draws an ellipse contained in the specified rectangle. The current pen
3239 is used for the outline and the current brush for filling the shape.
3240 """
03e37cd5 3241 return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
e811c8ce
RD
3242
3243 def DrawIcon(*args, **kwargs):
f5b96ee1
RD
3244 """
3245 DrawIcon(self, Icon icon, int x, int y)
3246
3247 Draw an icon on the display (does nothing if the device context is
3248 PostScript). This can be the simplest way of drawing bitmaps on a
3249 window.
3250 """
54f9ee45 3251 return _gdi_.DC_DrawIcon(*args, **kwargs)
e811c8ce 3252
03e37cd5 3253 def DrawIconPoint(*args, **kwargs):
f5b96ee1
RD
3254 """
3255 DrawIconPoint(self, Icon icon, Point pt)
3256
3257 Draw an icon on the display (does nothing if the device context is
3258 PostScript). This can be the simplest way of drawing bitmaps on a
3259 window.
3260 """
03e37cd5 3261 return _gdi_.DC_DrawIconPoint(*args, **kwargs)
e811c8ce
RD
3262
3263 def DrawBitmap(*args, **kwargs):
f5b96ee1
RD
3264 """
3265 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3266
3267 Draw a bitmap on the device context at the specified point. If
3268 *transparent* is true and the bitmap has a transparency mask, (or
3269 alpha channel on the platforms that support it) then the bitmap will
3270 be drawn transparently.
3271 """
54f9ee45 3272 return _gdi_.DC_DrawBitmap(*args, **kwargs)
e811c8ce 3273
03e37cd5 3274 def DrawBitmapPoint(*args, **kwargs):
f5b96ee1
RD
3275 """
3276 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3277
3278 Draw a bitmap on the device context at the specified point. If
3279 *transparent* is true and the bitmap has a transparency mask, (or
3280 alpha channel on the platforms that support it) then the bitmap will
3281 be drawn transparently.
3282 """
03e37cd5 3283 return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
e811c8ce
RD
3284
3285 def DrawText(*args, **kwargs):
f5b96ee1
RD
3286 """
3287 DrawText(self, String text, int x, int y)
3288
3289 Draws a text string at the specified point, using the current text
3290 font, and the current text foreground and background colours.
3291
3292 The coordinates refer to the top-left corner of the rectangle bounding
3293 the string. See `GetTextExtent` for how to get the dimensions of a
3294 text string, which can be used to position the text more precisely.
3295
3296 **NOTE**: under wxGTK the current logical function is used by this
3297 function but it is ignored by wxMSW. Thus, you should avoid using
3298 logical functions with this function in portable programs.
3299 """
54f9ee45 3300 return _gdi_.DC_DrawText(*args, **kwargs)
e811c8ce 3301
03e37cd5 3302 def DrawTextPoint(*args, **kwargs):
f5b96ee1
RD
3303 """
3304 DrawTextPoint(self, String text, Point pt)
3305
3306 Draws a text string at the specified point, using the current text
3307 font, and the current text foreground and background colours.
3308
3309 The coordinates refer to the top-left corner of the rectangle bounding
3310 the string. See `GetTextExtent` for how to get the dimensions of a
3311 text string, which can be used to position the text more precisely.
3312
3313 **NOTE**: under wxGTK the current logical function is used by this
3314 function but it is ignored by wxMSW. Thus, you should avoid using
3315 logical functions with this function in portable programs.
3316 """
03e37cd5 3317 return _gdi_.DC_DrawTextPoint(*args, **kwargs)
e811c8ce
RD
3318
3319 def DrawRotatedText(*args, **kwargs):
f5b96ee1
RD
3320 """
3321 DrawRotatedText(self, String text, int x, int y, double angle)
3322
3323 Draws the text rotated by *angle* degrees, if supported by the platform.
3324
3325 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3326 function. In particular, a font different from ``wx.NORMAL_FONT``
3327 should be used as the it is not normally a TrueType
3328 font. ``wx.SWISS_FONT`` is an example of a font which is.
3329 """
54f9ee45 3330 return _gdi_.DC_DrawRotatedText(*args, **kwargs)
e811c8ce 3331
03e37cd5 3332 def DrawRotatedTextPoint(*args, **kwargs):
f5b96ee1
RD
3333 """
3334 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3335
3336 Draws the text rotated by *angle* degrees, if supported by the platform.
3337
3338 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3339 function. In particular, a font different from ``wx.NORMAL_FONT``
3340 should be used as the it is not normally a TrueType
3341 font. ``wx.SWISS_FONT`` is an example of a font which is.
3342 """
03e37cd5
RD
3343 return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
3344
3345 def Blit(*args, **kwargs):
0df68c9f 3346 """
03e37cd5 3347 Blit(self, int xdest, int ydest, int width, int height, DC source,
0df68c9f
RD
3348 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3349 int xsrcMask=-1, int ysrcMask=-1) -> bool
f5b96ee1
RD
3350
3351 Copy from a source DC to this DC. Parameters specify the destination
3352 coordinates, size of area to copy, source DC, source coordinates,
3353 logical function, whether to use a bitmap mask, and mask source
3354 position.
0df68c9f 3355 """
03e37cd5 3356 return _gdi_.DC_Blit(*args, **kwargs)
e811c8ce 3357
03e37cd5 3358 def BlitPointSize(*args, **kwargs):
0df68c9f 3359 """
03e37cd5 3360 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
0df68c9f 3361 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
f5b96ee1
RD
3362
3363 Copy from a source DC to this DC. Parameters specify the destination
3364 coordinates, size of area to copy, source DC, source coordinates,
3365 logical function, whether to use a bitmap mask, and mask source
3366 position.
0df68c9f 3367 """
03e37cd5
RD
3368 return _gdi_.DC_BlitPointSize(*args, **kwargs)
3369
3370 def SetClippingRegion(*args, **kwargs):
f5b96ee1
RD
3371 """
3372 SetClippingRegion(self, int x, int y, int width, int height)
3373
3374 Sets the clipping region for this device context to the intersection
3375 of the given region described by the parameters of this method and the
3376 previously set clipping region. You should call `DestroyClippingRegion`
3377 if you want to set the clipping region exactly to the region
3378 specified.
3379
3380 The clipping region is an area to which drawing is
3381 restricted. Possible uses for the clipping region are for clipping
3382 text or for speeding up window redraws when only a known area of the
3383 screen is damaged.
3384 """
03e37cd5
RD
3385 return _gdi_.DC_SetClippingRegion(*args, **kwargs)
3386
3387 def SetClippingRegionPointSize(*args, **kwargs):
f5b96ee1
RD
3388 """
3389 SetClippingRegionPointSize(self, Point pt, Size sz)
3390
3391 Sets the clipping region for this device context to the intersection
3392 of the given region described by the parameters of this method and the
3393 previously set clipping region. You should call `DestroyClippingRegion`
3394 if you want to set the clipping region exactly to the region
3395 specified.
3396
3397 The clipping region is an area to which drawing is
3398 restricted. Possible uses for the clipping region are for clipping
3399 text or for speeding up window redraws when only a known area of the
3400 screen is damaged.
3401 """
03e37cd5
RD
3402 return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
3403
3404 def SetClippingRegionAsRegion(*args, **kwargs):
f5b96ee1
RD
3405 """
3406 SetClippingRegionAsRegion(self, Region region)
3407
3408 Sets the clipping region for this device context to the intersection
3409 of the given region described by the parameters of this method and the
3410 previously set clipping region. You should call `DestroyClippingRegion`
3411 if you want to set the clipping region exactly to the region
3412 specified.
3413
3414 The clipping region is an area to which drawing is
3415 restricted. Possible uses for the clipping region are for clipping
3416 text or for speeding up window redraws when only a known area of the
3417 screen is damaged.
3418 """
03e37cd5
RD
3419 return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
3420
3421 def SetClippingRect(*args, **kwargs):
f5b96ee1
RD
3422 """
3423 SetClippingRect(self, Rect rect)
3424
3425 Sets the clipping region for this device context to the intersection
3426 of the given region described by the parameters of this method and the
3427 previously set clipping region. You should call `DestroyClippingRegion`
3428 if you want to set the clipping region exactly to the region
3429 specified.
3430
3431 The clipping region is an area to which drawing is
3432 restricted. Possible uses for the clipping region are for clipping
3433 text or for speeding up window redraws when only a known area of the
3434 screen is damaged.
3435 """
03e37cd5 3436 return _gdi_.DC_SetClippingRect(*args, **kwargs)
e811c8ce
RD
3437
3438 def DrawLines(*args, **kwargs):
f5b96ee1
RD
3439 """
3440 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3441
3442 Draws lines using a sequence of `wx.Point` objects, adding the
3443 optional offset coordinate. The current pen is used for drawing the
3444 lines.
3445 """
54f9ee45 3446 return _gdi_.DC_DrawLines(*args, **kwargs)
e811c8ce
RD
3447
3448 def DrawPolygon(*args, **kwargs):
0df68c9f 3449 """
f5b96ee1 3450 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
0df68c9f 3451 int fillStyle=ODDEVEN_RULE)
f5b96ee1
RD
3452
3453 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3454 the optional offset coordinate. The last argument specifies the fill
3455 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3456
3457 The current pen is used for drawing the outline, and the current brush
3458 for filling the shape. Using a transparent brush suppresses
3459 filling. Note that wxWidgets automatically closes the first and last
3460 points.
0df68c9f 3461 """
54f9ee45 3462 return _gdi_.DC_DrawPolygon(*args, **kwargs)
e811c8ce
RD
3463
3464 def DrawLabel(*args, **kwargs):
0df68c9f 3465 """
a95a7133 3466 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
0df68c9f 3467 int indexAccel=-1)
f5b96ee1
RD
3468
3469 Draw *text* within the specified rectangle, abiding by the alignment
3470 flags. Will additionally emphasize the character at *indexAccel* if
3471 it is not -1.
0df68c9f 3472 """
54f9ee45 3473 return _gdi_.DC_DrawLabel(*args, **kwargs)
e811c8ce
RD
3474
3475 def DrawImageLabel(*args, **kwargs):
0df68c9f 3476 """
a95a7133 3477 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
0df68c9f 3478 int indexAccel=-1) -> Rect
f5b96ee1
RD
3479
3480 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3481 drawing it) within the specified rectangle, abiding by the alignment
3482 flags. Will additionally emphasize the character at *indexAccel* if
3483 it is not -1. Returns the bounding rectangle.
0df68c9f 3484 """
54f9ee45 3485 return _gdi_.DC_DrawImageLabel(*args, **kwargs)
e811c8ce
RD
3486
3487 def DrawSpline(*args, **kwargs):
f5b96ee1
RD
3488 """
3489 DrawSpline(self, List points)
3490
3491 Draws a spline between all given control points, (a list of `wx.Point`
3492 objects) using the current pen. The spline is drawn using a series of
3493 lines, using an algorithm taken from the X drawing program 'XFIG'.
3494 """
54f9ee45 3495 return _gdi_.DC_DrawSpline(*args, **kwargs)
e811c8ce
RD
3496
3497 def Clear(*args, **kwargs):
f5b96ee1
RD
3498 """
3499 Clear(self)
3500
3501 Clears the device context using the current background brush.
3502 """
54f9ee45 3503 return _gdi_.DC_Clear(*args, **kwargs)
e811c8ce
RD
3504
3505 def StartDoc(*args, **kwargs):
f5b96ee1
RD
3506 """
3507 StartDoc(self, String message) -> bool
3508
3509 Starts a document (only relevant when outputting to a
3510 printer). *Message* is a message to show whilst printing.
3511 """
54f9ee45 3512 return _gdi_.DC_StartDoc(*args, **kwargs)
e811c8ce
RD
3513
3514 def EndDoc(*args, **kwargs):
f5b96ee1
RD
3515 """
3516 EndDoc(self)
3517
3518 Ends a document (only relevant when outputting to a printer).
3519 """
54f9ee45 3520 return _gdi_.DC_EndDoc(*args, **kwargs)
e811c8ce
RD
3521
3522 def StartPage(*args, **kwargs):
f5b96ee1
RD
3523 """
3524 StartPage(self)
3525
3526 Starts a document page (only relevant when outputting to a printer).
3527 """
54f9ee45 3528 return _gdi_.DC_StartPage(*args, **kwargs)
e811c8ce
RD
3529
3530 def EndPage(*args, **kwargs):
f5b96ee1
RD
3531 """
3532 EndPage(self)
3533
3534 Ends a document page (only relevant when outputting to a printer).
3535 """
54f9ee45 3536 return _gdi_.DC_EndPage(*args, **kwargs)
e811c8ce
RD
3537
3538 def SetFont(*args, **kwargs):
f5b96ee1
RD
3539 """
3540 SetFont(self, Font font)
3541
3542 Sets the current font for the DC. It must be a valid font, in
3543 particular you should not pass ``wx.NullFont`` to this method.
3544 """
54f9ee45 3545 return _gdi_.DC_SetFont(*args, **kwargs)
e811c8ce
RD
3546
3547 def SetPen(*args, **kwargs):
f5b96ee1
RD
3548 """
3549 SetPen(self, Pen pen)
3550
3551 Sets the current pen for the DC.
3552
3553 If the argument is ``wx.NullPen``, the current pen is selected out of the
3554 device context, and the original pen restored.
3555 """
54f9ee45 3556 return _gdi_.DC_SetPen(*args, **kwargs)
e811c8ce
RD
3557
3558 def SetBrush(*args, **kwargs):
f5b96ee1
RD
3559 """
3560 SetBrush(self, Brush brush)
3561
3562 Sets the current brush for the DC.
3563
3564 If the argument is ``wx.NullBrush``, the current brush is selected out
3565 of the device context, and the original brush restored, allowing the
3566 current brush to be destroyed safely.
3567 """
54f9ee45 3568 return _gdi_.DC_SetBrush(*args, **kwargs)
e811c8ce
RD
3569
3570 def SetBackground(*args, **kwargs):
f5b96ee1
RD
3571 """
3572 SetBackground(self, Brush brush)
3573
3574 Sets the current background brush for the DC.
3575 """
54f9ee45 3576 return _gdi_.DC_SetBackground(*args, **kwargs)
e811c8ce
RD
3577
3578 def SetBackgroundMode(*args, **kwargs):
f5b96ee1
RD
3579 """
3580 SetBackgroundMode(self, int mode)
3581
3582 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3583 determines whether text will be drawn with a background colour or
3584 not.
3585 """
54f9ee45 3586 return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
e811c8ce
RD
3587
3588 def SetPalette(*args, **kwargs):
f5b96ee1
RD
3589 """
3590 SetPalette(self, Palette palette)
3591
3592 If this is a window DC or memory DC, assigns the given palette to the
3593 window or bitmap associated with the DC. If the argument is
3594 ``wx.NullPalette``, the current palette is selected out of the device
3595 context, and the original palette restored.
3596 """
54f9ee45 3597 return _gdi_.DC_SetPalette(*args, **kwargs)
e811c8ce 3598
e811c8ce 3599 def DestroyClippingRegion(*args, **kwargs):
f5b96ee1
RD
3600 """
3601 DestroyClippingRegion(self)
3602
3603 Destroys the current clipping region so that none of the DC is
3604 clipped.
3605 """
54f9ee45 3606 return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
e811c8ce
RD
3607
3608 def GetClippingBox(*args, **kwargs):
f5b96ee1
RD
3609 """
3610 GetClippingBox() -> (x, y, width, height)
3611
3612 Gets the rectangle surrounding the current clipping region.
3613 """
54f9ee45 3614 return _gdi_.DC_GetClippingBox(*args, **kwargs)
e811c8ce
RD
3615
3616 def GetClippingRect(*args, **kwargs):
f5b96ee1
RD
3617 """
3618 GetClippingRect(self) -> Rect
3619
3620 Gets the rectangle surrounding the current clipping region.
3621 """
54f9ee45 3622 return _gdi_.DC_GetClippingRect(*args, **kwargs)
e811c8ce
RD
3623
3624 def GetCharHeight(*args, **kwargs):
f5b96ee1
RD
3625 """
3626 GetCharHeight(self) -> int
3627
3628 Gets the character height of the currently set font.
3629 """
54f9ee45 3630 return _gdi_.DC_GetCharHeight(*args, **kwargs)
e811c8ce
RD
3631
3632 def GetCharWidth(*args, **kwargs):
f5b96ee1
RD
3633 """
3634 GetCharWidth(self) -> int
3635
3636 Gets the average character width of the currently set font.
3637 """
54f9ee45 3638 return _gdi_.DC_GetCharWidth(*args, **kwargs)
e811c8ce
RD
3639
3640 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
3641 """
3642 GetTextExtent(wxString string) -> (width, height)
3643
3644 Get the width and height of the text using the current font. Only
3645 works for single line strings.
3646 """
54f9ee45 3647 return _gdi_.DC_GetTextExtent(*args, **kwargs)
e811c8ce
RD
3648
3649 def GetFullTextExtent(*args, **kwargs):
0df68c9f
RD
3650 """
3651 GetFullTextExtent(wxString string, Font font=None) ->
3652 (width, height, descent, externalLeading)
322913ce 3653
41e2b43e
RD
3654 Get the width, height, decent and leading of the text using the
3655 current or specified font. Only works for single line strings.
0df68c9f 3656 """
54f9ee45 3657 return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
3658
3659 def GetMultiLineTextExtent(*args, **kwargs):
0df68c9f
RD
3660 """
3661 GetMultiLineTextExtent(wxString string, Font font=None) ->
fc46b7f3 3662 (width, height, lineHeight)
fd2dc343 3663
777e547f 3664 Get the width, height, and line height of the text using the
fd2dc343
RD
3665 current or specified font. Works for single as well as multi-line
3666 strings.
0df68c9f 3667 """
54f9ee45 3668 return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
e811c8ce 3669
db914595 3670 def GetPartialTextExtents(*args, **kwargs):
f5b96ee1
RD
3671 """
3672 GetPartialTextExtents(self, text) -> [widths]
3673
3674 Returns a list of integers such that each value is the distance in
3675 pixels from the begining of text to the coresponding character of
3676 *text*. The generic version simply builds a running total of the widths
3677 of each character using GetTextExtent, however if the various
3678 platforms have a native API function that is faster or more accurate
43e8916f 3679 than the generic implementation then it will be used instead.
f5b96ee1 3680 """
54f9ee45 3681 return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
db914595 3682
e811c8ce 3683 def GetSize(*args, **kwargs):
0df68c9f 3684 """
a95a7133 3685 GetSize(self) -> Size
322913ce 3686
f5b96ee1
RD
3687 This gets the horizontal and vertical resolution in device units. It
3688 can be used to scale graphics to fit the page. For example, if *maxX*
3689 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3690 used in your application, the following code will scale the graphic to
3691 fit on the printer page::
3692
3693 w, h = dc.GetSize()
3694 scaleX = maxX*1.0 / w
3695 scaleY = maxY*1.0 / h
3696 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3697
0df68c9f 3698 """
54f9ee45 3699 return _gdi_.DC_GetSize(*args, **kwargs)
e811c8ce 3700
322913ce 3701 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
3702 """
3703 GetSizeTuple() -> (width, height)
322913ce 3704
f5b96ee1
RD
3705 This gets the horizontal and vertical resolution in device units. It
3706 can be used to scale graphics to fit the page. For example, if *maxX*
3707 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3708 used in your application, the following code will scale the graphic to
3709 fit on the printer page::
3710
3711 w, h = dc.GetSize()
3712 scaleX = maxX*1.0 / w
3713 scaleY = maxY*1.0 / h
3714 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3715
0df68c9f 3716 """
54f9ee45 3717 return _gdi_.DC_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
3718
3719 def GetSizeMM(*args, **kwargs):
0df68c9f 3720 """
a95a7133 3721 GetSizeMM(self) -> Size
322913ce 3722
0df68c9f
RD
3723 Get the DC size in milimeters.
3724 """
54f9ee45 3725 return _gdi_.DC_GetSizeMM(*args, **kwargs)
e811c8ce 3726
322913ce 3727 def GetSizeMMTuple(*args, **kwargs):
0df68c9f
RD
3728 """
3729 GetSizeMMTuple() -> (width, height)
322913ce 3730
0df68c9f
RD
3731 Get the DC size in milimeters.
3732 """
54f9ee45 3733 return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
322913ce 3734
e811c8ce 3735 def DeviceToLogicalX(*args, **kwargs):
f5b96ee1
RD
3736 """
3737 DeviceToLogicalX(self, int x) -> int
3738
3739 Convert device X coordinate to logical coordinate, using the current
3740 mapping mode.
3741 """
54f9ee45 3742 return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
e811c8ce
RD
3743
3744 def DeviceToLogicalY(*args, **kwargs):
f5b96ee1
RD
3745 """
3746 DeviceToLogicalY(self, int y) -> int
3747
3748 Converts device Y coordinate to logical coordinate, using the current
3749 mapping mode.
3750 """
54f9ee45 3751 return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
e811c8ce
RD
3752
3753 def DeviceToLogicalXRel(*args, **kwargs):
f5b96ee1
RD
3754 """
3755 DeviceToLogicalXRel(self, int x) -> int
3756
3757 Convert device X coordinate to relative logical coordinate, using the
3758 current mapping mode but ignoring the x axis orientation. Use this
3759 function for converting a width, for example.
3760 """
54f9ee45 3761 return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
e811c8ce
RD
3762
3763 def DeviceToLogicalYRel(*args, **kwargs):
f5b96ee1
RD
3764 """
3765 DeviceToLogicalYRel(self, int y) -> int
3766
3767 Convert device Y coordinate to relative logical coordinate, using the
3768 current mapping mode but ignoring the y axis orientation. Use this
3769 function for converting a height, for example.
3770 """
54f9ee45 3771 return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
e811c8ce
RD
3772
3773 def LogicalToDeviceX(*args, **kwargs):
f5b96ee1
RD
3774 """
3775 LogicalToDeviceX(self, int x) -> int
3776
3777 Converts logical X coordinate to device coordinate, using the current
3778 mapping mode.
3779 """
54f9ee45 3780 return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
e811c8ce
RD
3781
3782 def LogicalToDeviceY(*args, **kwargs):
f5b96ee1
RD
3783 """
3784 LogicalToDeviceY(self, int y) -> int
3785
3786 Converts logical Y coordinate to device coordinate, using the current
3787 mapping mode.
3788 """
54f9ee45 3789 return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
e811c8ce
RD
3790
3791 def LogicalToDeviceXRel(*args, **kwargs):
f5b96ee1
RD
3792 """
3793 LogicalToDeviceXRel(self, int x) -> int
3794
3795 Converts logical X coordinate to relative device coordinate, using the
3796 current mapping mode but ignoring the x axis orientation. Use this for
3797 converting a width, for example.
3798 """
54f9ee45 3799 return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
e811c8ce
RD
3800
3801 def LogicalToDeviceYRel(*args, **kwargs):
f5b96ee1
RD
3802 """
3803 LogicalToDeviceYRel(self, int y) -> int
3804
3805 Converts logical Y coordinate to relative device coordinate, using the
3806 current mapping mode but ignoring the y axis orientation. Use this for
3807 converting a height, for example.
3808 """
54f9ee45 3809 return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
e811c8ce
RD
3810
3811 def CanDrawBitmap(*args, **kwargs):
a95a7133 3812 """CanDrawBitmap(self) -> bool"""
54f9ee45 3813 return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
e811c8ce
RD
3814
3815 def CanGetTextExtent(*args, **kwargs):
a95a7133 3816 """CanGetTextExtent(self) -> bool"""
54f9ee45 3817 return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
e811c8ce
RD
3818
3819 def GetDepth(*args, **kwargs):
f5b96ee1
RD
3820 """
3821 GetDepth(self) -> int
3822
3823 Returns the colour depth of the DC.
3824 """
54f9ee45 3825 return _gdi_.DC_GetDepth(*args, **kwargs)
e811c8ce
RD
3826
3827 def GetPPI(*args, **kwargs):
f5b96ee1
RD
3828 """
3829 GetPPI(self) -> Size
3830
453fb36b 3831 Resolution in pixels per inch
f5b96ee1 3832 """
54f9ee45 3833 return _gdi_.DC_GetPPI(*args, **kwargs)
e811c8ce 3834
b39fe951 3835 def IsOk(*args, **kwargs):
f5b96ee1 3836 """
b39fe951 3837 IsOk(self) -> bool
f5b96ee1
RD
3838
3839 Returns true if the DC is ok to use.
3840 """
b39fe951 3841 return _gdi_.DC_IsOk(*args, **kwargs)
e811c8ce 3842
b39fe951 3843 Ok = IsOk
e811c8ce 3844 def GetBackgroundMode(*args, **kwargs):
f5b96ee1
RD
3845 """
3846 GetBackgroundMode(self) -> int
3847
3848 Returns the current background mode, either ``wx.SOLID`` or
3849 ``wx.TRANSPARENT``.
3850 """
54f9ee45 3851 return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
e811c8ce
RD
3852
3853 def GetBackground(*args, **kwargs):
f5b96ee1
RD
3854 """
3855 GetBackground(self) -> Brush
3856
3857 Gets the brush used for painting the background.
3858 """
54f9ee45 3859 return _gdi_.DC_GetBackground(*args, **kwargs)
e811c8ce
RD
3860
3861 def GetBrush(*args, **kwargs):
f5b96ee1
RD
3862 """
3863 GetBrush(self) -> Brush
3864
3865 Gets the current brush
3866 """
54f9ee45 3867 return _gdi_.DC_GetBrush(*args, **kwargs)
e811c8ce
RD
3868
3869 def GetFont(*args, **kwargs):
f5b96ee1
RD
3870 """
3871 GetFont(self) -> Font
3872
3873 Gets the current font
3874 """
54f9ee45 3875 return _gdi_.DC_GetFont(*args, **kwargs)
e811c8ce
RD
3876
3877 def GetPen(*args, **kwargs):
f5b96ee1
RD
3878 """
3879 GetPen(self) -> Pen
3880
3881 Gets the current pen
3882 """
54f9ee45 3883 return _gdi_.DC_GetPen(*args, **kwargs)
e811c8ce
RD
3884
3885 def GetTextBackground(*args, **kwargs):
f5b96ee1
RD
3886 """
3887 GetTextBackground(self) -> Colour
3888
3889 Gets the current text background colour
3890 """
54f9ee45 3891 return _gdi_.DC_GetTextBackground(*args, **kwargs)
e811c8ce
RD
3892
3893 def GetTextForeground(*args, **kwargs):
f5b96ee1
RD
3894 """
3895 GetTextForeground(self) -> Colour
3896
3897 Gets the current text foreground colour
3898 """
54f9ee45 3899 return _gdi_.DC_GetTextForeground(*args, **kwargs)
e811c8ce
RD
3900
3901 def SetTextForeground(*args, **kwargs):
f5b96ee1
RD
3902 """
3903 SetTextForeground(self, Colour colour)
3904
3905 Sets the current text foreground colour for the DC.
3906 """
54f9ee45 3907 return _gdi_.DC_SetTextForeground(*args, **kwargs)
e811c8ce
RD
3908
3909 def SetTextBackground(*args, **kwargs):
f5b96ee1
RD
3910 """
3911 SetTextBackground(self, Colour colour)
3912
3913 Sets the current text background colour for the DC.
3914 """
54f9ee45 3915 return _gdi_.DC_SetTextBackground(*args, **kwargs)
e811c8ce
RD
3916
3917 def GetMapMode(*args, **kwargs):
f5b96ee1
RD
3918 """
3919 GetMapMode(self) -> int
3920
3921 Gets the current *mapping mode* for the device context
3922 """
54f9ee45 3923 return _gdi_.DC_GetMapMode(*args, **kwargs)
e811c8ce
RD
3924
3925 def SetMapMode(*args, **kwargs):
f5b96ee1
RD
3926 """
3927 SetMapMode(self, int mode)
3928
3929 The *mapping mode* of the device context defines the unit of
3930 measurement used to convert logical units to device units. The
3931 mapping mode can be one of the following:
3932
3933 ================ =============================================
3934 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3935 of an inch.
3936 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3937 wx.MM_METRIC Each logical unit is 1 mm.
3938 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3939 wx.MM_TEXT Each logical unit is 1 pixel.
3940 ================ =============================================
3941
3942 """
54f9ee45 3943 return _gdi_.DC_SetMapMode(*args, **kwargs)
e811c8ce
RD
3944
3945 def GetUserScale(*args, **kwargs):
f5b96ee1
RD
3946 """
3947 GetUserScale(self) -> (xScale, yScale)
3948
3949 Gets the current user scale factor (set by `SetUserScale`).
3950 """
54f9ee45 3951 return _gdi_.DC_GetUserScale(*args, **kwargs)
e811c8ce
RD
3952
3953 def SetUserScale(*args, **kwargs):
f5b96ee1
RD
3954 """
3955 SetUserScale(self, double x, double y)
3956
3957 Sets the user scaling factor, useful for applications which require
3958 'zooming'.
3959 """
54f9ee45 3960 return _gdi_.DC_SetUserScale(*args, **kwargs)
e811c8ce
RD
3961
3962 def GetLogicalScale(*args, **kwargs):
322913ce 3963 """GetLogicalScale() -> (xScale, yScale)"""
54f9ee45 3964 return _gdi_.DC_GetLogicalScale(*args, **kwargs)
e811c8ce
RD
3965
3966 def SetLogicalScale(*args, **kwargs):
a95a7133 3967 """SetLogicalScale(self, double x, double y)"""
54f9ee45 3968 return _gdi_.DC_SetLogicalScale(*args, **kwargs)
e811c8ce 3969
e811c8ce 3970 def GetLogicalOrigin(*args, **kwargs):
a95a7133 3971 """GetLogicalOrigin(self) -> Point"""
54f9ee45 3972 return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
e811c8ce 3973
322913ce
RD
3974 def GetLogicalOriginTuple(*args, **kwargs):
3975 """GetLogicalOriginTuple() -> (x,y)"""
54f9ee45 3976 return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
322913ce 3977
e811c8ce 3978 def SetLogicalOrigin(*args, **kwargs):
a95a7133 3979 """SetLogicalOrigin(self, int x, int y)"""
54f9ee45 3980 return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
e811c8ce 3981
03e37cd5
RD
3982 def SetLogicalOriginPoint(*args, **kwargs):
3983 """SetLogicalOriginPoint(self, Point point)"""
3984 return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
3985
e811c8ce 3986 def GetDeviceOrigin(*args, **kwargs):
a95a7133 3987 """GetDeviceOrigin(self) -> Point"""
54f9ee45 3988 return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
e811c8ce 3989
322913ce
RD
3990 def GetDeviceOriginTuple(*args, **kwargs):
3991 """GetDeviceOriginTuple() -> (x,y)"""
54f9ee45 3992 return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
322913ce 3993
e811c8ce 3994 def SetDeviceOrigin(*args, **kwargs):
a95a7133 3995 """SetDeviceOrigin(self, int x, int y)"""
54f9ee45 3996 return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
e811c8ce 3997
03e37cd5
RD
3998 def SetDeviceOriginPoint(*args, **kwargs):
3999 """SetDeviceOriginPoint(self, Point point)"""
4000 return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
4001
e811c8ce 4002 def SetAxisOrientation(*args, **kwargs):
f5b96ee1
RD
4003 """
4004 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
4005
4006 Sets the x and y axis orientation (i.e., the direction from lowest to
4007 highest values on the axis). The default orientation is the natural
4008 orientation, e.g. x axis from left to right and y axis from bottom up.
4009 """
54f9ee45 4010 return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
e811c8ce
RD
4011
4012 def GetLogicalFunction(*args, **kwargs):
f5b96ee1
RD
4013 """
4014 GetLogicalFunction(self) -> int
4015
4016 Gets the current logical function (set by `SetLogicalFunction`).
4017 """
54f9ee45 4018 return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
e811c8ce
RD
4019
4020 def SetLogicalFunction(*args, **kwargs):
f5b96ee1
RD
4021 """
4022 SetLogicalFunction(self, int function)
4023
4024 Sets the current logical function for the device context. This
4025 determines how a source pixel (from a pen or brush colour, or source
4026 device context if using `Blit`) combines with a destination pixel in
4027 the current device context.
4028
4029 The possible values and their meaning in terms of source and
4030 destination pixel values are as follows:
4031
4032 ================ ==========================
4033 wx.AND src AND dst
4034 wx.AND_INVERT (NOT src) AND dst
4035 wx.AND_REVERSE src AND (NOT dst)
4036 wx.CLEAR 0
4037 wx.COPY src
4038 wx.EQUIV (NOT src) XOR dst
4039 wx.INVERT NOT dst
4040 wx.NAND (NOT src) OR (NOT dst)
4041 wx.NOR (NOT src) AND (NOT dst)
4042 wx.NO_OP dst
4043 wx.OR src OR dst
4044 wx.OR_INVERT (NOT src) OR dst
4045 wx.OR_REVERSE src OR (NOT dst)
4046 wx.SET 1
4047 wx.SRC_INVERT NOT src
4048 wx.XOR src XOR dst
4049 ================ ==========================
4050
4051 The default is wx.COPY, which simply draws with the current
4052 colour. The others combine the current colour and the background using
4053 a logical operation. wx.INVERT is commonly used for drawing rubber
4054 bands or moving outlines, since drawing twice reverts to the original
4055 colour.
4056
4057 """
54f9ee45 4058 return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
e811c8ce 4059
5cbf236d 4060 def ComputeScaleAndOrigin(*args, **kwargs):
f5b96ee1 4061 """
5cbf236d 4062 ComputeScaleAndOrigin(self)
f5b96ee1 4063
5cbf236d
RD
4064 Performs all necessary computations for given platform and context
4065 type after each change of scale and origin parameters. Usually called
4066 automatically internally after such changes.
f5b96ee1 4067
f5b96ee1 4068 """
5cbf236d 4069 return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
e811c8ce 4070
5cbf236d
RD
4071 def SetOptimization(self, optimize):
4072 pass
4073 def GetOptimization(self):
4074 return False
f5b96ee1 4075
5cbf236d
RD
4076 SetOptimization = wx._deprecated(SetOptimization)
4077 GetOptimization = wx._deprecated(GetOptimization)
e811c8ce
RD
4078
4079 def CalcBoundingBox(*args, **kwargs):
f5b96ee1
RD
4080 """
4081 CalcBoundingBox(self, int x, int y)
4082
4083 Adds the specified point to the bounding box which can be retrieved
4084 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4085 """
54f9ee45 4086 return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
e811c8ce 4087
03e37cd5 4088 def CalcBoundingBoxPoint(*args, **kwargs):
f5b96ee1
RD
4089 """
4090 CalcBoundingBoxPoint(self, Point point)
4091
4092 Adds the specified point to the bounding box which can be retrieved
4093 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4094 """
03e37cd5
RD
4095 return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
4096
e811c8ce 4097 def ResetBoundingBox(*args, **kwargs):
f5b96ee1
RD
4098 """
4099 ResetBoundingBox(self)
4100
4101 Resets the bounding box: after a call to this function, the bounding
4102 box doesn't contain anything.
4103 """
54f9ee45 4104 return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
e811c8ce
RD
4105
4106 def MinX(*args, **kwargs):
f5b96ee1
RD
4107 """
4108 MinX(self) -> int
4109
4110 Gets the minimum horizontal extent used in drawing commands so far.
4111 """
54f9ee45 4112 return _gdi_.DC_MinX(*args, **kwargs)
e811c8ce
RD
4113
4114 def MaxX(*args, **kwargs):
f5b96ee1
RD
4115 """
4116 MaxX(self) -> int
4117
4118 Gets the maximum horizontal extent used in drawing commands so far.
4119 """
54f9ee45 4120 return _gdi_.DC_MaxX(*args, **kwargs)
e811c8ce
RD
4121
4122 def MinY(*args, **kwargs):
f5b96ee1
RD
4123 """
4124 MinY(self) -> int
4125
4126 Gets the minimum vertical extent used in drawing commands so far.
4127 """
54f9ee45 4128 return _gdi_.DC_MinY(*args, **kwargs)
e811c8ce
RD
4129
4130 def MaxY(*args, **kwargs):
f5b96ee1
RD
4131 """
4132 MaxY(self) -> int
4133
4134 Gets the maximum vertical extent used in drawing commands so far.
4135 """
54f9ee45 4136 return _gdi_.DC_MaxY(*args, **kwargs)
e811c8ce
RD
4137
4138 def GetBoundingBox(*args, **kwargs):
f5b96ee1
RD
4139 """
4140 GetBoundingBox() -> (x1,y1, x2,y2)
4141
4142 Returns the min and max points used in drawing commands so far.
4143 """
54f9ee45 4144 return _gdi_.DC_GetBoundingBox(*args, **kwargs)
e811c8ce 4145
b39fe951
RD
4146 def __nonzero__(self): return self.IsOk()
4147 def GetLayoutDirection(*args, **kwargs):
4148 """
4149 GetLayoutDirection(self) -> int
4150
4151 Get the layout direction (LTR or RTL)_ for this dc. On platforms
4152 where RTL layout is supported, the return value will either be
4153 ``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
4154 ``wx.Layout_Default`` is returned if layout direction is not
4155 supported.
4156 """
4157 return _gdi_.DC_GetLayoutDirection(*args, **kwargs)
4158
4159 def SetLayoutDirection(*args, **kwargs):
4160 """
4161 SetLayoutDirection(self, int dir)
4162
4163 Change the layout direction for this dc.
4164 """
4165 return _gdi_.DC_SetLayoutDirection(*args, **kwargs)
4166
e811c8ce 4167 def _DrawPointList(*args, **kwargs):
a95a7133 4168 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4169 return _gdi_.DC__DrawPointList(*args, **kwargs)
e811c8ce
RD
4170
4171 def _DrawLineList(*args, **kwargs):
a95a7133 4172 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4173 return _gdi_.DC__DrawLineList(*args, **kwargs)
e811c8ce
RD
4174
4175 def _DrawRectangleList(*args, **kwargs):
a95a7133 4176 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4177 return _gdi_.DC__DrawRectangleList(*args, **kwargs)
e811c8ce
RD
4178
4179 def _DrawEllipseList(*args, **kwargs):
a95a7133 4180 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4181 return _gdi_.DC__DrawEllipseList(*args, **kwargs)
e811c8ce
RD
4182
4183 def _DrawPolygonList(*args, **kwargs):
a95a7133 4184 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4185 return _gdi_.DC__DrawPolygonList(*args, **kwargs)
e811c8ce
RD
4186
4187 def _DrawTextList(*args, **kwargs):
0df68c9f 4188 """
a95a7133 4189 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
0df68c9f
RD
4190 PyObject backgroundList) -> PyObject
4191 """
54f9ee45 4192 return _gdi_.DC__DrawTextList(*args, **kwargs)
e811c8ce 4193
3bcd5e1c 4194 def DrawPointList(self, points, pens=None):
f5b96ee1
RD
4195 """
4196 Draw a list of points as quickly as possible.
4197
4198 :param points: A sequence of 2-element sequences representing
4199 each point to draw, (x,y).
4200 :param pens: If None, then the current pen is used. If a
4201 single pen then it will be used for all points. If
4202 a list of pens then there should be one for each point
4203 in points.
4204 """
3bcd5e1c
RD
4205 if pens is None:
4206 pens = []
d14a1e28 4207 elif isinstance(pens, wx.Pen):
3bcd5e1c
RD
4208 pens = [pens]
4209 elif len(pens) != len(points):
4210 raise ValueError('points and pens must have same length')
b67a9327
RD
4211 return self._DrawPointList(points, pens, [])
4212
3bcd5e1c
RD
4213
4214 def DrawLineList(self, lines, pens=None):
f5b96ee1
RD
4215 """
4216 Draw a list of lines as quickly as possible.
4217
4218 :param lines: A sequence of 4-element sequences representing
4219 each line to draw, (x1,y1, x2,y2).
4220 :param pens: If None, then the current pen is used. If a
4221 single pen then it will be used for all lines. If
4222 a list of pens then there should be one for each line
4223 in lines.
4224 """
3bcd5e1c
RD
4225 if pens is None:
4226 pens = []
d14a1e28 4227 elif isinstance(pens, wx.Pen):
3bcd5e1c
RD
4228 pens = [pens]
4229 elif len(pens) != len(lines):
4230 raise ValueError('lines and pens must have same length')
b67a9327
RD
4231 return self._DrawLineList(lines, pens, [])
4232
4233
4234 def DrawRectangleList(self, rectangles, pens=None, brushes=None):
f5b96ee1
RD
4235 """
4236 Draw a list of rectangles as quickly as possible.
4237
4238 :param rectangles: A sequence of 4-element sequences representing
4239 each rectangle to draw, (x,y, w,h).
4240 :param pens: If None, then the current pen is used. If a
4241 single pen then it will be used for all rectangles.
4242 If a list of pens then there should be one for each
4243 rectangle in rectangles.
4244 :param brushes: A brush or brushes to be used to fill the rectagles,
4245 with similar semantics as the pens parameter.
4246 """
b67a9327
RD
4247 if pens is None:
4248 pens = []
d14a1e28 4249 elif isinstance(pens, wx.Pen):
b67a9327
RD
4250 pens = [pens]
4251 elif len(pens) != len(rectangles):
4252 raise ValueError('rectangles and pens must have same length')
4253 if brushes is None:
4254 brushes = []
d14a1e28 4255 elif isinstance(brushes, wx.Brush):
b67a9327
RD
4256 brushes = [brushes]
4257 elif len(brushes) != len(rectangles):
4258 raise ValueError('rectangles and brushes must have same length')
4259 return self._DrawRectangleList(rectangles, pens, brushes)
4260
4261
4262 def DrawEllipseList(self, ellipses, pens=None, brushes=None):
f5b96ee1
RD
4263 """
4264 Draw a list of ellipses as quickly as possible.
4265
4266 :param ellipses: A sequence of 4-element sequences representing
4267 each ellipse to draw, (x,y, w,h).
4268 :param pens: If None, then the current pen is used. If a
4269 single pen then it will be used for all ellipses.
4270 If a list of pens then there should be one for each
4271 ellipse in ellipses.
4272 :param brushes: A brush or brushes to be used to fill the ellipses,
4273 with similar semantics as the pens parameter.
4274 """
b67a9327
RD
4275 if pens is None:
4276 pens = []
d14a1e28 4277 elif isinstance(pens, wx.Pen):
b67a9327
RD
4278 pens = [pens]
4279 elif len(pens) != len(ellipses):
4280 raise ValueError('ellipses and pens must have same length')
4281 if brushes is None:
4282 brushes = []
d14a1e28 4283 elif isinstance(brushes, wx.Brush):
b67a9327
RD
4284 brushes = [brushes]
4285 elif len(brushes) != len(ellipses):
4286 raise ValueError('ellipses and brushes must have same length')
4287 return self._DrawEllipseList(ellipses, pens, brushes)
4288
4289
4290 def DrawPolygonList(self, polygons, pens=None, brushes=None):
f5b96ee1
RD
4291 """
4292 Draw a list of polygons, each of which is a list of points.
4293
4294 :param polygons: A sequence of sequences of sequences.
4295 [[(x1,y1),(x2,y2),(x3,y3)...],
4296 [(x1,y1),(x2,y2),(x3,y3)...]]
4297
4298 :param pens: If None, then the current pen is used. If a
4299 single pen then it will be used for all polygons.
4300 If a list of pens then there should be one for each
4301 polygon.
4302 :param brushes: A brush or brushes to be used to fill the polygons,
4303 with similar semantics as the pens parameter.
4304 """
b67a9327
RD
4305 if pens is None:
4306 pens = []
d14a1e28 4307 elif isinstance(pens, wx.Pen):
b67a9327
RD
4308 pens = [pens]
4309 elif len(pens) != len(polygons):
4310 raise ValueError('polygons and pens must have same length')
4311 if brushes is None:
4312 brushes = []
d14a1e28 4313 elif isinstance(brushes, wx.Brush):
b67a9327
RD
4314 brushes = [brushes]
4315 elif len(brushes) != len(polygons):
4316 raise ValueError('polygons and brushes must have same length')
4317 return self._DrawPolygonList(polygons, pens, brushes)
4318
4319
f5b96ee1
RD
4320 def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
4321 """
4322 Draw a list of strings using a list of coordinants for positioning each string.
4323
4324 :param textList: A list of strings
4325 :param coords: A list of (x,y) positions
4326 :param foregrounds: A list of `wx.Colour` objects to use for the
4327 foregrounds of the strings.
4328 :param backgrounds: A list of `wx.Colour` objects to use for the
4329 backgrounds of the strings.
4330
4331 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4332 If you want backgrounds to do anything.
4333 """
b67a9327
RD
4334 if type(textList) == type(''):
4335 textList = [textList]
4336 elif len(textList) != len(coords):
4337 raise ValueError('textlist and coords must have same length')
4338 if foregrounds is None:
4339 foregrounds = []
fd3f2efe 4340 elif isinstance(foregrounds, wx.Colour):
b67a9327
RD
4341 foregrounds = [foregrounds]
4342 elif len(foregrounds) != len(coords):
4343 raise ValueError('foregrounds and coords must have same length')
4344 if backgrounds is None:
4345 backgrounds = []
fd3f2efe 4346 elif isinstance(backgrounds, wx.Colour):
b67a9327
RD
4347 backgrounds = [backgrounds]
4348 elif len(backgrounds) != len(coords):
4349 raise ValueError('backgrounds and coords must have same length')
4350 return self._DrawTextList(textList, coords, foregrounds, backgrounds)
3bcd5e1c 4351
2bf58437
RD
4352 Background = property(GetBackground,SetBackground,doc="See `GetBackground` and `SetBackground`")
4353 BackgroundMode = property(GetBackgroundMode,SetBackgroundMode,doc="See `GetBackgroundMode` and `SetBackgroundMode`")
4354 BoundingBox = property(GetBoundingBox,doc="See `GetBoundingBox`")
4355 Brush = property(GetBrush,SetBrush,doc="See `GetBrush` and `SetBrush`")
4356 CharHeight = property(GetCharHeight,doc="See `GetCharHeight`")
4357 CharWidth = property(GetCharWidth,doc="See `GetCharWidth`")
4358 ClippingBox = property(GetClippingBox,doc="See `GetClippingBox`")
4359 ClippingRect = property(GetClippingRect,SetClippingRect,doc="See `GetClippingRect` and `SetClippingRect`")
4360 Depth = property(GetDepth,doc="See `GetDepth`")
4361 DeviceOrigin = property(GetDeviceOrigin,SetDeviceOrigin,doc="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4362 Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
4363 FullTextExtent = property(GetFullTextExtent,doc="See `GetFullTextExtent`")
4364 LogicalFunction = property(GetLogicalFunction,SetLogicalFunction,doc="See `GetLogicalFunction` and `SetLogicalFunction`")
4365 LogicalOrigin = property(GetLogicalOrigin,SetLogicalOrigin,doc="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4366 LogicalScale = property(GetLogicalScale,SetLogicalScale,doc="See `GetLogicalScale` and `SetLogicalScale`")
4367 MapMode = property(GetMapMode,SetMapMode,doc="See `GetMapMode` and `SetMapMode`")
4368 MultiLineTextExtent = property(GetMultiLineTextExtent,doc="See `GetMultiLineTextExtent`")
4369 Optimization = property(GetOptimization,SetOptimization,doc="See `GetOptimization` and `SetOptimization`")
4370 PPI = property(GetPPI,doc="See `GetPPI`")
4371 PartialTextExtents = property(GetPartialTextExtents,doc="See `GetPartialTextExtents`")
4372 Pen = property(GetPen,SetPen,doc="See `GetPen` and `SetPen`")
4373 Pixel = property(GetPixel,doc="See `GetPixel`")
4374 PixelPoint = property(GetPixelPoint,doc="See `GetPixelPoint`")
4375 Size = property(GetSize,doc="See `GetSize`")
4376 SizeMM = property(GetSizeMM,doc="See `GetSizeMM`")
4377 TextBackground = property(GetTextBackground,SetTextBackground,doc="See `GetTextBackground` and `SetTextBackground`")
4378 TextExtent = property(GetTextExtent,doc="See `GetTextExtent`")
4379 TextForeground = property(GetTextForeground,SetTextForeground,doc="See `GetTextForeground` and `SetTextForeground`")
4380 UserScale = property(GetUserScale,SetUserScale,doc="See `GetUserScale` and `SetUserScale`")
b39fe951 4381 LayoutDirection = property(GetLayoutDirection,SetLayoutDirection)
2131d850 4382_gdi_.DC_swigregister(DC)
70551f47 4383
d14a1e28 4384#---------------------------------------------------------------------------
70551f47 4385
70d7cb34
RD
4386class DCTextColourChanger(object):
4387 """
4388 wx.DCTextColourChanger can be used to temporarily change the DC text
4389 colour and restore it automatically when the object goes out of scope
4390 """
4391 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4392 __repr__ = _swig_repr
4393 def __init__(self, *args, **kwargs):
4394 """
4395 __init__(self, DC dc, Colour col) -> DCTextColourChanger
4396
4397 wx.DCTextColourChanger can be used to temporarily change the DC text
4398 colour and restore it automatically when the object goes out of scope
4399 """
4400 _gdi_.DCTextColourChanger_swiginit(self,_gdi_.new_DCTextColourChanger(*args, **kwargs))
4401 __swig_destroy__ = _gdi_.delete_DCTextColourChanger
4402 __del__ = lambda self : None;
4403_gdi_.DCTextColourChanger_swigregister(DCTextColourChanger)
4404
4405class DCPenChanger(object):
4406 """
4407 wx.DCPenChanger can be used to temporarily change the DC pen and
4408 restore it automatically when the object goes out of scope
4409 """
4410 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4411 __repr__ = _swig_repr
4412 def __init__(self, *args, **kwargs):
4413 """
4414 __init__(self, DC dc, Pen pen) -> DCPenChanger
4415
4416 wx.DCPenChanger can be used to temporarily change the DC pen and
4417 restore it automatically when the object goes out of scope
4418 """
4419 _gdi_.DCPenChanger_swiginit(self,_gdi_.new_DCPenChanger(*args, **kwargs))
4420 __swig_destroy__ = _gdi_.delete_DCPenChanger
4421 __del__ = lambda self : None;
4422_gdi_.DCPenChanger_swigregister(DCPenChanger)
4423
4424class DCBrushChanger(object):
4425 """
4426 wx.DCBrushChanger can be used to temporarily change the DC brush and
4427 restore it automatically when the object goes out of scope
4428 """
4429 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4430 __repr__ = _swig_repr
4431 def __init__(self, *args, **kwargs):
4432 """
4433 __init__(self, DC dc, Brush brush) -> DCBrushChanger
4434
4435 wx.DCBrushChanger can be used to temporarily change the DC brush and
4436 restore it automatically when the object goes out of scope
4437 """
4438 _gdi_.DCBrushChanger_swiginit(self,_gdi_.new_DCBrushChanger(*args, **kwargs))
4439 __swig_destroy__ = _gdi_.delete_DCBrushChanger
4440 __del__ = lambda self : None;
4441_gdi_.DCBrushChanger_swigregister(DCBrushChanger)
4442
4443class DCClipper(object):
4444 """
4445 wx.wxDCClipper sets the DC's clipping region when it is constructed,
4446 and then automatically destroys the clipping region when the clipper
4447 goes out of scope.
4448 """
4449 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4450 __repr__ = _swig_repr
4451 def __init__(self, *args):
4452 """
4453 __init__(self, DC dc, Region r) -> DCClipper
4454 __init__(self, DC dc, Rect r) -> DCClipper
4455 __init__(self, DC dc, int x, int y, int w, int h) -> DCClipper
4456
4457 wx.wxDCClipper sets the DC's clipping region when it is constructed,
4458 and then automatically destroys the clipping region when the clipper
4459 goes out of scope.
4460 """
4461 _gdi_.DCClipper_swiginit(self,_gdi_.new_DCClipper(*args))
4462 __swig_destroy__ = _gdi_.delete_DCClipper
4463 __del__ = lambda self : None;
4464_gdi_.DCClipper_swigregister(DCClipper)
4465
4466#---------------------------------------------------------------------------
4467
d14a1e28 4468class MemoryDC(DC):
f5b96ee1
RD
4469 """
4470 A memory device context provides a means to draw graphics onto a
4471 bitmap. A bitmap must be selected into the new memory DC before it may
4472 be used for anything. Typical usage is as follows::
4473
4474 dc = wx.MemoryDC()
4475 dc.SelectObject(bitmap)
8e99bda9 4476 # draw on the dc using any of the Draw methods
f5b96ee1
RD
4477 dc.SelectObject(wx.NullBitmap)
4478 # the bitmap now contains wahtever was drawn upon it
4479
4480 Note that the memory DC *must* be deleted (or the bitmap selected out
4481 of it) before a bitmap can be reselected into another memory DC.
4482
4483 """
0085ce49
RD
4484 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4485 __repr__ = _swig_repr
4486 def __init__(self, *args, **kwargs):
f5b96ee1 4487 """
8e99bda9 4488 __init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
f5b96ee1
RD
4489
4490 Constructs a new memory device context.
4491
4492 Use the Ok member to test whether the constructor was successful in
8e99bda9
RD
4493 creating a usable device context. If a bitmap is not given to this
4494 constructor then don't forget to select a bitmap into the DC before
4495 drawing on it.
f5b96ee1 4496 """
0085ce49 4497 _gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
e811c8ce 4498 def SelectObject(*args, **kwargs):
f5b96ee1
RD
4499 """
4500 SelectObject(self, Bitmap bitmap)
4501
4502 Selects the bitmap into the device context, to use as the memory
4503 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4504 the DC, and therefore the bitmap, and also to use Blit to copy the
4505 bitmap to a window.
4506
4507 If the argument is wx.NullBitmap (or some other uninitialised
4508 `wx.Bitmap`) the current bitmap is selected out of the device context,
4509 and the original bitmap restored, allowing the current bitmap to be
4510 destroyed safely.
4511 """
54f9ee45 4512 return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
e811c8ce 4513
2131d850 4514_gdi_.MemoryDC_swigregister(MemoryDC)
70551f47 4515
d14a1e28 4516def MemoryDCFromDC(*args, **kwargs):
f5b96ee1
RD
4517 """
4518 MemoryDCFromDC(DC oldDC) -> MemoryDC
4519
4520 Creates a DC that is compatible with the oldDC.
4521 """
54f9ee45 4522 val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
d14a1e28 4523 return val
70551f47 4524
d14a1e28 4525#---------------------------------------------------------------------------
70551f47 4526
d14a1e28 4527class ScreenDC(DC):
f5b96ee1
RD
4528 """
4529 A wxScreenDC can be used to paint anywhere on the screen. This should
4530 normally be constructed as a temporary stack object; don't store a
4531 wxScreenDC object.
4532
4533 """
0085ce49
RD
4534 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4535 __repr__ = _swig_repr
4536 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4537 """
4538 __init__(self) -> ScreenDC
4539
4540 A wxScreenDC can be used to paint anywhere on the screen. This should
4541 normally be constructed as a temporary stack object; don't store a
4542 wxScreenDC object.
4543
4544 """
0085ce49 4545 _gdi_.ScreenDC_swiginit(self,_gdi_.new_ScreenDC(*args, **kwargs))
e811c8ce 4546 def StartDrawingOnTopWin(*args, **kwargs):
f5b96ee1
RD
4547 """
4548 StartDrawingOnTopWin(self, Window window) -> bool
4549
4550 Specify that the area of the screen to be drawn upon coincides with
4551 the given window.
4552
4553 :see: `EndDrawingOnTop`
4554 """
54f9ee45 4555 return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
e811c8ce
RD
4556
4557 def StartDrawingOnTop(*args, **kwargs):
f5b96ee1
RD
4558 """
4559 StartDrawingOnTop(self, Rect rect=None) -> bool
4560
4561 Specify that the area is the given rectangle, or the whole screen if
4562 ``None`` is passed.
4563
4564 :see: `EndDrawingOnTop`
4565 """
54f9ee45 4566 return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
e811c8ce
RD
4567
4568 def EndDrawingOnTop(*args, **kwargs):
f5b96ee1
RD
4569 """
4570 EndDrawingOnTop(self) -> bool
4571
4572 Use this in conjunction with `StartDrawingOnTop` or
4573 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4574 top of existing windows. Without this, some window systems (such as X)
4575 only allow drawing to take place underneath other windows.
4576
4577 You might use this pair of functions when implementing a drag feature,
4578 for example as in the `wx.SplitterWindow` implementation.
4579
4580 These functions are probably obsolete since the X implementations
4581 allow drawing directly on the screen now. However, the fact that this
4582 function allows the screen to be refreshed afterwards may be useful
4583 to some applications.
4584 """
54f9ee45 4585 return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
e811c8ce 4586
2131d850 4587_gdi_.ScreenDC_swigregister(ScreenDC)
70551f47 4588
d14a1e28 4589#---------------------------------------------------------------------------
70551f47 4590
72ef6efb
RD
4591class WindowDC(DC):
4592 """
4593 A wx.WindowDC must be constructed if an application wishes to paint on
4594 the whole area of a window (client and decorations). This should
4595 normally be constructed as a temporary stack object; don't store a
4596 wx.WindowDC object.
4597 """
4598 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4599 __repr__ = _swig_repr
4600 def __init__(self, *args, **kwargs):
4601 """
4602 __init__(self, Window win) -> WindowDC
4603
4604 Constructor. Pass the window on which you wish to paint.
4605 """
4606 _gdi_.WindowDC_swiginit(self,_gdi_.new_WindowDC(*args, **kwargs))
4607_gdi_.WindowDC_swigregister(WindowDC)
4608
4609#---------------------------------------------------------------------------
4610
4611class ClientDC(WindowDC):
f5b96ee1
RD
4612 """
4613 A wx.ClientDC must be constructed if an application wishes to paint on
4614 the client area of a window from outside an EVT_PAINT event. This should
4615 normally be constructed as a temporary stack object; don't store a
4616 wx.ClientDC object long term.
4617
4618 To draw on a window from within an EVT_PAINT handler, construct a
4619 `wx.PaintDC` object.
4620
4621 To draw on the whole window including decorations, construct a
4622 `wx.WindowDC` object (Windows only).
4623
4624 """
0085ce49
RD
4625 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4626 __repr__ = _swig_repr
4627 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4628 """
4629 __init__(self, Window win) -> ClientDC
4630
4631 Constructor. Pass the window on which you wish to paint.
4632 """
0085ce49 4633 _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))
2131d850 4634_gdi_.ClientDC_swigregister(ClientDC)
70551f47 4635
d14a1e28 4636#---------------------------------------------------------------------------
70551f47 4637
72ef6efb 4638class PaintDC(ClientDC):
f5b96ee1
RD
4639 """
4640 A wx.PaintDC must be constructed if an application wishes to paint on
4641 the client area of a window from within an EVT_PAINT event
4642 handler. This should normally be constructed as a temporary stack
4643 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4644 handler, you **must** create a wx.PaintDC object within it even if you
4645 don't actually use it.
4646
4647 Using wx.PaintDC within EVT_PAINT handlers is important because it
4648 automatically sets the clipping area to the damaged area of the
4649 window. Attempts to draw outside this area do not appear.
4650
4651 To draw on a window from outside EVT_PAINT handlers, construct a
4652 `wx.ClientDC` object.
4653
4654 """
0085ce49
RD
4655 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4656 __repr__ = _swig_repr
4657 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4658 """
4659 __init__(self, Window win) -> PaintDC
4660
4661 Constructor. Pass the window on which you wish to paint.
4662 """
0085ce49 4663 _gdi_.PaintDC_swiginit(self,_gdi_.new_PaintDC(*args, **kwargs))
2131d850 4664_gdi_.PaintDC_swigregister(PaintDC)
70551f47 4665
d14a1e28 4666#---------------------------------------------------------------------------
70551f47 4667
24f6c4e8
RD
4668BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
4669BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
4670class BufferedDC(MemoryDC):
4671 """
4672 This simple class provides a simple way to avoid flicker: when drawing
4673 on it, everything is in fact first drawn on an in-memory buffer (a
4674 `wx.Bitmap`) and then copied to the screen only once, when this object
be68621e
RD
4675 is destroyed. You can either provide a buffer bitmap yourself, and
4676 reuse it the next time something needs painted, or you can let the
4677 buffered DC create and provide a buffer bitmap itself.
24f6c4e8 4678
be68621e 4679 Buffered DCs can be used in the same way as any other device context.
24f6c4e8
RD
4680 wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
4681 use it in your EVT_PAINT handler, you should look at
be68621e
RD
4682 `wx.BufferedPaintDC`. You can also use a wx.BufferedDC without
4683 providing a target DC. In this case the operations done on the dc
4684 will only be written to the buffer bitmap and *not* to any window, so
4685 you will want to have provided the buffer bitmap and then reuse it
4686 when it needs painted to the window.
24f6c4e8
RD
4687
4688 Please note that GTK+ 2.0 and OS X provide double buffering themselves
be68621e
RD
4689 natively. You may want to use `wx.Window.IsDoubleBuffered` to
4690 determine whether you need to use buffering or not, or use
4691 `wx.AutoBufferedPaintDC` to avoid needless double buffering on systems
4692 that already do it automatically.
4693
4694
24f6c4e8
RD
4695
4696 """
4697 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4698 __repr__ = _swig_repr
4699 def __init__(self, *args):
4700 """
4701 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4702 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4703
4704 Constructs a buffered DC.
24f6c4e8
RD
4705 """
4706 _gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args))
4707 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
4708
4709 __swig_destroy__ = _gdi_.delete_BufferedDC
4710 __del__ = lambda self : None;
4711 def UnMask(*args, **kwargs):
4712 """
4713 UnMask(self)
4714
4715 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4716 can be effectively used once only). This is usually only called in
4717 the destructor.
4718 """
4719 return _gdi_.BufferedDC_UnMask(*args, **kwargs)
4720
4721_gdi_.BufferedDC_swigregister(BufferedDC)
4722
4723class BufferedPaintDC(BufferedDC):
4724 """
4725 This is a subclass of `wx.BufferedDC` which can be used inside of an
4726 EVT_PAINT event handler. Just create an object of this class instead
4727 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4728 flicker. The only thing to watch out for is that if you are using this
4729 class together with `wx.ScrolledWindow`, you probably do **not** want
4730 to call `wx.Window.PrepareDC` on it as it already does this internally
4731 for the real underlying `wx.PaintDC`.
4732
4733 If your window is already fully buffered in a `wx.Bitmap` then your
4734 EVT_PAINT handler can be as simple as just creating a
4735 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4736 automatically when it is destroyed. For example::
4737
4738 def OnPaint(self, event):
4739 dc = wx.BufferedPaintDC(self, self.buffer)
4740
4741
4742
4743 """
4744 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4745 __repr__ = _swig_repr
4746 def __init__(self, *args, **kwargs):
4747 """
4748 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4749
4750 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4751 provide the bitmap to be used for buffering or let this object create
4752 one internally (in the latter case, the size of the client part of the
4753 window is automatically used).
4754 """
4755 _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs))
4756_gdi_.BufferedPaintDC_swigregister(BufferedPaintDC)
4757
4758#---------------------------------------------------------------------------
4759
4760class AutoBufferedPaintDC(DC):
b39fe951
RD
4761 """
4762 If the current platform double buffers by default then this DC is the
4763 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
8e99bda9
RD
4764
4765 :see: `wx.AutoBufferedPaintDCFactory`
24f6c4e8 4766
b39fe951 4767 """
24f6c4e8
RD
4768 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4769 __repr__ = _swig_repr
4770 def __init__(self, *args, **kwargs):
4771 """
4772 __init__(self, Window win) -> AutoBufferedPaintDC
4773
4774 If the current platform double buffers by default then this DC is the
4775 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4776
4777 :see: `wx.AutoBufferedPaintDCFactory`
4778
4779 """
4780 _gdi_.AutoBufferedPaintDC_swiginit(self,_gdi_.new_AutoBufferedPaintDC(*args, **kwargs))
4781_gdi_.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC)
b39fe951 4782
8e99bda9
RD
4783
4784def AutoBufferedPaintDCFactory(*args, **kwargs):
4785 """
4786 AutoBufferedPaintDCFactory(Window window) -> DC
4787
4788 Checks if the window is natively double buffered and will return a
24f6c4e8
RD
4789 `wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The advantage of
4790 this function over `wx.AutoBufferedPaintDC` is that this function will check
4791 if the the specified window has double-buffering enabled rather than just
4792 going by platform defaults.
8e99bda9
RD
4793 """
4794 return _gdi_.AutoBufferedPaintDCFactory(*args, **kwargs)
b39fe951
RD
4795#---------------------------------------------------------------------------
4796
d14a1e28 4797class MirrorDC(DC):
f5b96ee1
RD
4798 """
4799 wx.MirrorDC is a simple wrapper class which is always associated with a
4800 real `wx.DC` object and either forwards all of its operations to it
4801 without changes (no mirroring takes place) or exchanges x and y
4802 coordinates which makes it possible to reuse the same code to draw a
4803 figure and its mirror -- i.e. reflection related to the diagonal line
4804 x == y.
4805 """
0085ce49
RD
4806 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4807 __repr__ = _swig_repr
4808 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4809 """
4810 __init__(self, DC dc, bool mirror) -> MirrorDC
4811
4812 Creates a mirrored DC associated with the real *dc*. Everything drawn
4813 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4814 *mirror* is True.
4815 """
0085ce49 4816 _gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs))
2131d850 4817_gdi_.MirrorDC_swigregister(MirrorDC)
3ef86e32 4818
d14a1e28 4819#---------------------------------------------------------------------------
3ef86e32 4820
d14a1e28 4821class PostScriptDC(DC):
f5b96ee1 4822 """This is a `wx.DC` that can write to PostScript files on any platform."""
0085ce49
RD
4823 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4824 __repr__ = _swig_repr
4825 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4826 """
4827 __init__(self, wxPrintData printData) -> PostScriptDC
4828
4829 Constructs a PostScript printer device context from a `wx.PrintData`
4830 object.
4831 """
0085ce49 4832 _gdi_.PostScriptDC_swiginit(self,_gdi_.new_PostScriptDC(*args, **kwargs))
e811c8ce 4833 def GetPrintData(*args, **kwargs):
a95a7133 4834 """GetPrintData(self) -> wxPrintData"""
54f9ee45 4835 return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
e811c8ce
RD
4836
4837 def SetPrintData(*args, **kwargs):
a95a7133 4838 """SetPrintData(self, wxPrintData data)"""
54f9ee45 4839 return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
e811c8ce
RD
4840
4841 def SetResolution(*args, **kwargs):
f5b96ee1
RD
4842 """
4843 SetResolution(int ppi)
4844
4845 Set resolution (in pixels per inch) that will be used in PostScript
4846 output. Default is 720ppi.
4847 """
54f9ee45 4848 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
e811c8ce
RD
4849
4850 SetResolution = staticmethod(SetResolution)
4851 def GetResolution(*args, **kwargs):
f5b96ee1
RD
4852 """
4853 GetResolution() -> int
4854
4855 Return resolution used in PostScript output.
4856 """
54f9ee45 4857 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
e811c8ce
RD
4858
4859 GetResolution = staticmethod(GetResolution)
33d6fd3b 4860 PrintData = property(GetPrintData,SetPrintData,doc="See `GetPrintData` and `SetPrintData`")
2131d850 4861_gdi_.PostScriptDC_swigregister(PostScriptDC)
105e45b9 4862
e811c8ce 4863def PostScriptDC_SetResolution(*args, **kwargs):
0085ce49 4864 """
f5b96ee1
RD
4865 PostScriptDC_SetResolution(int ppi)
4866
4867 Set resolution (in pixels per inch) that will be used in PostScript
4868 output. Default is 720ppi.
4869 """
0085ce49 4870 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
105e45b9 4871
0085ce49
RD
4872def PostScriptDC_GetResolution(*args):
4873 """
f5b96ee1
RD
4874 PostScriptDC_GetResolution() -> int
4875
4876 Return resolution used in PostScript output.
4877 """
0085ce49 4878 return _gdi_.PostScriptDC_GetResolution(*args)
105e45b9 4879
d14a1e28 4880#---------------------------------------------------------------------------
105e45b9 4881
54f9ee45 4882class MetaFile(_core.Object):
093d3ff1 4883 """Proxy of C++ MetaFile class"""
0085ce49
RD
4884 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4885 __repr__ = _swig_repr
4886 def __init__(self, *args, **kwargs):
a95a7133 4887 """__init__(self, String filename=EmptyString) -> MetaFile"""
0085ce49 4888 _gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs))
2131d850 4889_gdi_.MetaFile_swigregister(MetaFile)
d14a1e28
RD
4890
4891class MetaFileDC(DC):
093d3ff1 4892 """Proxy of C++ MetaFileDC class"""
0085ce49
RD
4893 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4894 __repr__ = _swig_repr
4895 def __init__(self, *args, **kwargs):
0df68c9f 4896 """
a95a7133 4897 __init__(self, String filename=EmptyString, int width=0, int height=0,
196addbf 4898 String description=EmptyString) -> MetaFileDC
0df68c9f 4899 """
0085ce49 4900 _gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs))
2131d850 4901_gdi_.MetaFileDC_swigregister(MetaFileDC)
d14a1e28
RD
4902
4903class PrinterDC(DC):
093d3ff1 4904 """Proxy of C++ PrinterDC class"""
0085ce49
RD
4905 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4906 __repr__ = _swig_repr
4907 def __init__(self, *args, **kwargs):
a95a7133 4908 """__init__(self, wxPrintData printData) -> PrinterDC"""
0085ce49 4909 _gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs))
2131d850 4910_gdi_.PrinterDC_swigregister(PrinterDC)
d14a1e28
RD
4911
4912#---------------------------------------------------------------------------
4913
70d7cb34
RD
4914class GraphicsObject(_core.Object):
4915 """Proxy of C++ GraphicsObject class"""
4916 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4917 __repr__ = _swig_repr
4918 def __init__(self, *args, **kwargs):
4919 """__init__(self, GraphicsRenderer renderer=None) -> GraphicsObject"""
4920 _gdi_.GraphicsObject_swiginit(self,_gdi_.new_GraphicsObject(*args, **kwargs))
4921 __swig_destroy__ = _gdi_.delete_GraphicsObject
4922 __del__ = lambda self : None;
4923 def IsNull(*args, **kwargs):
4924 """IsNull(self) -> bool"""
4925 return _gdi_.GraphicsObject_IsNull(*args, **kwargs)
4926
4927 def GetRenderer(*args, **kwargs):
4928 """GetRenderer(self) -> GraphicsRenderer"""
4929 return _gdi_.GraphicsObject_GetRenderer(*args, **kwargs)
4930
4931_gdi_.GraphicsObject_swigregister(GraphicsObject)
4932
4933class GraphicsPen(GraphicsObject):
4934 """Proxy of C++ GraphicsPen class"""
4935 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4936 __repr__ = _swig_repr
4937 def __init__(self, *args, **kwargs):
4938 """__init__(self) -> GraphicsPen"""
4939 _gdi_.GraphicsPen_swiginit(self,_gdi_.new_GraphicsPen(*args, **kwargs))
4940 __swig_destroy__ = _gdi_.delete_GraphicsPen
4941 __del__ = lambda self : None;
4942_gdi_.GraphicsPen_swigregister(GraphicsPen)
4943
4944class GraphicsBrush(GraphicsObject):
4945 """Proxy of C++ GraphicsBrush class"""
4946 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4947 __repr__ = _swig_repr
4948 def __init__(self, *args, **kwargs):
4949 """__init__(self) -> GraphicsBrush"""
4950 _gdi_.GraphicsBrush_swiginit(self,_gdi_.new_GraphicsBrush(*args, **kwargs))
4951 __swig_destroy__ = _gdi_.delete_GraphicsBrush
4952 __del__ = lambda self : None;
4953_gdi_.GraphicsBrush_swigregister(GraphicsBrush)
4954
4955class GraphicsFont(GraphicsObject):
4956 """Proxy of C++ GraphicsFont class"""
4957 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4958 __repr__ = _swig_repr
4959 def __init__(self, *args, **kwargs):
4960 """__init__(self) -> GraphicsFont"""
4961 _gdi_.GraphicsFont_swiginit(self,_gdi_.new_GraphicsFont(*args, **kwargs))
4962 __swig_destroy__ = _gdi_.delete_GraphicsFont
4963 __del__ = lambda self : None;
4964_gdi_.GraphicsFont_swigregister(GraphicsFont)
4965
5c8c7dd3
RD
4966class GraphicsMatrix(GraphicsObject):
4967 """Proxy of C++ GraphicsMatrix class"""
4968 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4969 def __init__(self): raise AttributeError, "No constructor defined"
4970 __repr__ = _swig_repr
4971 __swig_destroy__ = _gdi_.delete_GraphicsMatrix
4972 __del__ = lambda self : None;
4973 def Concat(*args, **kwargs):
4974 """
4975 Concat(self, GraphicsMatrix t)
4976
4977 concatenates the matrix
4978 """
4979 return _gdi_.GraphicsMatrix_Concat(*args, **kwargs)
4980
4981 def Copy(*args, **kwargs):
4982 """
4983 Copy(self, GraphicsMatrix t)
4984
4985 Copy the passed in matrix to this one.
4986 """
4987 return _gdi_.GraphicsMatrix_Copy(*args, **kwargs)
4988
4989 def Set(*args, **kwargs):
4990 """
4991 Set(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
4992 Double tx=0.0, Double ty=0.0)
4993
4994 sets the matrix to the respective values
4995 """
4996 return _gdi_.GraphicsMatrix_Set(*args, **kwargs)
4997
4998 def Invert(*args, **kwargs):
4999 """
5000 Invert(self)
5001
5002 makes this the inverse matrix
5003 """
5004 return _gdi_.GraphicsMatrix_Invert(*args, **kwargs)
5005
5006 def IsEqual(*args, **kwargs):
5007 """
5008 IsEqual(self, GraphicsMatrix t) -> bool
5009
5010 returns true if the elements of the transformation matrix are equal
5011 """
5012 return _gdi_.GraphicsMatrix_IsEqual(*args, **kwargs)
5013
5014 def IsIdentity(*args, **kwargs):
5015 """
5016 IsIdentity(self) -> bool
5017
5018 return true if this is the identity matrix
5019 """
5020 return _gdi_.GraphicsMatrix_IsIdentity(*args, **kwargs)
5021
5022 def Translate(*args, **kwargs):
5023 """
5024 Translate(self, Double dx, Double dy)
5025
5026 add the translation to this matrix
5027 """
5028 return _gdi_.GraphicsMatrix_Translate(*args, **kwargs)
5029
5030 def Scale(*args, **kwargs):
5031 """
5032 Scale(self, Double xScale, Double yScale)
5033
5034 add the scale to this matrix
5035 """
5036 return _gdi_.GraphicsMatrix_Scale(*args, **kwargs)
5037
5038 def Rotate(*args, **kwargs):
5039 """
5040 Rotate(self, Double angle)
5041
5042 add the rotation to this matrix (radians)
5043 """
5044 return _gdi_.GraphicsMatrix_Rotate(*args, **kwargs)
5045
5046 def TransformPoint(*args, **kwargs):
5047 """
5048 TransformPoint(self, x, y) --> (x, y)
5049
5050 applies that matrix to the point
5051 """
5052 return _gdi_.GraphicsMatrix_TransformPoint(*args, **kwargs)
5053
5054 def TransformDistance(*args, **kwargs):
5055 """
5056 TransformDistance(self, dx, dy) --> (dx, dy)
5057
5058 applies the matrix except for translations
5059 """
5060 return _gdi_.GraphicsMatrix_TransformDistance(*args, **kwargs)
5061
5062 def GetNativeMatrix(*args, **kwargs):
5063 """
5064 GetNativeMatrix(self) -> void
5065
5066 returns the native representation
5067 """
5068 return _gdi_.GraphicsMatrix_GetNativeMatrix(*args, **kwargs)
5069
5070_gdi_.GraphicsMatrix_swigregister(GraphicsMatrix)
5071
70d7cb34 5072class GraphicsPath(GraphicsObject):
72ef6efb
RD
5073 """Proxy of C++ GraphicsPath class"""
5074 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5075 def __init__(self): raise AttributeError, "No constructor defined"
5076 __repr__ = _swig_repr
5077 __swig_destroy__ = _gdi_.delete_GraphicsPath
5078 __del__ = lambda self : None;
70d7cb34 5079 def MoveToPoint(*args):
72ef6efb
RD
5080 """
5081 MoveToPoint(self, Double x, Double y)
70d7cb34 5082 MoveToPoint(self, Point2D p)
72ef6efb
RD
5083
5084 Begins a new subpath at (x,y)
5085 """
70d7cb34 5086 return _gdi_.GraphicsPath_MoveToPoint(*args)
72ef6efb 5087
70d7cb34 5088 def AddLineToPoint(*args):
72ef6efb
RD
5089 """
5090 AddLineToPoint(self, Double x, Double y)
70d7cb34 5091 AddLineToPoint(self, Point2D p)
72ef6efb
RD
5092
5093 Adds a straight line from the current point to (x,y)
5094 """
70d7cb34 5095 return _gdi_.GraphicsPath_AddLineToPoint(*args)
72ef6efb 5096
70d7cb34 5097 def AddCurveToPoint(*args):
72ef6efb
RD
5098 """
5099 AddCurveToPoint(self, Double cx1, Double cy1, Double cx2, Double cy2, Double x,
5100 Double y)
70d7cb34 5101 AddCurveToPoint(self, Point2D c1, Point2D c2, Point2D e)
72ef6efb
RD
5102
5103 Adds a cubic Bezier curve from the current point, using two control
5104 points and an end point
5105 """
70d7cb34
RD
5106 return _gdi_.GraphicsPath_AddCurveToPoint(*args)
5107
5108 def AddPath(*args, **kwargs):
5109 """
5110 AddPath(self, GraphicsPath path)
5111
5112 adds another path
5113 """
5114 return _gdi_.GraphicsPath_AddPath(*args, **kwargs)
72ef6efb
RD
5115
5116 def CloseSubpath(*args, **kwargs):
5117 """
5118 CloseSubpath(self)
5119
5120 closes the current sub-path
5121 """
5122 return _gdi_.GraphicsPath_CloseSubpath(*args, **kwargs)
5123
5124 def GetCurrentPoint(*args, **kwargs):
5125 """
5126 GetCurrentPoint(self) -> Point2D
5127
5128 Gets the last point of the current path, (0,0) if not yet set
5129 """
5130 return _gdi_.GraphicsPath_GetCurrentPoint(*args, **kwargs)
5131
70d7cb34 5132 def AddArc(*args):
72ef6efb
RD
5133 """
5134 AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle,
5135 bool clockwise)
70d7cb34
RD
5136 AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle,
5137 bool clockwise)
72ef6efb
RD
5138
5139 Adds an arc of a circle centering at (x,y) with radius (r) from
5140 startAngle to endAngle
5141 """
70d7cb34 5142 return _gdi_.GraphicsPath_AddArc(*args)
72ef6efb
RD
5143
5144 def AddQuadCurveToPoint(*args, **kwargs):
5145 """
5146 AddQuadCurveToPoint(self, Double cx, Double cy, Double x, Double y)
5147
5148 Adds a quadratic Bezier curve from the current point, using a control
5149 point and an end point
5150 """
5151 return _gdi_.GraphicsPath_AddQuadCurveToPoint(*args, **kwargs)
5152
5153 def AddRectangle(*args, **kwargs):
5154 """
5155 AddRectangle(self, Double x, Double y, Double w, Double h)
5156
5157 Appends a rectangle as a new closed subpath
5158 """
5159 return _gdi_.GraphicsPath_AddRectangle(*args, **kwargs)
5160
5161 def AddCircle(*args, **kwargs):
5162 """
5163 AddCircle(self, Double x, Double y, Double r)
5164
b39fe951 5165 Appends a circle as a new closed subpath with the given radius.
72ef6efb
RD
5166 """
5167 return _gdi_.GraphicsPath_AddCircle(*args, **kwargs)
5168
5169 def AddArcToPoint(*args, **kwargs):
5170 """
5171 AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r)
5172
5173 Draws a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1)
5174 to (x2,y2), also a straight line from (current) to (x1,y1)
5175 """
5176 return _gdi_.GraphicsPath_AddArcToPoint(*args, **kwargs)
5177
70d7cb34
RD
5178 def AddEllipse(*args, **kwargs):
5179 """
5180 AddEllipse(self, Double x, Double y, Double w, Double h)
5181
5182 appends an ellipse
5183 """
5184 return _gdi_.GraphicsPath_AddEllipse(*args, **kwargs)
5185
5186 def AddRoundedRectangle(*args, **kwargs):
5187 """
5188 AddRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5189
5190 appends a rounded rectangle
5191 """
5192 return _gdi_.GraphicsPath_AddRoundedRectangle(*args, **kwargs)
5193
5194 def GetNativePath(*args, **kwargs):
5195 """
5196 GetNativePath(self) -> void
5197
5198 returns the native path
5199 """
5200 return _gdi_.GraphicsPath_GetNativePath(*args, **kwargs)
5201
5202 def UnGetNativePath(*args, **kwargs):
5203 """
5204 UnGetNativePath(self, void p)
5205
5206 give the native path returned by GetNativePath() back (there might be some
5207 deallocations necessary)
5208 """
5209 return _gdi_.GraphicsPath_UnGetNativePath(*args, **kwargs)
5210
5211 def Transform(*args, **kwargs):
5212 """
5213 Transform(self, GraphicsMatrix matrix)
5214
5215 transforms each point of this path by the matrix
5216 """
5217 return _gdi_.GraphicsPath_Transform(*args, **kwargs)
5218
5219 def GetBox(*args, **kwargs):
5220 """
5221 GetBox(self) -> wxRect2DDouble
5222
5223 gets the bounding box enclosing all points (possibly including control points)
5224 """
5225 return _gdi_.GraphicsPath_GetBox(*args, **kwargs)
5226
5227 def Contains(*args):
5228 """
5c8c7dd3
RD
5229 Contains(self, Double x, Double y, int fillStyle=ODDEVEN_RULE) -> bool
5230 Contains(self, wxPoint2DDouble c, int fillStyle=ODDEVEN_RULE) -> bool
70d7cb34
RD
5231 """
5232 return _gdi_.GraphicsPath_Contains(*args)
5233
72ef6efb 5234_gdi_.GraphicsPath_swigregister(GraphicsPath)
70d7cb34
RD
5235
5236class GraphicsContext(GraphicsObject):
72ef6efb
RD
5237 """Proxy of C++ GraphicsContext class"""
5238 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5239 def __init__(self): raise AttributeError, "No constructor defined"
5240 __repr__ = _swig_repr
5241 __swig_destroy__ = _gdi_.delete_GraphicsContext
5242 __del__ = lambda self : None;
0a27f394
RD
5243 def Create(*args):
5244 """
5245 Create(WindowDC dc) -> GraphicsContext
5246 Create(Window window) -> GraphicsContext
5247 """
be68621e
RD
5248 val = _gdi_.GraphicsContext_Create(*args)
5249 val.__dc = args[0] # save a ref so the dc will not be deleted before self
5250 return val
72ef6efb
RD
5251
5252 Create = staticmethod(Create)
0a27f394
RD
5253 def CreateFromNative(*args, **kwargs):
5254 """CreateFromNative(void context) -> GraphicsContext"""
5255 return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs)
5256
5257 CreateFromNative = staticmethod(CreateFromNative)
70d7cb34
RD
5258 def CreateFromNativeWindow(*args, **kwargs):
5259 """CreateFromNativeWindow(void window) -> GraphicsContext"""
5260 return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs)
5261
5262 CreateFromNativeWindow = staticmethod(CreateFromNativeWindow)
72ef6efb 5263 def CreatePath(*args, **kwargs):
70d7cb34
RD
5264 """
5265 CreatePath(self) -> GraphicsPath
5266
5267 creates a path instance that corresponds to the type of graphics context, ie GDIPlus, Cairo, CoreGraphics ...
5268 """
72ef6efb
RD
5269 return _gdi_.GraphicsContext_CreatePath(*args, **kwargs)
5270
70d7cb34
RD
5271 def CreatePen(*args, **kwargs):
5272 """CreatePen(self, Pen pen) -> GraphicsPen"""
5273 return _gdi_.GraphicsContext_CreatePen(*args, **kwargs)
5274
5275 def CreateBrush(*args, **kwargs):
5276 """CreateBrush(self, Brush brush) -> GraphicsBrush"""
5277 return _gdi_.GraphicsContext_CreateBrush(*args, **kwargs)
5278
5279 def CreateLinearGradientBrush(*args, **kwargs):
5280 """
5281 CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5282 Colour c2) -> GraphicsBrush
5283
5284 sets the brush to a linear gradient, starting at (x1,y1) with color c1
5285 to (x2,y2) with color c2
5286 """
5287 return _gdi_.GraphicsContext_CreateLinearGradientBrush(*args, **kwargs)
5288
5289 def CreateRadialGradientBrush(*args, **kwargs):
5290 """
5291 CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5292 Colour oColor, Colour cColor) -> GraphicsBrush
5293
5294 sets the brush to a radial gradient originating at (xo,yc) with color
5295 oColor and ends on a circle around (xc,yc) with radius r and color
5296 cColor
5297
5298 """
5299 return _gdi_.GraphicsContext_CreateRadialGradientBrush(*args, **kwargs)
5300
5301 def CreateFont(*args, **kwargs):
5302 """
5303 CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont
5304
5305 sets the font
5306 """
5307 return _gdi_.GraphicsContext_CreateFont(*args, **kwargs)
5308
5309 def CreateMatrix(*args, **kwargs):
5310 """
5311 CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5312 Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
5313
5314 create a 'native' matrix corresponding to these values
5315 """
5316 return _gdi_.GraphicsContext_CreateMatrix(*args, **kwargs)
5317
72ef6efb 5318 def PushState(*args, **kwargs):
70d7cb34
RD
5319 """
5320 PushState(self)
5321
5322 push the current state of the context, ie the transformation matrix on a stack
5323 """
72ef6efb
RD
5324 return _gdi_.GraphicsContext_PushState(*args, **kwargs)
5325
5326 def PopState(*args, **kwargs):
70d7cb34
RD
5327 """
5328 PopState(self)
5329
5330 pops a stored state from the stack
5331 """
72ef6efb
RD
5332 return _gdi_.GraphicsContext_PopState(*args, **kwargs)
5333
0a27f394 5334 def ClipRegion(*args, **kwargs):
70d7cb34
RD
5335 """
5336 ClipRegion(self, Region region)
5337
5338 clips drawings to the region
5339 """
0a27f394
RD
5340 return _gdi_.GraphicsContext_ClipRegion(*args, **kwargs)
5341
72ef6efb 5342 def Clip(*args, **kwargs):
70d7cb34
RD
5343 """
5344 Clip(self, Double x, Double y, Double w, Double h)
5345
5346 clips drawings to the rect
5347 """
72ef6efb
RD
5348 return _gdi_.GraphicsContext_Clip(*args, **kwargs)
5349
0a27f394 5350 def ResetClip(*args, **kwargs):
70d7cb34
RD
5351 """
5352 ResetClip(self)
5353
5354 resets the clipping to original extent
5355 """
0a27f394
RD
5356 return _gdi_.GraphicsContext_ResetClip(*args, **kwargs)
5357
5358 def GetNativeContext(*args, **kwargs):
70d7cb34
RD
5359 """
5360 GetNativeContext(self) -> void
5361
5362 returns the native context
5363 """
0a27f394
RD
5364 return _gdi_.GraphicsContext_GetNativeContext(*args, **kwargs)
5365
72ef6efb 5366 def Translate(*args, **kwargs):
70d7cb34
RD
5367 """
5368 Translate(self, Double dx, Double dy)
5369
5370 translate the current transformation matrix CTM of the context
5371 """
72ef6efb
RD
5372 return _gdi_.GraphicsContext_Translate(*args, **kwargs)
5373
5374 def Scale(*args, **kwargs):
70d7cb34
RD
5375 """
5376 Scale(self, Double xScale, Double yScale)
5377
5378 scale the current transformation matrix CTM of the context
5379 """
72ef6efb
RD
5380 return _gdi_.GraphicsContext_Scale(*args, **kwargs)
5381
5382 def Rotate(*args, **kwargs):
70d7cb34
RD
5383 """
5384 Rotate(self, Double angle)
72ef6efb 5385
70d7cb34
RD
5386 rotate (radians) the current transformation matrix CTM of the context
5387 """
5388 return _gdi_.GraphicsContext_Rotate(*args, **kwargs)
72ef6efb 5389
5c8c7dd3
RD
5390 def ConcatTransform(*args, **kwargs):
5391 """
5392 ConcatTransform(self, GraphicsMatrix matrix)
5393
5394 concatenates this transform with the current transform of this context
5395 """
5396 return _gdi_.GraphicsContext_ConcatTransform(*args, **kwargs)
5397
5398 def SetTransform(*args, **kwargs):
5399 """
5400 SetTransform(self, GraphicsMatrix matrix)
5401
5402 sets the transform of this context
5403 """
5404 return _gdi_.GraphicsContext_SetTransform(*args, **kwargs)
5405
5406 def GetTransform(*args, **kwargs):
5407 """
5408 GetTransform(self) -> GraphicsMatrix
5409
5410 gets the matrix of this context
5411 """
5412 return _gdi_.GraphicsContext_GetTransform(*args, **kwargs)
5413
70d7cb34 5414 def SetPen(*args):
72ef6efb 5415 """
70d7cb34
RD
5416 SetPen(self, GraphicsPen pen)
5417 SetPen(self, Pen pen)
5418
5419 sets the stroke pen
72ef6efb 5420 """
70d7cb34 5421 return _gdi_.GraphicsContext_SetPen(*args)
72ef6efb 5422
70d7cb34 5423 def SetBrush(*args):
72ef6efb 5424 """
70d7cb34
RD
5425 SetBrush(self, GraphicsBrush brush)
5426 SetBrush(self, Brush brush)
5427
5428 sets the brush for filling
72ef6efb 5429 """
70d7cb34 5430 return _gdi_.GraphicsContext_SetBrush(*args)
72ef6efb 5431
70d7cb34
RD
5432 def SetFont(*args):
5433 """
5434 SetFont(self, GraphicsFont font)
5435 SetFont(self, Font font, Colour colour=*wxBLACK)
72ef6efb 5436
70d7cb34
RD
5437 sets the font
5438 """
5439 return _gdi_.GraphicsContext_SetFont(*args)
72ef6efb
RD
5440
5441 def StrokePath(*args, **kwargs):
70d7cb34
RD
5442 """
5443 StrokePath(self, GraphicsPath path)
5444
5445 strokes along a path with the current pen
5446 """
72ef6efb
RD
5447 return _gdi_.GraphicsContext_StrokePath(*args, **kwargs)
5448
5449 def FillPath(*args, **kwargs):
70d7cb34 5450 """
5c8c7dd3 5451 FillPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
70d7cb34
RD
5452
5453 fills a path with the current brush
5454 """
72ef6efb
RD
5455 return _gdi_.GraphicsContext_FillPath(*args, **kwargs)
5456
5457 def DrawPath(*args, **kwargs):
70d7cb34 5458 """
5c8c7dd3 5459 DrawPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
70d7cb34
RD
5460
5461 draws a path by first filling and then stroking
5462 """
72ef6efb
RD
5463 return _gdi_.GraphicsContext_DrawPath(*args, **kwargs)
5464
b39fe951
RD
5465 def DrawText(*args, **kwargs):
5466 """DrawText(self, String str, Double x, Double y)"""
5467 return _gdi_.GraphicsContext_DrawText(*args, **kwargs)
5468
5469 def DrawRotatedText(*args, **kwargs):
5470 """DrawRotatedText(self, String str, Double x, Double y, Double angle)"""
5471 return _gdi_.GraphicsContext_DrawRotatedText(*args, **kwargs)
72ef6efb 5472
be68621e
RD
5473 def GetFullTextExtent(*args, **kwargs):
5474 """GetFullTextExtent(self, text) --> (width, height, descent, externalLeading)"""
5475 return _gdi_.GraphicsContext_GetFullTextExtent(*args, **kwargs)
5476
72ef6efb 5477 def GetTextExtent(*args, **kwargs):
be68621e 5478 """GetTextExtent(self, text) --> (width, height)"""
72ef6efb
RD
5479 return _gdi_.GraphicsContext_GetTextExtent(*args, **kwargs)
5480
5481 def GetPartialTextExtents(*args, **kwargs):
b39fe951 5482 """GetPartialTextExtents(self, text) -> [widths]"""
72ef6efb
RD
5483 return _gdi_.GraphicsContext_GetPartialTextExtents(*args, **kwargs)
5484
5485 def DrawBitmap(*args, **kwargs):
5486 """DrawBitmap(self, Bitmap bmp, Double x, Double y, Double w, Double h)"""
5487 return _gdi_.GraphicsContext_DrawBitmap(*args, **kwargs)
5488
5489 def DrawIcon(*args, **kwargs):
5490 """DrawIcon(self, Icon icon, Double x, Double y, Double w, Double h)"""
5491 return _gdi_.GraphicsContext_DrawIcon(*args, **kwargs)
5492
5493 def StrokeLine(*args, **kwargs):
70d7cb34
RD
5494 """
5495 StrokeLine(self, Double x1, Double y1, Double x2, Double y2)
5496
5497 strokes a single line
5498 """
72ef6efb
RD
5499 return _gdi_.GraphicsContext_StrokeLine(*args, **kwargs)
5500
b39fe951 5501 def StrokeLines(*args, **kwargs):
70d7cb34
RD
5502 """
5503 StrokeLines(self, List points)
5504
5505 stroke lines connecting each of the points
5506 """
b39fe951
RD
5507 return _gdi_.GraphicsContext_StrokeLines(*args, **kwargs)
5508
f8eb59b9 5509 def StrokeLineSegements(*args, **kwargs):
70d7cb34
RD
5510 """
5511 StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints)
5512
5513 stroke disconnected lines from begin to end points
5514 """
f8eb59b9 5515 return _gdi_.GraphicsContext_StrokeLineSegements(*args, **kwargs)
72ef6efb
RD
5516
5517 def DrawLines(*args, **kwargs):
70d7cb34 5518 """
5c8c7dd3 5519 DrawLines(self, size_t points, int fillStyle=ODDEVEN_RULE)
70d7cb34
RD
5520
5521 draws a polygon
5522 """
72ef6efb
RD
5523 return _gdi_.GraphicsContext_DrawLines(*args, **kwargs)
5524
5525 def DrawRectangle(*args, **kwargs):
70d7cb34
RD
5526 """
5527 DrawRectangle(self, Double x, Double y, Double w, Double h)
5528
5529 draws a rectangle
5530 """
72ef6efb
RD
5531 return _gdi_.GraphicsContext_DrawRectangle(*args, **kwargs)
5532
5533 def DrawEllipse(*args, **kwargs):
70d7cb34
RD
5534 """
5535 DrawEllipse(self, Double x, Double y, Double w, Double h)
5536
5537 draws an ellipse
5538 """
72ef6efb
RD
5539 return _gdi_.GraphicsContext_DrawEllipse(*args, **kwargs)
5540
5541 def DrawRoundedRectangle(*args, **kwargs):
70d7cb34
RD
5542 """
5543 DrawRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5544
5545 draws a rounded rectangle
5546 """
72ef6efb
RD
5547 return _gdi_.GraphicsContext_DrawRoundedRectangle(*args, **kwargs)
5548
70d7cb34
RD
5549 def ShouldOffset(*args, **kwargs):
5550 """
5551 ShouldOffset(self) -> bool
5552
5553 helper to determine if a 0.5 offset should be applied for the drawing operation
5554 """
5555 return _gdi_.GraphicsContext_ShouldOffset(*args, **kwargs)
5556
72ef6efb 5557_gdi_.GraphicsContext_swigregister(GraphicsContext)
5c8c7dd3
RD
5558cvar = _gdi_.cvar
5559NullGraphicsPen = cvar.NullGraphicsPen
5560NullGraphicsBrush = cvar.NullGraphicsBrush
5561NullGraphicsFont = cvar.NullGraphicsFont
5562NullGraphicsMatrix = cvar.NullGraphicsMatrix
5563NullGraphicsPath = cvar.NullGraphicsPath
72ef6efb 5564
0a27f394
RD
5565def GraphicsContext_Create(*args):
5566 """
5567 Create(WindowDC dc) -> GraphicsContext
5568 GraphicsContext_Create(Window window) -> GraphicsContext
5569 """
be68621e
RD
5570 val = _gdi_.GraphicsContext_Create(*args)
5571 val.__dc = args[0] # save a ref so the dc will not be deleted before self
5572 return val
0a27f394
RD
5573
5574def GraphicsContext_CreateFromNative(*args, **kwargs):
5575 """GraphicsContext_CreateFromNative(void context) -> GraphicsContext"""
5576 return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs)
72ef6efb 5577
70d7cb34
RD
5578def GraphicsContext_CreateFromNativeWindow(*args, **kwargs):
5579 """GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext"""
5580 return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs)
5581
5582class GraphicsRenderer(_core.Object):
5583 """Proxy of C++ GraphicsRenderer class"""
5584 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5585 def __init__(self): raise AttributeError, "No constructor defined"
5586 __repr__ = _swig_repr
5587 __swig_destroy__ = _gdi_.delete_GraphicsRenderer
5588 __del__ = lambda self : None;
5589 def GetDefaultRenderer(*args, **kwargs):
5590 """GetDefaultRenderer() -> GraphicsRenderer"""
5591 return _gdi_.GraphicsRenderer_GetDefaultRenderer(*args, **kwargs)
5592
5593 GetDefaultRenderer = staticmethod(GetDefaultRenderer)
5594 def CreateContext(*args):
5595 """
5596 CreateContext(self, WindowDC dc) -> GraphicsContext
5597 CreateContext(self, Window window) -> GraphicsContext
5598 """
5599 return _gdi_.GraphicsRenderer_CreateContext(*args)
5600
5601 def CreateContextFromNativeContext(*args, **kwargs):
5602 """CreateContextFromNativeContext(self, void context) -> GraphicsContext"""
5603 return _gdi_.GraphicsRenderer_CreateContextFromNativeContext(*args, **kwargs)
5604
5605 def CreateContextFromNativeWindow(*args, **kwargs):
5606 """CreateContextFromNativeWindow(self, void window) -> GraphicsContext"""
5607 return _gdi_.GraphicsRenderer_CreateContextFromNativeWindow(*args, **kwargs)
5608
5609 def CreatePath(*args, **kwargs):
5610 """CreatePath(self) -> GraphicsPath"""
5611 return _gdi_.GraphicsRenderer_CreatePath(*args, **kwargs)
5612
5613 def CreateMatrix(*args, **kwargs):
5614 """
5615 CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5616 Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
5617 """
5618 return _gdi_.GraphicsRenderer_CreateMatrix(*args, **kwargs)
5619
5620 def CreatePen(*args, **kwargs):
5621 """CreatePen(self, Pen pen) -> GraphicsPen"""
5622 return _gdi_.GraphicsRenderer_CreatePen(*args, **kwargs)
5623
5624 def CreateBrush(*args, **kwargs):
5625 """CreateBrush(self, Brush brush) -> GraphicsBrush"""
5626 return _gdi_.GraphicsRenderer_CreateBrush(*args, **kwargs)
5627
5628 def CreateLinearGradientBrush(*args, **kwargs):
5629 """
5630 CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5631 Colour c2) -> GraphicsBrush
5632 """
5633 return _gdi_.GraphicsRenderer_CreateLinearGradientBrush(*args, **kwargs)
5634
5635 def CreateRadialGradientBrush(*args, **kwargs):
5636 """
5637 CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5638 Colour oColor, Colour cColor) -> GraphicsBrush
5639 """
5640 return _gdi_.GraphicsRenderer_CreateRadialGradientBrush(*args, **kwargs)
5641
5642 def CreateFont(*args, **kwargs):
5643 """CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont"""
5644 return _gdi_.GraphicsRenderer_CreateFont(*args, **kwargs)
5645
5646_gdi_.GraphicsRenderer_swigregister(GraphicsRenderer)
5647
5648def GraphicsRenderer_GetDefaultRenderer(*args):
5649 """GraphicsRenderer_GetDefaultRenderer() -> GraphicsRenderer"""
5650 return _gdi_.GraphicsRenderer_GetDefaultRenderer(*args)
5651
72ef6efb
RD
5652class GCDC(DC):
5653 """Proxy of C++ GCDC class"""
5654 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5655 __repr__ = _swig_repr
5656 def __init__(self, *args, **kwargs):
5657 """__init__(self, WindowDC dc) -> GCDC"""
5658 _gdi_.GCDC_swiginit(self,_gdi_.new_GCDC(*args, **kwargs))
5659 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
5660
5661 __swig_destroy__ = _gdi_.delete_GCDC
5662 __del__ = lambda self : None;
0a27f394
RD
5663 def GetGraphicsContext(*args, **kwargs):
5664 """GetGraphicsContext(self) -> GraphicsContext"""
5665 return _gdi_.GCDC_GetGraphicsContext(*args, **kwargs)
5666
5667 def SetGraphicsContext(*args, **kwargs):
5668 """SetGraphicsContext(self, GraphicsContext ctx)"""
5669 return _gdi_.GCDC_SetGraphicsContext(*args, **kwargs)
72ef6efb 5670
0a27f394 5671 GraphicsContext = property(GetGraphicsContext,SetGraphicsContext)
72ef6efb
RD
5672_gdi_.GCDC_swigregister(GCDC)
5673
b39fe951
RD
5674class Overlay(object):
5675 """Proxy of C++ Overlay class"""
5676 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5677 __repr__ = _swig_repr
5678 def __init__(self, *args, **kwargs):
5679 """__init__(self) -> Overlay"""
5680 _gdi_.Overlay_swiginit(self,_gdi_.new_Overlay(*args, **kwargs))
5681 __swig_destroy__ = _gdi_.delete_Overlay
5682 __del__ = lambda self : None;
5683 def Reset(*args, **kwargs):
5684 """Reset(self)"""
5685 return _gdi_.Overlay_Reset(*args, **kwargs)
5686
5687_gdi_.Overlay_swigregister(Overlay)
5688
5689class DCOverlay(object):
5690 """Proxy of C++ DCOverlay class"""
5691 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5692 __repr__ = _swig_repr
5693 def __init__(self, *args):
5694 """
5695 __init__(self, Overlay overlay, WindowDC dc, int x, int y, int width,
5696 int height) -> DCOverlay
5697 __init__(self, Overlay overlay, WindowDC dc) -> DCOverlay
5698 """
5699 _gdi_.DCOverlay_swiginit(self,_gdi_.new_DCOverlay(*args))
5700 __swig_destroy__ = _gdi_.delete_DCOverlay
5701 __del__ = lambda self : None;
5702 def Clear(*args, **kwargs):
5703 """Clear(self)"""
5704 return _gdi_.DCOverlay_Clear(*args, **kwargs)
5705
5706_gdi_.DCOverlay_swigregister(DCOverlay)
5707
72ef6efb
RD
5708#---------------------------------------------------------------------------
5709
54f9ee45
RD
5710IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
5711IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
5712IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
5713IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
5714IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
5715IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
5716IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
5717class ImageList(_core.Object):
093d3ff1 5718 """Proxy of C++ ImageList class"""
0085ce49
RD
5719 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5720 __repr__ = _swig_repr
5721 def __init__(self, *args, **kwargs):
a95a7133 5722 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
0085ce49
RD
5723 _gdi_.ImageList_swiginit(self,_gdi_.new_ImageList(*args, **kwargs))
5724 __swig_destroy__ = _gdi_.delete_ImageList
5725 __del__ = lambda self : None;
e811c8ce 5726 def Add(*args, **kwargs):
a95a7133 5727 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
54f9ee45 5728 return _gdi_.ImageList_Add(*args, **kwargs)
e811c8ce
RD
5729
5730 def AddWithColourMask(*args, **kwargs):
a95a7133 5731 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
54f9ee45 5732 return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
e811c8ce
RD
5733
5734 def AddIcon(*args, **kwargs):
a95a7133 5735 """AddIcon(self, Icon icon) -> int"""
54f9ee45 5736 return _gdi_.ImageList_AddIcon(*args, **kwargs)
e811c8ce 5737
b9d6a5f3
RD
5738 def GetBitmap(*args, **kwargs):
5739 """GetBitmap(self, int index) -> Bitmap"""
5740 return _gdi_.ImageList_GetBitmap(*args, **kwargs)
5741
5742 def GetIcon(*args, **kwargs):
5743 """GetIcon(self, int index) -> Icon"""
5744 return _gdi_.ImageList_GetIcon(*args, **kwargs)
5745
e811c8ce 5746 def Replace(*args, **kwargs):
01f6b6d3 5747 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
54f9ee45 5748 return _gdi_.ImageList_Replace(*args, **kwargs)
e811c8ce
RD
5749
5750 def Draw(*args, **kwargs):
0df68c9f 5751 """
a95a7133 5752 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
0df68c9f
RD
5753 bool solidBackground=False) -> bool
5754 """
54f9ee45 5755 return _gdi_.ImageList_Draw(*args, **kwargs)
e811c8ce
RD
5756
5757 def GetImageCount(*args, **kwargs):
a95a7133 5758 """GetImageCount(self) -> int"""
54f9ee45 5759 return _gdi_.ImageList_GetImageCount(*args, **kwargs)
e811c8ce
RD
5760
5761 def Remove(*args, **kwargs):
a95a7133 5762 """Remove(self, int index) -> bool"""
54f9ee45 5763 return _gdi_.ImageList_Remove(*args, **kwargs)
e811c8ce
RD
5764
5765 def RemoveAll(*args, **kwargs):
a95a7133 5766 """RemoveAll(self) -> bool"""
54f9ee45 5767 return _gdi_.ImageList_RemoveAll(*args, **kwargs)
e811c8ce
RD
5768
5769 def GetSize(*args, **kwargs):
b850e7f3 5770 """GetSize(index) -> (width,height)"""
54f9ee45 5771 return _gdi_.ImageList_GetSize(*args, **kwargs)
e811c8ce 5772
97ab0f6a
RD
5773 ImageCount = property(GetImageCount,doc="See `GetImageCount`")
5774 Size = property(GetSize,doc="See `GetSize`")
2131d850 5775_gdi_.ImageList_swigregister(ImageList)
d14a1e28
RD
5776
5777#---------------------------------------------------------------------------
5778
50efceee
RD
5779class StockGDI(object):
5780 """Proxy of C++ StockGDI class"""
0085ce49 5781 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
0085ce49 5782 __repr__ = _swig_repr
50efceee
RD
5783 BRUSH_BLACK = _gdi_.StockGDI_BRUSH_BLACK
5784 BRUSH_BLUE = _gdi_.StockGDI_BRUSH_BLUE
5785 BRUSH_CYAN = _gdi_.StockGDI_BRUSH_CYAN
5786 BRUSH_GREEN = _gdi_.StockGDI_BRUSH_GREEN
5787 BRUSH_GREY = _gdi_.StockGDI_BRUSH_GREY
5788 BRUSH_LIGHTGREY = _gdi_.StockGDI_BRUSH_LIGHTGREY
5789 BRUSH_MEDIUMGREY = _gdi_.StockGDI_BRUSH_MEDIUMGREY
5790 BRUSH_RED = _gdi_.StockGDI_BRUSH_RED
5791 BRUSH_TRANSPARENT = _gdi_.StockGDI_BRUSH_TRANSPARENT
5792 BRUSH_WHITE = _gdi_.StockGDI_BRUSH_WHITE
5793 COLOUR_BLACK = _gdi_.StockGDI_COLOUR_BLACK
5794 COLOUR_BLUE = _gdi_.StockGDI_COLOUR_BLUE
5795 COLOUR_CYAN = _gdi_.StockGDI_COLOUR_CYAN
5796 COLOUR_GREEN = _gdi_.StockGDI_COLOUR_GREEN
5797 COLOUR_LIGHTGREY = _gdi_.StockGDI_COLOUR_LIGHTGREY
5798 COLOUR_RED = _gdi_.StockGDI_COLOUR_RED
5799 COLOUR_WHITE = _gdi_.StockGDI_COLOUR_WHITE
5800 CURSOR_CROSS = _gdi_.StockGDI_CURSOR_CROSS
5801 CURSOR_HOURGLASS = _gdi_.StockGDI_CURSOR_HOURGLASS
5802 CURSOR_STANDARD = _gdi_.StockGDI_CURSOR_STANDARD
5803 FONT_ITALIC = _gdi_.StockGDI_FONT_ITALIC
5804 FONT_NORMAL = _gdi_.StockGDI_FONT_NORMAL
5805 FONT_SMALL = _gdi_.StockGDI_FONT_SMALL
5806 FONT_SWISS = _gdi_.StockGDI_FONT_SWISS
5807 PEN_BLACK = _gdi_.StockGDI_PEN_BLACK
5808 PEN_BLACKDASHED = _gdi_.StockGDI_PEN_BLACKDASHED
5809 PEN_CYAN = _gdi_.StockGDI_PEN_CYAN
5810 PEN_GREEN = _gdi_.StockGDI_PEN_GREEN
5811 PEN_GREY = _gdi_.StockGDI_PEN_GREY
5812 PEN_LIGHTGREY = _gdi_.StockGDI_PEN_LIGHTGREY
5813 PEN_MEDIUMGREY = _gdi_.StockGDI_PEN_MEDIUMGREY
5814 PEN_RED = _gdi_.StockGDI_PEN_RED
5815 PEN_TRANSPARENT = _gdi_.StockGDI_PEN_TRANSPARENT
5816 PEN_WHITE = _gdi_.StockGDI_PEN_WHITE
5817 ITEMCOUNT = _gdi_.StockGDI_ITEMCOUNT
5818 def __init__(self, *args, **kwargs):
5819 """__init__(self) -> StockGDI"""
5820 _gdi_.StockGDI_swiginit(self,_gdi_.new_StockGDI(*args, **kwargs))
5821 __swig_destroy__ = _gdi_.delete_StockGDI
5822 __del__ = lambda self : None;
5823 def DeleteAll(*args, **kwargs):
5824 """DeleteAll()"""
5825 return _gdi_.StockGDI_DeleteAll(*args, **kwargs)
e811c8ce 5826
50efceee
RD
5827 DeleteAll = staticmethod(DeleteAll)
5828 def instance(*args, **kwargs):
5829 """instance() -> StockGDI"""
5830 return _gdi_.StockGDI_instance(*args, **kwargs)
e811c8ce 5831
50efceee
RD
5832 instance = staticmethod(instance)
5833 def GetBrush(*args, **kwargs):
5834 """GetBrush(int item) -> Brush"""
5835 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
e811c8ce 5836
50efceee
RD
5837 GetBrush = staticmethod(GetBrush)
5838 def GetColour(*args, **kwargs):
5839 """GetColour(int item) -> Colour"""
5840 return _gdi_.StockGDI_GetColour(*args, **kwargs)
e811c8ce 5841
50efceee
RD
5842 GetColour = staticmethod(GetColour)
5843 def GetCursor(*args, **kwargs):
5844 """GetCursor(int item) -> Cursor"""
5845 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
5846
5847 GetCursor = staticmethod(GetCursor)
5848 def GetPen(*args, **kwargs):
5849 """GetPen(int item) -> Pen"""
5850 return _gdi_.StockGDI_GetPen(*args, **kwargs)
5851
5852 GetPen = staticmethod(GetPen)
5853 def GetFont(*args, **kwargs):
5854 """GetFont(self, int item) -> Font"""
5855 return _gdi_.StockGDI_GetFont(*args, **kwargs)
5856
01f6b6d3
RD
5857 def _initStockObjects():
5858 import wx
704eda0c
RD
5859 wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this
5860 wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this
5861 wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this
5862 wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this
01f6b6d3 5863
704eda0c
RD
5864 wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this
5865 wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this
5866 wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this
5867 wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this
5868 wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this
5869 wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this
5870 wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this
5871 wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this
5872 wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this
5873 wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this
5874
5875 wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this
5876 wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this
5877 wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this
5878 wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this
5879 wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this
5880 wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this
5881 wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this
5882 wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this
5883 wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this
5884 wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this
5885
5886 wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this
5887 wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this
5888 wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this
5889 wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this
5890 wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this
5891 wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this
5892 wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this
5893
5894 wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this
5895 wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this
5896 wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this
5897
5898 wx.TheFontList.this = _wxPyInitTheFontList().this
5899 wx.ThePenList.this = _wxPyInitThePenList().this
5900 wx.TheBrushList.this = _wxPyInitTheBrushList().this
5901 wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this
5902
01f6b6d3
RD
5903
5904 _initStockObjects = staticmethod(_initStockObjects)
5905
2131d850 5906_gdi_.StockGDI_swigregister(StockGDI)
50efceee
RD
5907
5908def StockGDI_DeleteAll(*args):
5909 """StockGDI_DeleteAll()"""
5910 return _gdi_.StockGDI_DeleteAll(*args)
5911
5912def StockGDI_instance(*args):
5913 """StockGDI_instance() -> StockGDI"""
5914 return _gdi_.StockGDI_instance(*args)
5915
5916def StockGDI_GetBrush(*args, **kwargs):
5917 """StockGDI_GetBrush(int item) -> Brush"""
5918 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
5919
5920def StockGDI_GetColour(*args, **kwargs):
5921 """StockGDI_GetColour(int item) -> Colour"""
5922 return _gdi_.StockGDI_GetColour(*args, **kwargs)
5923
5924def StockGDI_GetCursor(*args, **kwargs):
5925 """StockGDI_GetCursor(int item) -> Cursor"""
5926 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
5927
5928def StockGDI_GetPen(*args, **kwargs):
5929 """StockGDI_GetPen(int item) -> Pen"""
5930 return _gdi_.StockGDI_GetPen(*args, **kwargs)
5931
704eda0c
RD
5932# Create an uninitialized instance for the stock objects, they will
5933# be initialized later when the wx.App object is created.
5934ITALIC_FONT = Font.__new__(Font)
5935NORMAL_FONT = Font.__new__(Font)
5936SMALL_FONT = Font.__new__(Font)
5937SWISS_FONT = Font.__new__(Font)
5938
5939BLACK_DASHED_PEN = Pen.__new__(Pen)
5940BLACK_PEN = Pen.__new__(Pen)
5941CYAN_PEN = Pen.__new__(Pen)
5942GREEN_PEN = Pen.__new__(Pen)
5943GREY_PEN = Pen.__new__(Pen)
5944LIGHT_GREY_PEN = Pen.__new__(Pen)
5945MEDIUM_GREY_PEN = Pen.__new__(Pen)
5946RED_PEN = Pen.__new__(Pen)
5947TRANSPARENT_PEN = Pen.__new__(Pen)
5948WHITE_PEN = Pen.__new__(Pen)
5949
5950BLACK_BRUSH = Brush.__new__(Brush)
5951BLUE_BRUSH = Brush.__new__(Brush)
5952CYAN_BRUSH = Brush.__new__(Brush)
5953GREEN_BRUSH = Brush.__new__(Brush)
5954GREY_BRUSH = Brush.__new__(Brush)
5955LIGHT_GREY_BRUSH = Brush.__new__(Brush)
5956MEDIUM_GREY_BRUSH = Brush.__new__(Brush)
5957RED_BRUSH = Brush.__new__(Brush)
5958TRANSPARENT_BRUSH = Brush.__new__(Brush)
5959WHITE_BRUSH = Brush.__new__(Brush)
5960
5961BLACK = Colour.__new__(Colour)
5962BLUE = Colour.__new__(Colour)
5963CYAN = Colour.__new__(Colour)
5964GREEN = Colour.__new__(Colour)
5965LIGHT_GREY = Colour.__new__(Colour)
5966RED = Colour.__new__(Colour)
5967WHITE = Colour.__new__(Colour)
5968
5969CROSS_CURSOR = Cursor.__new__(Cursor)
5970HOURGLASS_CURSOR = Cursor.__new__(Cursor)
5971STANDARD_CURSOR = Cursor.__new__(Cursor)
5972
50efceee
RD
5973class GDIObjListBase(object):
5974 """Proxy of C++ GDIObjListBase class"""
5975 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5976 __repr__ = _swig_repr
5977 def __init__(self, *args, **kwargs):
5978 """__init__(self) -> GDIObjListBase"""
5979 _gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs))
5980 __swig_destroy__ = _gdi_.delete_GDIObjListBase
5981 __del__ = lambda self : None;
2131d850 5982_gdi_.GDIObjListBase_swigregister(GDIObjListBase)
994141e6
RD
5983NullBitmap = cvar.NullBitmap
5984NullIcon = cvar.NullIcon
5985NullCursor = cvar.NullCursor
5986NullPen = cvar.NullPen
5987NullBrush = cvar.NullBrush
5988NullPalette = cvar.NullPalette
5989NullFont = cvar.NullFont
5990NullColour = cvar.NullColour
d14a1e28 5991
50efceee
RD
5992class PenList(GDIObjListBase):
5993 """Proxy of C++ PenList class"""
0085ce49
RD
5994 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5995 def __init__(self): raise AttributeError, "No constructor defined"
5996 __repr__ = _swig_repr
50efceee
RD
5997 def FindOrCreatePen(*args, **kwargs):
5998 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
5999 return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
6000
6001 def AddPen(*args, **kwargs):
6002 """AddPen(self, Pen pen)"""
6003 return _gdi_.PenList_AddPen(*args, **kwargs)
e811c8ce 6004
50efceee
RD
6005 def RemovePen(*args, **kwargs):
6006 """RemovePen(self, Pen pen)"""
6007 return _gdi_.PenList_RemovePen(*args, **kwargs)
6008
6009 AddPen = wx._deprecated(AddPen)
6010 RemovePen = wx._deprecated(RemovePen)
6011
2131d850 6012_gdi_.PenList_swigregister(PenList)
50efceee
RD
6013
6014class BrushList(GDIObjListBase):
6015 """Proxy of C++ BrushList class"""
6016 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6017 def __init__(self): raise AttributeError, "No constructor defined"
6018 __repr__ = _swig_repr
e811c8ce 6019 def FindOrCreateBrush(*args, **kwargs):
61d07ac7 6020 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
54f9ee45 6021 return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
e811c8ce 6022
50efceee
RD
6023 def AddBrush(*args, **kwargs):
6024 """AddBrush(self, Brush brush)"""
6025 return _gdi_.BrushList_AddBrush(*args, **kwargs)
6026
e811c8ce 6027 def RemoveBrush(*args, **kwargs):
a95a7133 6028 """RemoveBrush(self, Brush brush)"""
54f9ee45 6029 return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
e811c8ce 6030
50efceee
RD
6031 AddBrush = wx._deprecated(AddBrush)
6032 RemoveBrush = wx._deprecated(RemoveBrush)
e811c8ce 6033
2131d850 6034_gdi_.BrushList_swigregister(BrushList)
d14a1e28 6035
50efceee
RD
6036class FontList(GDIObjListBase):
6037 """Proxy of C++ FontList class"""
6038 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6039 def __init__(self): raise AttributeError, "No constructor defined"
6040 __repr__ = _swig_repr
6041 def FindOrCreateFont(*args, **kwargs):
6042 """
6043 FindOrCreateFont(self, int point_size, int family, int style, int weight,
6044 bool underline=False, String facename=EmptyString,
6045 int encoding=FONTENCODING_DEFAULT) -> Font
6046 """
6047 return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
6048
6049 def AddFont(*args, **kwargs):
6050 """AddFont(self, Font font)"""
6051 return _gdi_.FontList_AddFont(*args, **kwargs)
6052
6053 def RemoveFont(*args, **kwargs):
6054 """RemoveFont(self, Font font)"""
6055 return _gdi_.FontList_RemoveFont(*args, **kwargs)
6056
6057 AddFont = wx._deprecated(AddFont)
6058 RemoveFont = wx._deprecated(RemoveFont)
6059
2131d850 6060_gdi_.FontList_swigregister(FontList)
50efceee
RD
6061
6062class ColourDatabase(object):
093d3ff1 6063 """Proxy of C++ ColourDatabase class"""
0085ce49
RD
6064 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6065 __repr__ = _swig_repr
6066 def __init__(self, *args, **kwargs):
a95a7133 6067 """__init__(self) -> ColourDatabase"""
0085ce49
RD
6068 _gdi_.ColourDatabase_swiginit(self,_gdi_.new_ColourDatabase(*args, **kwargs))
6069 __swig_destroy__ = _gdi_.delete_ColourDatabase
6070 __del__ = lambda self : None;
e811c8ce 6071 def Find(*args, **kwargs):
a95a7133 6072 """Find(self, String name) -> Colour"""
54f9ee45 6073 return _gdi_.ColourDatabase_Find(*args, **kwargs)
e811c8ce
RD
6074
6075 def FindName(*args, **kwargs):
a95a7133 6076 """FindName(self, Colour colour) -> String"""
54f9ee45 6077 return _gdi_.ColourDatabase_FindName(*args, **kwargs)
e811c8ce 6078
d14a1e28 6079 FindColour = Find
e811c8ce 6080 def AddColour(*args, **kwargs):
a95a7133 6081 """AddColour(self, String name, Colour colour)"""
54f9ee45 6082 return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
e811c8ce
RD
6083
6084 def Append(*args, **kwargs):
a95a7133 6085 """Append(self, String name, int red, int green, int blue)"""
54f9ee45 6086 return _gdi_.ColourDatabase_Append(*args, **kwargs)
e811c8ce 6087
2131d850 6088_gdi_.ColourDatabase_swigregister(ColourDatabase)
d14a1e28 6089
50efceee 6090#---------------------------------------------------------------------------
e811c8ce 6091
e811c8ce 6092
50efceee
RD
6093def _wxPyInitTheFontList(*args):
6094 """_wxPyInitTheFontList() -> FontList"""
6095 return _gdi_._wxPyInitTheFontList(*args)
e811c8ce 6096
50efceee
RD
6097def _wxPyInitThePenList(*args):
6098 """_wxPyInitThePenList() -> PenList"""
6099 return _gdi_._wxPyInitThePenList(*args)
e811c8ce 6100
50efceee
RD
6101def _wxPyInitTheBrushList(*args):
6102 """_wxPyInitTheBrushList() -> BrushList"""
6103 return _gdi_._wxPyInitTheBrushList(*args)
70551f47 6104
50efceee
RD
6105def _wxPyInitTheColourDatabase(*args):
6106 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
6107 return _gdi_._wxPyInitTheColourDatabase(*args)
704eda0c
RD
6108# Create an uninitialized instance for the stock objects, they will
6109# be initialized later when the wx.App object is created.
6110TheFontList = FontList.__new__(FontList)
6111ThePenList = PenList.__new__(PenList)
6112TheBrushList = BrushList.__new__(BrushList)
6113TheColourDatabase = ColourDatabase.__new__(ColourDatabase)
fbcadfca 6114
994141e6 6115NullColor = NullColour
d14a1e28 6116#---------------------------------------------------------------------------
fbcadfca 6117
54f9ee45 6118class Effects(_core.Object):
093d3ff1 6119 """Proxy of C++ Effects class"""
0085ce49
RD
6120 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6121 __repr__ = _swig_repr
6122 def __init__(self, *args, **kwargs):
a95a7133 6123 """__init__(self) -> Effects"""
0085ce49 6124 _gdi_.Effects_swiginit(self,_gdi_.new_Effects(*args, **kwargs))
e811c8ce 6125 def GetHighlightColour(*args, **kwargs):
a95a7133 6126 """GetHighlightColour(self) -> Colour"""
54f9ee45 6127 return _gdi_.Effects_GetHighlightColour(*args, **kwargs)
e811c8ce
RD
6128
6129 def GetLightShadow(*args, **kwargs):
a95a7133 6130 """GetLightShadow(self) -> Colour"""
54f9ee45 6131 return _gdi_.Effects_GetLightShadow(*args, **kwargs)
e811c8ce
RD
6132
6133 def GetFaceColour(*args, **kwargs):
a95a7133 6134 """GetFaceColour(self) -> Colour"""
54f9ee45 6135 return _gdi_.Effects_GetFaceColour(*args, **kwargs)
e811c8ce
RD
6136
6137 def GetMediumShadow(*args, **kwargs):
a95a7133 6138 """GetMediumShadow(self) -> Colour"""
54f9ee45 6139 return _gdi_.Effects_GetMediumShadow(*args, **kwargs)
e811c8ce
RD
6140
6141 def GetDarkShadow(*args, **kwargs):
a95a7133 6142 """GetDarkShadow(self) -> Colour"""
54f9ee45 6143 return _gdi_.Effects_GetDarkShadow(*args, **kwargs)
e811c8ce
RD
6144
6145 def SetHighlightColour(*args, **kwargs):
a95a7133 6146 """SetHighlightColour(self, Colour c)"""
54f9ee45 6147 return _gdi_.Effects_SetHighlightColour(*args, **kwargs)
e811c8ce
RD
6148
6149 def SetLightShadow(*args, **kwargs):
a95a7133 6150 """SetLightShadow(self, Colour c)"""
54f9ee45 6151 return _gdi_.Effects_SetLightShadow(*args, **kwargs)
e811c8ce
RD
6152
6153 def SetFaceColour(*args, **kwargs):
a95a7133 6154 """SetFaceColour(self, Colour c)"""
54f9ee45 6155 return _gdi_.Effects_SetFaceColour(*args, **kwargs)
e811c8ce
RD
6156
6157 def SetMediumShadow(*args, **kwargs):
a95a7133 6158 """SetMediumShadow(self, Colour c)"""
54f9ee45 6159 return _gdi_.Effects_SetMediumShadow(*args, **kwargs)
e811c8ce
RD
6160
6161 def SetDarkShadow(*args, **kwargs):
a95a7133 6162 """SetDarkShadow(self, Colour c)"""
54f9ee45 6163 return _gdi_.Effects_SetDarkShadow(*args, **kwargs)
e811c8ce
RD
6164
6165 def Set(*args, **kwargs):
0df68c9f 6166 """
a95a7133 6167 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
0df68c9f
RD
6168 Colour mediumShadow, Colour darkShadow)
6169 """
54f9ee45 6170 return _gdi_.Effects_Set(*args, **kwargs)
e811c8ce
RD
6171
6172 def DrawSunkenEdge(*args, **kwargs):
a95a7133 6173 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
54f9ee45 6174 return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs)
4be61064 6175
e811c8ce 6176 def TileBitmap(*args, **kwargs):
a95a7133 6177 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
54f9ee45 6178 return _gdi_.Effects_TileBitmap(*args, **kwargs)
e811c8ce 6179
97ab0f6a
RD
6180 DarkShadow = property(GetDarkShadow,SetDarkShadow,doc="See `GetDarkShadow` and `SetDarkShadow`")
6181 FaceColour = property(GetFaceColour,SetFaceColour,doc="See `GetFaceColour` and `SetFaceColour`")
6182 HighlightColour = property(GetHighlightColour,SetHighlightColour,doc="See `GetHighlightColour` and `SetHighlightColour`")
6183 LightShadow = property(GetLightShadow,SetLightShadow,doc="See `GetLightShadow` and `SetLightShadow`")
6184 MediumShadow = property(GetMediumShadow,SetMediumShadow,doc="See `GetMediumShadow` and `SetMediumShadow`")
2131d850 6185_gdi_.Effects_swigregister(Effects)
d14a1e28 6186
8d38bd1d
RD
6187#---------------------------------------------------------------------------
6188
6189CONTROL_DISABLED = _gdi_.CONTROL_DISABLED
6190CONTROL_FOCUSED = _gdi_.CONTROL_FOCUSED
6191CONTROL_PRESSED = _gdi_.CONTROL_PRESSED
79df624a 6192CONTROL_SPECIAL = _gdi_.CONTROL_SPECIAL
8d38bd1d
RD
6193CONTROL_ISDEFAULT = _gdi_.CONTROL_ISDEFAULT
6194CONTROL_ISSUBMENU = _gdi_.CONTROL_ISSUBMENU
6195CONTROL_EXPANDED = _gdi_.CONTROL_EXPANDED
79df624a 6196CONTROL_SIZEGRIP = _gdi_.CONTROL_SIZEGRIP
8d38bd1d
RD
6197CONTROL_CURRENT = _gdi_.CONTROL_CURRENT
6198CONTROL_SELECTED = _gdi_.CONTROL_SELECTED
6199CONTROL_CHECKED = _gdi_.CONTROL_CHECKED
6200CONTROL_CHECKABLE = _gdi_.CONTROL_CHECKABLE
6201CONTROL_UNDETERMINED = _gdi_.CONTROL_UNDETERMINED
6202CONTROL_FLAGS_MASK = _gdi_.CONTROL_FLAGS_MASK
6203CONTROL_DIRTY = _gdi_.CONTROL_DIRTY
6204class SplitterRenderParams(object):
6205 """
6206 This is just a simple struct used as a return value of
6207 `wx.RendererNative.GetSplitterParams` and contains some platform
6208 specific metrics about splitters.
6209
6210 * widthSash: the width of the splitter sash.
6211 * border: the width of the border of the splitter window.
6212 * isHotSensitive: ``True`` if the splitter changes its
6213 appearance when the mouse is over it.
6214
6215
6216 """
0085ce49
RD
6217 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6218 __repr__ = _swig_repr
6219 def __init__(self, *args, **kwargs):
8d38bd1d
RD
6220 """
6221 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
6222
6223 This is just a simple struct used as a return value of
6224 `wx.RendererNative.GetSplitterParams` and contains some platform
6225 specific metrics about splitters.
6226
6227 * widthSash: the width of the splitter sash.
6228 * border: the width of the border of the splitter window.
6229 * isHotSensitive: ``True`` if the splitter changes its
6230 appearance when the mouse is over it.
6231
6232
6233 """
0085ce49
RD
6234 _gdi_.SplitterRenderParams_swiginit(self,_gdi_.new_SplitterRenderParams(*args, **kwargs))
6235 __swig_destroy__ = _gdi_.delete_SplitterRenderParams
6236 __del__ = lambda self : None;
8d38bd1d
RD
6237 widthSash = property(_gdi_.SplitterRenderParams_widthSash_get)
6238 border = property(_gdi_.SplitterRenderParams_border_get)
6239 isHotSensitive = property(_gdi_.SplitterRenderParams_isHotSensitive_get)
2131d850 6240_gdi_.SplitterRenderParams_swigregister(SplitterRenderParams)
8d38bd1d 6241
33d6fd3b
RD
6242class HeaderButtonParams(object):
6243 """Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`"""
6244 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6245 __repr__ = _swig_repr
6246 def __init__(self, *args, **kwargs):
6247 """
6248 __init__(self) -> HeaderButtonParams
6249
6250 Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`
6251 """
6252 _gdi_.HeaderButtonParams_swiginit(self,_gdi_.new_HeaderButtonParams(*args, **kwargs))
6253 __swig_destroy__ = _gdi_.delete_HeaderButtonParams
6254 __del__ = lambda self : None;
6255 m_arrowColour = property(_gdi_.HeaderButtonParams_m_arrowColour_get, _gdi_.HeaderButtonParams_m_arrowColour_set)
6256 m_selectionColour = property(_gdi_.HeaderButtonParams_m_selectionColour_get, _gdi_.HeaderButtonParams_m_selectionColour_set)
6257 m_labelText = property(_gdi_.HeaderButtonParams_m_labelText_get, _gdi_.HeaderButtonParams_m_labelText_set)
6258 m_labelFont = property(_gdi_.HeaderButtonParams_m_labelFont_get, _gdi_.HeaderButtonParams_m_labelFont_set)
6259 m_labelColour = property(_gdi_.HeaderButtonParams_m_labelColour_get, _gdi_.HeaderButtonParams_m_labelColour_set)
6260 m_labelBitmap = property(_gdi_.HeaderButtonParams_m_labelBitmap_get, _gdi_.HeaderButtonParams_m_labelBitmap_set)
6261 m_labelAlignment = property(_gdi_.HeaderButtonParams_m_labelAlignment_get, _gdi_.HeaderButtonParams_m_labelAlignment_set)
6262_gdi_.HeaderButtonParams_swigregister(HeaderButtonParams)
6263
6264HDR_SORT_ICON_NONE = _gdi_.HDR_SORT_ICON_NONE
6265HDR_SORT_ICON_UP = _gdi_.HDR_SORT_ICON_UP
6266HDR_SORT_ICON_DOWN = _gdi_.HDR_SORT_ICON_DOWN
8d38bd1d
RD
6267class RendererVersion(object):
6268 """
6269 This simple struct represents the `wx.RendererNative` interface
6270 version and is only used as the return value of
6271 `wx.RendererNative.GetVersion`.
6272 """
0085ce49
RD
6273 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6274 __repr__ = _swig_repr
6275 def __init__(self, *args, **kwargs):
8d38bd1d
RD
6276 """
6277 __init__(self, int version_, int age_) -> RendererVersion
6278
6279 This simple struct represents the `wx.RendererNative` interface
6280 version and is only used as the return value of
6281 `wx.RendererNative.GetVersion`.
6282 """
0085ce49
RD
6283 _gdi_.RendererVersion_swiginit(self,_gdi_.new_RendererVersion(*args, **kwargs))
6284 __swig_destroy__ = _gdi_.delete_RendererVersion
6285 __del__ = lambda self : None;
8d38bd1d
RD
6286 Current_Version = _gdi_.RendererVersion_Current_Version
6287 Current_Age = _gdi_.RendererVersion_Current_Age
6288 def IsCompatible(*args, **kwargs):
6289 """IsCompatible(RendererVersion ver) -> bool"""
6290 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
6291
6292 IsCompatible = staticmethod(IsCompatible)
6293 version = property(_gdi_.RendererVersion_version_get)
6294 age = property(_gdi_.RendererVersion_age_get)
2131d850 6295_gdi_.RendererVersion_swigregister(RendererVersion)
8d38bd1d
RD
6296
6297def RendererVersion_IsCompatible(*args, **kwargs):
0085ce49
RD
6298 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
6299 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
8d38bd1d
RD
6300
6301class RendererNative(object):
6302 """
33d6fd3b
RD
6303 One of the design principles of wxWidgets is to use the native
6304 widgets on every platform in order to be as close as possible to
6305 the native look and feel on every platform. However there are
6306 still cases when some generic widgets are needed for various
6307 reasons, but it can sometimes take a lot of messy work to make
6308 them conform to the native LnF.
8d38bd1d
RD
6309
6310 The wx.RendererNative class is a collection of functions that have
6311 platform-specific implementations for drawing certain parts of
6312 genereic controls in ways that are as close to the native look as
6313 possible.
6314
f05326ba
RD
6315 Note that each drawing function restores the `wx.DC` attributes if it
6316 changes them, so it is safe to assume that the same pen, brush and
6317 colours that were active before the call to this function are still in
6318 effect after it.
6319
8d38bd1d 6320 """
0085ce49
RD
6321 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6322 def __init__(self): raise AttributeError, "No constructor defined"
6323 __repr__ = _swig_repr
8d38bd1d
RD
6324 def DrawHeaderButton(*args, **kwargs):
6325 """
33d6fd3b
RD
6326 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6327 HeaderButtonParams params=None)
8d38bd1d 6328
75219dcb 6329 Draw the header control button (such as what is used by `wx.ListCtrl`
8d38bd1d
RD
6330 in report mode.)
6331 """
6332 return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs)
6333
33d6fd3b
RD
6334 def DrawHeaderButtonContents(*args, **kwargs):
6335 """
6336 DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6337 HeaderButtonParams params=None)
6338
6339 Draw the contents of a header control button, (label, sort
6340 arrows, etc.) Normally this is only called by `DrawHeaderButton`.
6341 """
6342 return _gdi_.RendererNative_DrawHeaderButtonContents(*args, **kwargs)
6343
6344 def GetHeaderButtonHeight(*args, **kwargs):
6345 """
6346 GetHeaderButtonHeight(self, Window win) -> int
6347
6348 Returns the default height of a header button, either a fixed platform
6349 height if available, or a generic height based on the window's font.
6350 """
6351 return _gdi_.RendererNative_GetHeaderButtonHeight(*args, **kwargs)
6352
8d38bd1d
RD
6353 def DrawTreeItemButton(*args, **kwargs):
6354 """
6355 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
6356
6357 Draw the expanded/collapsed icon for a tree control item.
6358 """
6359 return _gdi_.RendererNative_DrawTreeItemButton(*args, **kwargs)
6360
6361 def DrawSplitterBorder(*args, **kwargs):
6362 """
6363 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
6364
6365 Draw the border for a sash window: this border must be such that the
6366 sash drawn by `DrawSplitterSash` blends into it well.
6367 """
6368 return _gdi_.RendererNative_DrawSplitterBorder(*args, **kwargs)
6369
6370 def DrawSplitterSash(*args, **kwargs):
6371 """
6372 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
6373 int flags=0)
6374
6375 Draw a sash. The orient parameter defines whether the sash should be
6376 vertical or horizontal and how the position should be interpreted.
6377 """
6378 return _gdi_.RendererNative_DrawSplitterSash(*args, **kwargs)
6379
6380 def DrawComboBoxDropButton(*args, **kwargs):
6381 """
6382 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
6383
6384 Draw a button like the one used by `wx.ComboBox` to show a drop down
6385 window. The usual appearance is a downwards pointing arrow.
6386
6387 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
6388 ``wx.CONTROL_CURRENT`` bits set.
6389 """
6390 return _gdi_.RendererNative_DrawComboBoxDropButton(*args, **kwargs)
6391
6392 def DrawDropArrow(*args, **kwargs):
6393 """
6394 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
6395
6396 Draw a drop down arrow that is suitable for use outside a combo
6397 box. Arrow will have a transparent background.
6398
6399 ``rect`` is not entirely filled by the arrow. Instead, you should use
6400 bounding rectangle of a drop down button which arrow matches the size
6401 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
6402 ``wx.CONTROL_CURRENT`` bit set.
6403 """
6404 return _gdi_.RendererNative_DrawDropArrow(*args, **kwargs)
6405
01f6b6d3 6406 def DrawCheckBox(*args, **kwargs):
50efceee 6407 """
01f6b6d3 6408 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
50efceee
RD
6409
6410 Draw a check button. Flags may use wx.CONTROL_CHECKED,
6411 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
6412 """
01f6b6d3
RD
6413 return _gdi_.RendererNative_DrawCheckBox(*args, **kwargs)
6414
6415 def DrawPushButton(*args, **kwargs):
6416 """
6417 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
6418
6419 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
6420 wx.CONTROL_ISDEFAULT
6421 """
6422 return _gdi_.RendererNative_DrawPushButton(*args, **kwargs)
6423
6424 def DrawItemSelectionRect(*args, **kwargs):
6425 """
6426 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
6427
6428 Draw rectangle indicating that an item in e.g. a list control has been
6429 selected or focused
6430
6431 The flags parameter may be:
6432
6433 ==================== ============================================
6434 wx.CONTROL_SELECTED item is selected, e.g. draw background
6435 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
6436 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
6437 background vs. grey otherwise
6438 ==================== ============================================
6439
6440 """
6441 return _gdi_.RendererNative_DrawItemSelectionRect(*args, **kwargs)
50efceee 6442
8d38bd1d
RD
6443 def GetSplitterParams(*args, **kwargs):
6444 """
6445 GetSplitterParams(self, Window win) -> SplitterRenderParams
6446
6447 Get the splitter parameters, see `wx.SplitterRenderParams`.
6448 """
6449 return _gdi_.RendererNative_GetSplitterParams(*args, **kwargs)
6450
6451 def Get(*args, **kwargs):
6452 """
6453 Get() -> RendererNative
6454
6455 Return the currently used renderer
6456 """
6457 return _gdi_.RendererNative_Get(*args, **kwargs)
6458
6459 Get = staticmethod(Get)
6460 def GetGeneric(*args, **kwargs):
6461 """
6462 GetGeneric() -> RendererNative
6463
6464 Return the generic implementation of the renderer. Under some
6465 platforms, this is the default renderer implementation, others have
6466 platform-specific default renderer which can be retrieved by calling
1d5ee749 6467 `wx.RendererNative.GetDefault`.
8d38bd1d
RD
6468 """
6469 return _gdi_.RendererNative_GetGeneric(*args, **kwargs)
6470
6471 GetGeneric = staticmethod(GetGeneric)
6472 def GetDefault(*args, **kwargs):
6473 """
6474 GetDefault() -> RendererNative
6475
6476 Return the default (native) implementation for this platform -- this
1d5ee749
RD
6477 is also the one used by default but this may be changed by calling
6478 `wx.RendererNative.Set` in which case the return value of this method
6479 may be different from the return value of `wx.RendererNative.Get`.
8d38bd1d
RD
6480 """
6481 return _gdi_.RendererNative_GetDefault(*args, **kwargs)
6482
6483 GetDefault = staticmethod(GetDefault)
6484 def Set(*args, **kwargs):
6485 """
6486 Set(RendererNative renderer) -> RendererNative
6487
6488 Set the renderer to use, passing None reverts to using the default
6489 renderer. Returns the previous renderer used with Set or None.
6490 """
6491 return _gdi_.RendererNative_Set(*args, **kwargs)
6492
6493 Set = staticmethod(Set)
6494 def GetVersion(*args, **kwargs):
6495 """
6496 GetVersion(self) -> RendererVersion
6497
6498 Returns the version of the renderer. Will be used for ensuring
6499 compatibility of dynamically loaded renderers.
6500 """
6501 return _gdi_.RendererNative_GetVersion(*args, **kwargs)
6502
33d6fd3b
RD
6503 SplitterParams = property(GetSplitterParams,doc="See `GetSplitterParams`")
6504 Version = property(GetVersion,doc="See `GetVersion`")
2131d850 6505_gdi_.RendererNative_swigregister(RendererNative)
8d38bd1d 6506
0085ce49
RD
6507def RendererNative_Get(*args):
6508 """
8d38bd1d
RD
6509 RendererNative_Get() -> RendererNative
6510
6511 Return the currently used renderer
6512 """
0085ce49 6513 return _gdi_.RendererNative_Get(*args)
8d38bd1d 6514
0085ce49
RD
6515def RendererNative_GetGeneric(*args):
6516 """
8d38bd1d
RD
6517 RendererNative_GetGeneric() -> RendererNative
6518
6519 Return the generic implementation of the renderer. Under some
6520 platforms, this is the default renderer implementation, others have
6521 platform-specific default renderer which can be retrieved by calling
1d5ee749 6522 `wx.RendererNative.GetDefault`.
8d38bd1d 6523 """
0085ce49 6524 return _gdi_.RendererNative_GetGeneric(*args)
8d38bd1d 6525
0085ce49
RD
6526def RendererNative_GetDefault(*args):
6527 """
8d38bd1d
RD
6528 RendererNative_GetDefault() -> RendererNative
6529
6530 Return the default (native) implementation for this platform -- this
1d5ee749
RD
6531 is also the one used by default but this may be changed by calling
6532 `wx.RendererNative.Set` in which case the return value of this method
6533 may be different from the return value of `wx.RendererNative.Get`.
8d38bd1d 6534 """
0085ce49 6535 return _gdi_.RendererNative_GetDefault(*args)
8d38bd1d
RD
6536
6537def RendererNative_Set(*args, **kwargs):
0085ce49 6538 """
8d38bd1d
RD
6539 RendererNative_Set(RendererNative renderer) -> RendererNative
6540
6541 Set the renderer to use, passing None reverts to using the default
6542 renderer. Returns the previous renderer used with Set or None.
6543 """
0085ce49 6544 return _gdi_.RendererNative_Set(*args, **kwargs)
8d38bd1d 6545
27e45892
RD
6546#---------------------------------------------------------------------------
6547
6548class PseudoDC(_core.Object):
6549 """
6550 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
6551 commands issued to the PseudoDC are stored in a list. You can then
6552 play these commands back to a real DC object using the DrawToDC
6553 method. Commands in the command list are indexed by ID. You can use
6554 this to clear the operations associated with a single ID and then
6555 re-draw the object associated with that ID.
6556 """
6557 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6558 __repr__ = _swig_repr
6559 def __init__(self, *args, **kwargs):
6560 """
6561 __init__(self) -> PseudoDC
6562
6563 Constructs a new Pseudo device context for recording dc operations
6564 """
6565 _gdi_.PseudoDC_swiginit(self,_gdi_.new_PseudoDC(*args, **kwargs))
6566 def BeginDrawing(*args, **kwargs):
6567 """
6568 BeginDrawing(self)
6569
6570 Allows for optimization of drawing code on platforms that need it. On
6571 other platforms this is just an empty function and is harmless. To
6572 take advantage of this postential optimization simply enclose each
6573 group of calls to the drawing primitives within calls to
6574 `BeginDrawing` and `EndDrawing`.
6575 """
6576 return _gdi_.PseudoDC_BeginDrawing(*args, **kwargs)
6577
6578 def EndDrawing(*args, **kwargs):
6579 """
6580 EndDrawing(self)
6581
6582 Ends the group of drawing primitives started with `BeginDrawing`, and
6583 invokes whatever optimization is available for this DC type on the
6584 current platform.
6585 """
6586 return _gdi_.PseudoDC_EndDrawing(*args, **kwargs)
6587
6588 __swig_destroy__ = _gdi_.delete_PseudoDC
6589 __del__ = lambda self : None;
6590 def RemoveAll(*args, **kwargs):
6591 """
6592 RemoveAll(self)
6593
6594 Removes all objects and operations from the recorded list.
6595 """
6596 return _gdi_.PseudoDC_RemoveAll(*args, **kwargs)
6597
6598 def GetLen(*args, **kwargs):
6599 """
6600 GetLen(self) -> int
6601
6602 Returns the number of operations in the recorded list.
6603 """
6604 return _gdi_.PseudoDC_GetLen(*args, **kwargs)
6605
6606 def SetId(*args, **kwargs):
6607 """
6608 SetId(self, int id)
6609
6610 Sets the id to be associated with subsequent operations.
6611 """
6612 return _gdi_.PseudoDC_SetId(*args, **kwargs)
6613
6614 def ClearId(*args, **kwargs):
6615 """
6616 ClearId(self, int id)
6617
6618 Removes all operations associated with id so the object can be redrawn.
6619 """
6620 return _gdi_.PseudoDC_ClearId(*args, **kwargs)
6621
6622 def RemoveId(*args, **kwargs):
6623 """
6624 RemoveId(self, int id)
6625
6626 Remove the object node (and all operations) associated with an id.
6627 """
6628 return _gdi_.PseudoDC_RemoveId(*args, **kwargs)
6629
6630 def TranslateId(*args, **kwargs):
6631 """
6632 TranslateId(self, int id, int dx, int dy)
6633
6634 Translate the operations of id by dx,dy.
6635 """
6636 return _gdi_.PseudoDC_TranslateId(*args, **kwargs)
6637
72ef6efb
RD
6638 def SetIdGreyedOut(*args, **kwargs):
6639 """
6640 SetIdGreyedOut(self, int id, bool greyout=True)
6641
6642 Set whether an object is drawn greyed out or not.
6643 """
6644 return _gdi_.PseudoDC_SetIdGreyedOut(*args, **kwargs)
6645
6646 def GetIdGreyedOut(*args, **kwargs):
6647 """
6648 GetIdGreyedOut(self, int id) -> bool
6649
6650 Get whether an object is drawn greyed out or not.
6651 """
6652 return _gdi_.PseudoDC_GetIdGreyedOut(*args, **kwargs)
6653
6654 def FindObjects(*args, **kwargs):
6655 """
6656 FindObjects(self, int x, int y, int radius=1, wxColor bg=*wxWHITE) -> PyObject
6657
6658 Returns a list of all the id's that draw a pixel with color
6659 not equal to bg within radius of (x,y).
6660 Returns an empty list if nothing is found. The list is in
6661 reverse drawing order so list[0] is the top id.
6662 """
6663 return _gdi_.PseudoDC_FindObjects(*args, **kwargs)
6664
6665 def FindObjectsByBBox(*args, **kwargs):
6666 """
6667 FindObjectsByBBox(self, int x, int y) -> PyObject
6668
6669 Returns a list of all the id's whose bounding boxes include (x,y).
6670 Returns an empty list if nothing is found. The list is in
6671 reverse drawing order so list[0] is the top id.
6672 """
6673 return _gdi_.PseudoDC_FindObjectsByBBox(*args, **kwargs)
6674
27e45892
RD
6675 def DrawIdToDC(*args, **kwargs):
6676 """
6677 DrawIdToDC(self, int id, DC dc)
6678
6679 Draw recorded operations of id to dc.
6680 """
6681 return _gdi_.PseudoDC_DrawIdToDC(*args, **kwargs)
6682
6683 def SetIdBounds(*args, **kwargs):
6684 """
6685 SetIdBounds(self, int id, Rect rect)
6686
6687 Set the bounding rect of a given object. This will create
6688 an object node if one doesn't exist.
6689 """
6690 return _gdi_.PseudoDC_SetIdBounds(*args, **kwargs)
6691
6692 def GetIdBounds(*args, **kwargs):
6693 """
6694 GetIdBounds(self, int id) -> Rect
6695
6696 Returns the bounding rectangle previouly set with SetIdBounds. If
6697 no bounds have been set, it returns wx.Rect(0,0,0,0).
6698 """
6699 return _gdi_.PseudoDC_GetIdBounds(*args, **kwargs)
6700
6701 def DrawToDCClipped(*args, **kwargs):
6702 """
6703 DrawToDCClipped(self, DC dc, Rect rect)
6704
6705 Draws the recorded operations to dc unless the operation is known to
6706 be outside rect.
6707 """
6708 return _gdi_.PseudoDC_DrawToDCClipped(*args, **kwargs)
6709
6710 def DrawToDCClippedRgn(*args, **kwargs):
6711 """
6712 DrawToDCClippedRgn(self, DC dc, Region region)
6713
6714 Draws the recorded operations to dc unless the operation is known to
6715 be outside rect.
6716 """
6717 return _gdi_.PseudoDC_DrawToDCClippedRgn(*args, **kwargs)
6718
6719 def DrawToDC(*args, **kwargs):
6720 """
6721 DrawToDC(self, DC dc)
6722
6723 Draws the recorded operations to dc.
6724 """
6725 return _gdi_.PseudoDC_DrawToDC(*args, **kwargs)
6726
6727 def FloodFill(*args, **kwargs):
6728 """
6729 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
6730
6731 Flood fills the device context starting from the given point, using
6732 the current brush colour, and using a style:
6733
6734 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6735 the given colour is encountered.
6736
6737 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6738 colour.
6739
6740 Returns False if the operation failed.
6741
6742 Note: The present implementation for non-Windows platforms may fail to
6743 find colour borders if the pixels do not match the colour
6744 exactly. However the function will still return true.
6745 """
6746 return _gdi_.PseudoDC_FloodFill(*args, **kwargs)
6747
6748 def FloodFillPoint(*args, **kwargs):
6749 """
6750 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
6751
6752 Flood fills the device context starting from the given point, using
6753 the current brush colour, and using a style:
6754
6755 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6756 the given colour is encountered.
6757
6758 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6759 colour.
6760
6761 Returns False if the operation failed.
6762
6763 Note: The present implementation for non-Windows platforms may fail to
6764 find colour borders if the pixels do not match the colour
6765 exactly. However the function will still return true.
6766 """
6767 return _gdi_.PseudoDC_FloodFillPoint(*args, **kwargs)
6768
6769 def DrawLine(*args, **kwargs):
6770 """
6771 DrawLine(self, int x1, int y1, int x2, int y2)
6772
6773 Draws a line from the first point to the second. The current pen is
6774 used for drawing the line. Note that the second point is *not* part of
6775 the line and is not drawn by this function (this is consistent with
6776 the behaviour of many other toolkits).
6777 """
6778 return _gdi_.PseudoDC_DrawLine(*args, **kwargs)
6779
6780 def DrawLinePoint(*args, **kwargs):
6781 """
6782 DrawLinePoint(self, Point pt1, Point pt2)
6783
6784 Draws a line from the first point to the second. The current pen is
6785 used for drawing the line. Note that the second point is *not* part of
6786 the line and is not drawn by this function (this is consistent with
6787 the behaviour of many other toolkits).
6788 """
6789 return _gdi_.PseudoDC_DrawLinePoint(*args, **kwargs)
6790
6791 def CrossHair(*args, **kwargs):
6792 """
6793 CrossHair(self, int x, int y)
6794
6795 Displays a cross hair using the current pen. This is a vertical and
6796 horizontal line the height and width of the window, centred on the
6797 given point.
6798 """
6799 return _gdi_.PseudoDC_CrossHair(*args, **kwargs)
6800
6801 def CrossHairPoint(*args, **kwargs):
6802 """
6803 CrossHairPoint(self, Point pt)
6804
6805 Displays a cross hair using the current pen. This is a vertical and
6806 horizontal line the height and width of the window, centred on the
6807 given point.
6808 """
6809 return _gdi_.PseudoDC_CrossHairPoint(*args, **kwargs)
6810
6811 def DrawArc(*args, **kwargs):
6812 """
6813 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
6814
6815 Draws an arc of a circle, centred on the *center* point (xc, yc), from
6816 the first point to the second. The current pen is used for the outline
6817 and the current brush for filling the shape.
6818
6819 The arc is drawn in an anticlockwise direction from the start point to
6820 the end point.
6821 """
6822 return _gdi_.PseudoDC_DrawArc(*args, **kwargs)
6823
6824 def DrawArcPoint(*args, **kwargs):
6825 """
6826 DrawArcPoint(self, Point pt1, Point pt2, Point center)
6827
6828 Draws an arc of a circle, centred on the *center* point (xc, yc), from
6829 the first point to the second. The current pen is used for the outline
6830 and the current brush for filling the shape.
6831
6832 The arc is drawn in an anticlockwise direction from the start point to
6833 the end point.
6834 """
6835 return _gdi_.PseudoDC_DrawArcPoint(*args, **kwargs)
6836
6837 def DrawCheckMark(*args, **kwargs):
6838 """
6839 DrawCheckMark(self, int x, int y, int width, int height)
6840
6841 Draws a check mark inside the given rectangle.
6842 """
6843 return _gdi_.PseudoDC_DrawCheckMark(*args, **kwargs)
6844
6845 def DrawCheckMarkRect(*args, **kwargs):
6846 """
6847 DrawCheckMarkRect(self, Rect rect)
6848
6849 Draws a check mark inside the given rectangle.
6850 """
6851 return _gdi_.PseudoDC_DrawCheckMarkRect(*args, **kwargs)
6852
6853 def DrawEllipticArc(*args, **kwargs):
6854 """
6855 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
6856
6857 Draws an arc of an ellipse, with the given rectangle defining the
6858 bounds of the ellipse. The current pen is used for drawing the arc and
6859 the current brush is used for drawing the pie.
6860
6861 The *start* and *end* parameters specify the start and end of the arc
6862 relative to the three-o'clock position from the center of the
6863 rectangle. Angles are specified in degrees (360 is a complete
6864 circle). Positive values mean counter-clockwise motion. If start is
6865 equal to end, a complete ellipse will be drawn.
6866 """
6867 return _gdi_.PseudoDC_DrawEllipticArc(*args, **kwargs)
6868
6869 def DrawEllipticArcPointSize(*args, **kwargs):
6870 """
6871 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
6872
6873 Draws an arc of an ellipse, with the given rectangle defining the
6874 bounds of the ellipse. The current pen is used for drawing the arc and
6875 the current brush is used for drawing the pie.
6876
6877 The *start* and *end* parameters specify the start and end of the arc
6878 relative to the three-o'clock position from the center of the
6879 rectangle. Angles are specified in degrees (360 is a complete
6880 circle). Positive values mean counter-clockwise motion. If start is
6881 equal to end, a complete ellipse will be drawn.
6882 """
6883 return _gdi_.PseudoDC_DrawEllipticArcPointSize(*args, **kwargs)
6884
6885 def DrawPoint(*args, **kwargs):
6886 """
6887 DrawPoint(self, int x, int y)
6888
6889 Draws a point using the current pen.
6890 """
6891 return _gdi_.PseudoDC_DrawPoint(*args, **kwargs)
6892
6893 def DrawPointPoint(*args, **kwargs):
6894 """
6895 DrawPointPoint(self, Point pt)
6896
6897 Draws a point using the current pen.
6898 """
6899 return _gdi_.PseudoDC_DrawPointPoint(*args, **kwargs)
6900
6901 def DrawRectangle(*args, **kwargs):
6902 """
6903 DrawRectangle(self, int x, int y, int width, int height)
6904
6905 Draws a rectangle with the given top left corner, and with the given
6906 size. The current pen is used for the outline and the current brush
6907 for filling the shape.
6908 """
6909 return _gdi_.PseudoDC_DrawRectangle(*args, **kwargs)
6910
6911 def DrawRectangleRect(*args, **kwargs):
6912 """
6913 DrawRectangleRect(self, Rect rect)
6914
6915 Draws a rectangle with the given top left corner, and with the given
6916 size. The current pen is used for the outline and the current brush
6917 for filling the shape.
6918 """
6919 return _gdi_.PseudoDC_DrawRectangleRect(*args, **kwargs)
6920
6921 def DrawRectanglePointSize(*args, **kwargs):
6922 """
6923 DrawRectanglePointSize(self, Point pt, Size sz)
6924
6925 Draws a rectangle with the given top left corner, and with the given
6926 size. The current pen is used for the outline and the current brush
6927 for filling the shape.
6928 """
6929 return _gdi_.PseudoDC_DrawRectanglePointSize(*args, **kwargs)
6930
6931 def DrawRoundedRectangle(*args, **kwargs):
6932 """
6933 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
6934
6935 Draws a rectangle with the given top left corner, and with the given
6936 size. The corners are quarter-circles using the given radius. The
6937 current pen is used for the outline and the current brush for filling
6938 the shape.
6939
6940 If radius is positive, the value is assumed to be the radius of the
6941 rounded corner. If radius is negative, the absolute value is assumed
6942 to be the proportion of the smallest dimension of the rectangle. This
6943 means that the corner can be a sensible size relative to the size of
6944 the rectangle, and also avoids the strange effects X produces when the
6945 corners are too big for the rectangle.
6946 """
6947 return _gdi_.PseudoDC_DrawRoundedRectangle(*args, **kwargs)
6948
6949 def DrawRoundedRectangleRect(*args, **kwargs):
6950 """
6951 DrawRoundedRectangleRect(self, Rect r, double radius)
6952
6953 Draws a rectangle with the given top left corner, and with the given
6954 size. The corners are quarter-circles using the given radius. The
6955 current pen is used for the outline and the current brush for filling
6956 the shape.
6957
6958 If radius is positive, the value is assumed to be the radius of the
6959 rounded corner. If radius is negative, the absolute value is assumed
6960 to be the proportion of the smallest dimension of the rectangle. This
6961 means that the corner can be a sensible size relative to the size of
6962 the rectangle, and also avoids the strange effects X produces when the
6963 corners are too big for the rectangle.
6964 """
6965 return _gdi_.PseudoDC_DrawRoundedRectangleRect(*args, **kwargs)
6966
6967 def DrawRoundedRectanglePointSize(*args, **kwargs):
6968 """
6969 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
6970
6971 Draws a rectangle with the given top left corner, and with the given
6972 size. The corners are quarter-circles using the given radius. The
6973 current pen is used for the outline and the current brush for filling
6974 the shape.
6975
6976 If radius is positive, the value is assumed to be the radius of the
6977 rounded corner. If radius is negative, the absolute value is assumed
6978 to be the proportion of the smallest dimension of the rectangle. This
6979 means that the corner can be a sensible size relative to the size of
6980 the rectangle, and also avoids the strange effects X produces when the
6981 corners are too big for the rectangle.
6982 """
6983 return _gdi_.PseudoDC_DrawRoundedRectanglePointSize(*args, **kwargs)
6984
6985 def DrawCircle(*args, **kwargs):
6986 """
6987 DrawCircle(self, int x, int y, int radius)
6988
6989 Draws a circle with the given center point and radius. The current
6990 pen is used for the outline and the current brush for filling the
6991 shape.
6992 """
6993 return _gdi_.PseudoDC_DrawCircle(*args, **kwargs)
6994
6995 def DrawCirclePoint(*args, **kwargs):
6996 """
6997 DrawCirclePoint(self, Point pt, int radius)
6998
6999 Draws a circle with the given center point and radius. The current
7000 pen is used for the outline and the current brush for filling the
7001 shape.
7002 """
7003 return _gdi_.PseudoDC_DrawCirclePoint(*args, **kwargs)
7004
7005 def DrawEllipse(*args, **kwargs):
7006 """
7007 DrawEllipse(self, int x, int y, int width, int height)
7008
7009 Draws an ellipse contained in the specified rectangle. The current pen
7010 is used for the outline and the current brush for filling the shape.
7011 """
7012 return _gdi_.PseudoDC_DrawEllipse(*args, **kwargs)
7013
7014 def DrawEllipseRect(*args, **kwargs):
7015 """
7016 DrawEllipseRect(self, Rect rect)
7017
7018 Draws an ellipse contained in the specified rectangle. The current pen
7019 is used for the outline and the current brush for filling the shape.
7020 """
7021 return _gdi_.PseudoDC_DrawEllipseRect(*args, **kwargs)
7022
7023 def DrawEllipsePointSize(*args, **kwargs):
7024 """
7025 DrawEllipsePointSize(self, Point pt, Size sz)
7026
7027 Draws an ellipse contained in the specified rectangle. The current pen
7028 is used for the outline and the current brush for filling the shape.
7029 """
7030 return _gdi_.PseudoDC_DrawEllipsePointSize(*args, **kwargs)
7031
7032 def DrawIcon(*args, **kwargs):
7033 """
7034 DrawIcon(self, Icon icon, int x, int y)
7035
7036 Draw an icon on the display (does nothing if the device context is
7037 PostScript). This can be the simplest way of drawing bitmaps on a
7038 window.
7039 """
7040 return _gdi_.PseudoDC_DrawIcon(*args, **kwargs)
7041
7042 def DrawIconPoint(*args, **kwargs):
7043 """
7044 DrawIconPoint(self, Icon icon, Point pt)
7045
7046 Draw an icon on the display (does nothing if the device context is
7047 PostScript). This can be the simplest way of drawing bitmaps on a
7048 window.
7049 """
7050 return _gdi_.PseudoDC_DrawIconPoint(*args, **kwargs)
7051
7052 def DrawBitmap(*args, **kwargs):
7053 """
7054 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
7055
7056 Draw a bitmap on the device context at the specified point. If
7057 *transparent* is true and the bitmap has a transparency mask, (or
7058 alpha channel on the platforms that support it) then the bitmap will
7059 be drawn transparently.
7060 """
7061 return _gdi_.PseudoDC_DrawBitmap(*args, **kwargs)
7062
7063 def DrawBitmapPoint(*args, **kwargs):
7064 """
7065 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
7066
7067 Draw a bitmap on the device context at the specified point. If
7068 *transparent* is true and the bitmap has a transparency mask, (or
7069 alpha channel on the platforms that support it) then the bitmap will
7070 be drawn transparently.
7071 """
7072 return _gdi_.PseudoDC_DrawBitmapPoint(*args, **kwargs)
7073
7074 def DrawText(*args, **kwargs):
7075 """
7076 DrawText(self, String text, int x, int y)
7077
7078 Draws a text string at the specified point, using the current text
7079 font, and the current text foreground and background colours.
7080
7081 The coordinates refer to the top-left corner of the rectangle bounding
1d5ee749
RD
7082 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
7083 a text string, which can be used to position the text more precisely,
7084 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
7085 not implement it.)
27e45892
RD
7086
7087 **NOTE**: under wxGTK the current logical function is used by this
7088 function but it is ignored by wxMSW. Thus, you should avoid using
7089 logical functions with this function in portable programs.
7090 """
7091 return _gdi_.PseudoDC_DrawText(*args, **kwargs)
7092
7093 def DrawTextPoint(*args, **kwargs):
7094 """
7095 DrawTextPoint(self, String text, Point pt)
7096
7097 Draws a text string at the specified point, using the current text
7098 font, and the current text foreground and background colours.
7099
7100 The coordinates refer to the top-left corner of the rectangle bounding
1d5ee749
RD
7101 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
7102 a text string, which can be used to position the text more precisely,
7103 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
7104 not implement it.)
27e45892
RD
7105
7106 **NOTE**: under wxGTK the current logical function is used by this
7107 function but it is ignored by wxMSW. Thus, you should avoid using
7108 logical functions with this function in portable programs.
7109 """
7110 return _gdi_.PseudoDC_DrawTextPoint(*args, **kwargs)
7111
7112 def DrawRotatedText(*args, **kwargs):
7113 """
7114 DrawRotatedText(self, String text, int x, int y, double angle)
7115
7116 Draws the text rotated by *angle* degrees, if supported by the platform.
7117
7118 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
7119 function. In particular, a font different from ``wx.NORMAL_FONT``
7120 should be used as the it is not normally a TrueType
7121 font. ``wx.SWISS_FONT`` is an example of a font which is.
7122 """
7123 return _gdi_.PseudoDC_DrawRotatedText(*args, **kwargs)
7124
7125 def DrawRotatedTextPoint(*args, **kwargs):
7126 """
7127 DrawRotatedTextPoint(self, String text, Point pt, double angle)
7128
7129 Draws the text rotated by *angle* degrees, if supported by the platform.
7130
7131 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
7132 function. In particular, a font different from ``wx.NORMAL_FONT``
7133 should be used as the it is not normally a TrueType
7134 font. ``wx.SWISS_FONT`` is an example of a font which is.
7135 """
7136 return _gdi_.PseudoDC_DrawRotatedTextPoint(*args, **kwargs)
7137
7138 def DrawLines(*args, **kwargs):
7139 """
7140 DrawLines(self, List points, int xoffset=0, int yoffset=0)
7141
7142 Draws lines using a sequence of `wx.Point` objects, adding the
7143 optional offset coordinate. The current pen is used for drawing the
7144 lines.
7145 """
7146 return _gdi_.PseudoDC_DrawLines(*args, **kwargs)
7147
7148 def DrawPolygon(*args, **kwargs):
7149 """
7150 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
7151 int fillStyle=ODDEVEN_RULE)
7152
7153 Draws a filled polygon using a sequence of `wx.Point` objects, adding
7154 the optional offset coordinate. The last argument specifies the fill
7155 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
7156
7157 The current pen is used for drawing the outline, and the current brush
7158 for filling the shape. Using a transparent brush suppresses
7159 filling. Note that wxWidgets automatically closes the first and last
7160 points.
7161 """
7162 return _gdi_.PseudoDC_DrawPolygon(*args, **kwargs)
7163
7164 def DrawLabel(*args, **kwargs):
7165 """
7166 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
7167 int indexAccel=-1)
7168
7169 Draw *text* within the specified rectangle, abiding by the alignment
7170 flags. Will additionally emphasize the character at *indexAccel* if
7171 it is not -1.
7172 """
7173 return _gdi_.PseudoDC_DrawLabel(*args, **kwargs)
7174
7175 def DrawImageLabel(*args, **kwargs):
7176 """
7177 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
7178 int indexAccel=-1)
7179
7180 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
7181 drawing it) within the specified rectangle, abiding by the alignment
7182 flags. Will additionally emphasize the character at *indexAccel* if
7183 it is not -1.
7184 """
7185 return _gdi_.PseudoDC_DrawImageLabel(*args, **kwargs)
7186
7187 def DrawSpline(*args, **kwargs):
7188 """
7189 DrawSpline(self, List points)
7190
7191 Draws a spline between all given control points, (a list of `wx.Point`
7192 objects) using the current pen. The spline is drawn using a series of
7193 lines, using an algorithm taken from the X drawing program 'XFIG'.
7194 """
7195 return _gdi_.PseudoDC_DrawSpline(*args, **kwargs)
7196
7197 def Clear(*args, **kwargs):
7198 """
7199 Clear(self)
7200
7201 Clears the device context using the current background brush.
7202 """
7203 return _gdi_.PseudoDC_Clear(*args, **kwargs)
7204
7205 def SetFont(*args, **kwargs):
7206 """
7207 SetFont(self, Font font)
7208
7209 Sets the current font for the DC. It must be a valid font, in
7210 particular you should not pass ``wx.NullFont`` to this method.
7211 """
7212 return _gdi_.PseudoDC_SetFont(*args, **kwargs)
7213
7214 def SetPen(*args, **kwargs):
7215 """
7216 SetPen(self, Pen pen)
7217
7218 Sets the current pen for the DC.
7219
7220 If the argument is ``wx.NullPen``, the current pen is selected out of the
7221 device context, and the original pen restored.
7222 """
7223 return _gdi_.PseudoDC_SetPen(*args, **kwargs)
7224
7225 def SetBrush(*args, **kwargs):
7226 """
7227 SetBrush(self, Brush brush)
7228
7229 Sets the current brush for the DC.
7230
7231 If the argument is ``wx.NullBrush``, the current brush is selected out
7232 of the device context, and the original brush restored, allowing the
7233 current brush to be destroyed safely.
7234 """
7235 return _gdi_.PseudoDC_SetBrush(*args, **kwargs)
7236
7237 def SetBackground(*args, **kwargs):
7238 """
7239 SetBackground(self, Brush brush)
7240
7241 Sets the current background brush for the DC.
7242 """
7243 return _gdi_.PseudoDC_SetBackground(*args, **kwargs)
7244
7245 def SetBackgroundMode(*args, **kwargs):
7246 """
7247 SetBackgroundMode(self, int mode)
7248
7249 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
7250 determines whether text will be drawn with a background colour or
7251 not.
7252 """
7253 return _gdi_.PseudoDC_SetBackgroundMode(*args, **kwargs)
7254
7255 def SetPalette(*args, **kwargs):
7256 """
7257 SetPalette(self, Palette palette)
7258
7259 If this is a window DC or memory DC, assigns the given palette to the
7260 window or bitmap associated with the DC. If the argument is
7261 ``wx.NullPalette``, the current palette is selected out of the device
7262 context, and the original palette restored.
7263 """
7264 return _gdi_.PseudoDC_SetPalette(*args, **kwargs)
7265
7266 def SetTextForeground(*args, **kwargs):
7267 """
7268 SetTextForeground(self, Colour colour)
7269
7270 Sets the current text foreground colour for the DC.
7271 """
7272 return _gdi_.PseudoDC_SetTextForeground(*args, **kwargs)
7273
7274 def SetTextBackground(*args, **kwargs):
7275 """
7276 SetTextBackground(self, Colour colour)
7277
7278 Sets the current text background colour for the DC.
7279 """
7280 return _gdi_.PseudoDC_SetTextBackground(*args, **kwargs)
7281
7282 def SetLogicalFunction(*args, **kwargs):
7283 """
7284 SetLogicalFunction(self, int function)
7285
7286 Sets the current logical function for the device context. This
1d5ee749
RD
7287 determines how a source pixel (from a pen or brush colour, combines
7288 with a destination pixel in the current device context.
27e45892
RD
7289
7290 The possible values and their meaning in terms of source and
7291 destination pixel values are as follows:
7292
7293 ================ ==========================
7294 wx.AND src AND dst
7295 wx.AND_INVERT (NOT src) AND dst
7296 wx.AND_REVERSE src AND (NOT dst)
7297 wx.CLEAR 0
7298 wx.COPY src
7299 wx.EQUIV (NOT src) XOR dst
7300 wx.INVERT NOT dst
7301 wx.NAND (NOT src) OR (NOT dst)
7302 wx.NOR (NOT src) AND (NOT dst)
7303 wx.NO_OP dst
7304 wx.OR src OR dst
7305 wx.OR_INVERT (NOT src) OR dst
7306 wx.OR_REVERSE src OR (NOT dst)
7307 wx.SET 1
7308 wx.SRC_INVERT NOT src
7309 wx.XOR src XOR dst
7310 ================ ==========================
7311
7312 The default is wx.COPY, which simply draws with the current
7313 colour. The others combine the current colour and the background using
7314 a logical operation. wx.INVERT is commonly used for drawing rubber
7315 bands or moving outlines, since drawing twice reverts to the original
7316 colour.
7317
7318 """
7319 return _gdi_.PseudoDC_SetLogicalFunction(*args, **kwargs)
7320
33d6fd3b
RD
7321 IdBounds = property(GetIdBounds,SetIdBounds,doc="See `GetIdBounds` and `SetIdBounds`")
7322 Len = property(GetLen,doc="See `GetLen`")
27e45892
RD
7323_gdi_.PseudoDC_swigregister(PseudoDC)
7324
70551f47 7325
32fe5131 7326