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