1
# This file was created automatically by SWIG 1.3.29.
2
# Don't modify this file, modify the SWIG interface instead.
6
new_instancemethod = new.instancemethod
7
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
8
if (name == "thisown"): return self.this.own(value)
10
if type(value).__name__ == 'PySwigObject':
11
self.__dict__[name] = value
13
method = class_type.__swig_setmethods__.get(name,None)
14
if method: return method(self,value)
15
if (not static) or hasattr(self,name):
16
self.__dict__[name] = value
18
raise AttributeError("You cannot add attributes to %s" % self)
20
def _swig_setattr(self,class_type,name,value):
21
return _swig_setattr_nondynamic(self,class_type,name,value,0)
23
def _swig_getattr(self,class_type,name):
24
if (name == "thisown"): return self.this.own()
25
method = class_type.__swig_getmethods__.get(name,None)
26
if method: return method(self)
27
raise AttributeError,name
30
try: strthis = "proxy of " + self.this.__repr__()
32
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
36
_object = types.ObjectType
38
except AttributeError:
44
def _swig_setattr_nondynamic_method(set):
45
def set_attr(self,name,value):
46
if (name == "thisown"): return self.this.own(value)
47
if hasattr(self,name) or (name == "this"):
50
raise AttributeError("You cannot add attributes to %s" % self)
56
#---------------------------------------------------------------------------
58
class GDIObject(_core.Object):
59
"""Proxy of C++ GDIObject class"""
60
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
61
def __init__(self): raise AttributeError, "No constructor defined"
63
__swig_destroy__ = _gdi_.delete_GDIObject
64
__del__ = lambda self : None;
65
def IsNull(*args, **kwargs):
66
"""IsNull(self) -> bool"""
67
return _gdi_.GDIObject_IsNull(*args, **kwargs)
69
def IsOk(*args, **kwargs):
70
"""IsOk(self) -> bool"""
71
return _gdi_.GDIObject_IsOk(*args, **kwargs)
74
_gdi_.GDIObject_swigregister(GDIObject)
76
#---------------------------------------------------------------------------
78
C2S_NAME = _gdi_.C2S_NAME
79
C2S_CSS_SYNTAX = _gdi_.C2S_CSS_SYNTAX
80
C2S_HTML_SYNTAX = _gdi_.C2S_HTML_SYNTAX
81
ALPHA_TRANSPARENT = _gdi_.ALPHA_TRANSPARENT
82
ALPHA_OPAQUE = _gdi_.ALPHA_OPAQUE
83
class Colour(_core.Object):
85
A colour is an object representing a combination of Red, Green, and
86
Blue (RGB) intensity values, and is used to determine drawing colours,
87
window colours, etc. Valid RGB values are in the range 0 to 255.
89
In wxPython there are typemaps that will automatically convert from a
90
colour name, from a '#RRGGBB' colour hex value string, or from a 3 or 4
91
integer tuple to a wx.Colour object when calling C++ methods that
92
expect a wxColour. This means that the following are all
95
win.SetBackgroundColour(wxColour(0,0,255))
96
win.SetBackgroundColour('BLUE')
97
win.SetBackgroundColour('#0000FF')
98
win.SetBackgroundColour((0,0,255))
100
In addition to the RGB values, the alpha transparency can optionally
101
be set. This is supported by the typemaps as well as the wx.Colour
102
constructors and setters. (The alpha value is ignored in many places
103
that take a wx.Colour object, but it is honored in things like wx.GCDC
104
or wx.GraphicsContext.) Adding an alpha value of 0xC0 (192) to the
105
above samples looks like this:
107
win.SetBackgroundColour(wxColour(0,0,255,192))
108
win.SetBackgroundColour('BLUE:C0')
109
win.SetBackgroundColour('#0000FFC0')
110
win.SetBackgroundColour((0,0,255,192))
112
Additional colour names and their coresponding values can be added
113
using `wx.ColourDatabase`. Also see `wx.lib.colourdb` for a large set
114
of colour names and values. Various system colours (as set in the
115
user's system preferences or control panel) can be retrieved with
116
`wx.SystemSettings.GetColour`.
119
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
120
__repr__ = _swig_repr
121
def __init__(self, *args, **kwargs):
123
__init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
125
Constructs a colour from red, green, blue and alpha values.
127
:see: Alternate constructors `wx.NamedColour`, `wx.ColourRGB` and `MacThemeColour`.
130
_gdi_.Colour_swiginit(self,_gdi_.new_Colour(*args, **kwargs))
131
__swig_destroy__ = _gdi_.delete_Colour
132
__del__ = lambda self : None;
133
def Red(*args, **kwargs):
137
Returns the red intensity.
139
return _gdi_.Colour_Red(*args, **kwargs)
141
def Green(*args, **kwargs):
145
Returns the green intensity.
147
return _gdi_.Colour_Green(*args, **kwargs)
149
def Blue(*args, **kwargs):
153
Returns the blue intensity.
155
return _gdi_.Colour_Blue(*args, **kwargs)
157
def Alpha(*args, **kwargs):
161
Returns the Alpha value.
163
return _gdi_.Colour_Alpha(*args, **kwargs)
165
def IsOk(*args, **kwargs):
169
Returns True if the colour object is valid (the colour has been
170
initialised with RGB values).
172
return _gdi_.Colour_IsOk(*args, **kwargs)
175
def Set(*args, **kwargs):
177
Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
179
Sets the RGB intensity values.
181
return _gdi_.Colour_Set(*args, **kwargs)
183
def SetFromString(self, colourName):
185
Sets the RGB intensity values using a colour name listed in
186
``wx.TheColourDatabase``, or any string format supported by
187
the wxColour typemaps.
189
c = wx.NamedColour(colourName)
190
self.Set(c.red, c.green, c.blue, c.alpha)
191
SetFromName = SetFromString
193
def GetAsString(*args, **kwargs):
195
GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
197
Return the colour as a string. Acceptable flags are:
199
=================== ==================================
200
wx.C2S_NAME return colour name, when possible
201
wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
202
wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
203
=================== ==================================
205
return _gdi_.Colour_GetAsString(*args, **kwargs)
207
def SetRGB(*args, **kwargs):
209
SetRGB(self, unsigned int colRGB)
211
Sets the RGB colour values from a single 32 bit value.
213
The argument colRGB should be of the form 0x00BBGGRR and where 0xRR,
214
0xGG and 0xBB are the values of the red, green and blue components.
216
return _gdi_.Colour_SetRGB(*args, **kwargs)
218
def SetRGBA(*args, **kwargs):
220
SetRGBA(self, unsigned int colRGBA)
222
Sets the RGBA colour values from a single 32 bit value.
224
The argument colRGBA should be of the form 0xAABBGGRR where 0xRR,
225
0xGG, 0xBB and 0xAA are the values of the red, green, blue and alpha
228
return _gdi_.Colour_SetRGBA(*args, **kwargs)
230
def GetRGBA(*args, **kwargs):
231
"""GetRGBA(self) -> unsigned int"""
232
return _gdi_.Colour_GetRGBA(*args, **kwargs)
234
def GetPixel(*args, **kwargs):
236
GetPixel(self) -> long
238
Returns a pixel value which is platform-dependent. On Windows, a
239
COLORREF is returned. On X, an allocated pixel value is returned. -1
240
is returned if the pixel is invalid (on X, unallocated).
242
return _gdi_.Colour_GetPixel(*args, **kwargs)
244
def __eq__(*args, **kwargs):
246
__eq__(self, PyObject other) -> bool
248
Compare colours for equality.
250
return _gdi_.Colour___eq__(*args, **kwargs)
252
def __ne__(*args, **kwargs):
254
__ne__(self, PyObject other) -> bool
256
Compare colours for inequality.
258
return _gdi_.Colour___ne__(*args, **kwargs)
260
def Get(*args, **kwargs):
262
Get(self, bool includeAlpha=False) -> (r,g,b) or (r,g,b,a)
264
Returns the RGB intensity values as a tuple, optionally the alpha value as well.
266
return _gdi_.Colour_Get(*args, **kwargs)
270
GetRGB(self) -> unsigned int
271
GetRGB(self) -> unsigned long
273
Return the colour as a packed RGB value
275
return _gdi_.Colour_GetRGB(*args)
277
asTuple = wx.deprecated(Get, "asTuple is deprecated, use `Get` instead")
278
def __str__(self): return str(self.Get(True))
280
# help() can access the stock colors before they are created,
281
# so make sure there is a this attribute before calling any wrapper method.
283
if hasattr(self, 'this'):
284
return 'wx.Colour' + str(self.Get(True))
288
def __len__(self): return len(self.Get())
289
def __getitem__(self, index): return self.Get()[index]
290
def __nonzero__(self): return self.IsOk()
291
__safe_for_unpickling__ = True
292
def __reduce__(self): return (Colour, self.Get(True))
294
Pixel = property(GetPixel,doc="See `GetPixel`")
295
RGB = property(GetRGB,SetRGB,doc="See `GetRGB` and `SetRGB`")
297
green = property(Green)
298
blue = property(Blue)
299
alpha = property(Alpha)
300
_gdi_.Colour_swigregister(Colour)
302
def NamedColour(*args, **kwargs):
304
NamedColour(String colourName) -> Colour
306
Constructs a colour object using a colour name listed in
307
``wx.TheColourDatabase``, or any string format supported by the
310
val = _gdi_.new_NamedColour(*args, **kwargs)
313
def ColourRGB(*args, **kwargs):
315
ColourRGB(unsigned long colRGB) -> Colour
317
Constructs a colour from a packed RGB value.
319
val = _gdi_.new_ColourRGB(*args, **kwargs)
322
def MacThemeColour(*args, **kwargs):
324
MacThemeColour(int themeBrushID) -> Colour
326
Creates a color (or pattern) from a Mac theme brush ID. Raises a
327
NotImplemented exception on other platforms.
329
val = _gdi_.new_MacThemeColour(*args, **kwargs)
332
class Palette(GDIObject):
333
"""Proxy of C++ Palette class"""
334
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
335
__repr__ = _swig_repr
336
def __init__(self, *args, **kwargs):
337
"""__init__(self, wxArrayInt red, wxArrayInt green, wxArrayInt blue) -> Palette"""
338
_gdi_.Palette_swiginit(self,_gdi_.new_Palette(*args, **kwargs))
339
__swig_destroy__ = _gdi_.delete_Palette
340
__del__ = lambda self : None;
341
def GetPixel(*args, **kwargs):
342
"""GetPixel(self, byte red, byte green, byte blue) -> int"""
343
return _gdi_.Palette_GetPixel(*args, **kwargs)
345
def GetRGB(*args, **kwargs):
346
"""GetRGB(self, int pixel) -> (success, R,G,B)"""
347
return _gdi_.Palette_GetRGB(*args, **kwargs)
349
def GetColoursCount(*args, **kwargs):
350
"""GetColoursCount(self) -> int"""
351
return _gdi_.Palette_GetColoursCount(*args, **kwargs)
353
def IsOk(*args, **kwargs):
354
"""IsOk(self) -> bool"""
355
return _gdi_.Palette_IsOk(*args, **kwargs)
358
def __nonzero__(self): return self.IsOk()
359
ColoursCount = property(GetColoursCount,doc="See `GetColoursCount`")
360
_gdi_.Palette_swigregister(Palette)
362
#---------------------------------------------------------------------------
364
PENSTYLE_INVALID = _gdi_.PENSTYLE_INVALID
365
PENSTYLE_SOLID = _gdi_.PENSTYLE_SOLID
366
PENSTYLE_DOT = _gdi_.PENSTYLE_DOT
367
PENSTYLE_LONG_DASH = _gdi_.PENSTYLE_LONG_DASH
368
PENSTYLE_SHORT_DASH = _gdi_.PENSTYLE_SHORT_DASH
369
PENSTYLE_DOT_DASH = _gdi_.PENSTYLE_DOT_DASH
370
PENSTYLE_USER_DASH = _gdi_.PENSTYLE_USER_DASH
371
PENSTYLE_TRANSPARENT = _gdi_.PENSTYLE_TRANSPARENT
372
PENSTYLE_STIPPLE_MASK_OPAQUE = _gdi_.PENSTYLE_STIPPLE_MASK_OPAQUE
373
PENSTYLE_STIPPLE_MASK = _gdi_.PENSTYLE_STIPPLE_MASK
374
PENSTYLE_STIPPLE = _gdi_.PENSTYLE_STIPPLE
375
PENSTYLE_BDIAGONAL_HATCH = _gdi_.PENSTYLE_BDIAGONAL_HATCH
376
PENSTYLE_CROSSDIAG_HATCH = _gdi_.PENSTYLE_CROSSDIAG_HATCH
377
PENSTYLE_FDIAGONAL_HATCH = _gdi_.PENSTYLE_FDIAGONAL_HATCH
378
PENSTYLE_CROSS_HATCH = _gdi_.PENSTYLE_CROSS_HATCH
379
PENSTYLE_HORIZONTAL_HATCH = _gdi_.PENSTYLE_HORIZONTAL_HATCH
380
PENSTYLE_VERTICAL_HATCH = _gdi_.PENSTYLE_VERTICAL_HATCH
381
PENSTYLE_FIRST_HATCH = _gdi_.PENSTYLE_FIRST_HATCH
382
PENSTYLE_LAST_HATCH = _gdi_.PENSTYLE_LAST_HATCH
383
JOIN_INVALID = _gdi_.JOIN_INVALID
384
JOIN_BEVEL = _gdi_.JOIN_BEVEL
385
JOIN_MITER = _gdi_.JOIN_MITER
386
JOIN_ROUND = _gdi_.JOIN_ROUND
387
CAP_INVALID = _gdi_.CAP_INVALID
388
CAP_ROUND = _gdi_.CAP_ROUND
389
CAP_PROJECTING = _gdi_.CAP_PROJECTING
390
CAP_BUTT = _gdi_.CAP_BUTT
391
class Pen(GDIObject):
392
"""Proxy of C++ Pen class"""
393
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
394
__repr__ = _swig_repr
395
def __init__(self, *args, **kwargs):
396
"""__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
397
_gdi_.Pen_swiginit(self,_gdi_.new_Pen(*args, **kwargs))
398
__swig_destroy__ = _gdi_.delete_Pen
399
__del__ = lambda self : None;
400
def GetCap(*args, **kwargs):
401
"""GetCap(self) -> int"""
402
return _gdi_.Pen_GetCap(*args, **kwargs)
404
def GetColour(*args, **kwargs):
405
"""GetColour(self) -> Colour"""
406
return _gdi_.Pen_GetColour(*args, **kwargs)
408
def GetJoin(*args, **kwargs):
409
"""GetJoin(self) -> int"""
410
return _gdi_.Pen_GetJoin(*args, **kwargs)
412
def GetStyle(*args, **kwargs):
413
"""GetStyle(self) -> int"""
414
return _gdi_.Pen_GetStyle(*args, **kwargs)
416
def GetWidth(*args, **kwargs):
417
"""GetWidth(self) -> int"""
418
return _gdi_.Pen_GetWidth(*args, **kwargs)
420
def IsOk(*args, **kwargs):
421
"""IsOk(self) -> bool"""
422
return _gdi_.Pen_IsOk(*args, **kwargs)
425
def SetCap(*args, **kwargs):
426
"""SetCap(self, int cap_style)"""
427
return _gdi_.Pen_SetCap(*args, **kwargs)
429
def SetColour(*args, **kwargs):
430
"""SetColour(self, Colour colour)"""
431
return _gdi_.Pen_SetColour(*args, **kwargs)
433
def SetJoin(*args, **kwargs):
434
"""SetJoin(self, int join_style)"""
435
return _gdi_.Pen_SetJoin(*args, **kwargs)
437
def SetStyle(*args, **kwargs):
438
"""SetStyle(self, int style)"""
439
return _gdi_.Pen_SetStyle(*args, **kwargs)
441
def SetWidth(*args, **kwargs):
442
"""SetWidth(self, int width)"""
443
return _gdi_.Pen_SetWidth(*args, **kwargs)
445
def SetDashes(*args, **kwargs):
446
"""SetDashes(self, int dashes)"""
447
return _gdi_.Pen_SetDashes(*args, **kwargs)
449
def GetDashes(*args, **kwargs):
450
"""GetDashes(self) -> PyObject"""
451
return _gdi_.Pen_GetDashes(*args, **kwargs)
453
def _SetDashes(*args, **kwargs):
454
"""_SetDashes(self, PyObject _self, PyObject pyDashes)"""
455
return _gdi_.Pen__SetDashes(*args, **kwargs)
457
def SetDashes(self, dashes):
459
Associate a list of dash lengths with the Pen.
461
self._SetDashes(self, dashes)
463
def IsTransparent(*args, **kwargs):
464
"""IsTransparent(self) -> bool"""
465
return _gdi_.Pen_IsTransparent(*args, **kwargs)
467
def IsNonTransparent(*args, **kwargs):
468
"""IsNonTransparent(self) -> bool"""
469
return _gdi_.Pen_IsNonTransparent(*args, **kwargs)
471
def __eq__(*args, **kwargs):
472
"""__eq__(self, Pen other) -> bool"""
473
return _gdi_.Pen___eq__(*args, **kwargs)
475
def __ne__(*args, **kwargs):
476
"""__ne__(self, Pen other) -> bool"""
477
return _gdi_.Pen___ne__(*args, **kwargs)
479
def __nonzero__(self): return self.IsOk()
480
Cap = property(GetCap,SetCap,doc="See `GetCap` and `SetCap`")
481
Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
482
Dashes = property(GetDashes,SetDashes,doc="See `GetDashes` and `SetDashes`")
483
Join = property(GetJoin,SetJoin,doc="See `GetJoin` and `SetJoin`")
484
Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
485
Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
486
_gdi_.Pen_swigregister(Pen)
488
#---------------------------------------------------------------------------
490
BRUSHSTYLE_INVALID = _gdi_.BRUSHSTYLE_INVALID
491
BRUSHSTYLE_SOLID = _gdi_.BRUSHSTYLE_SOLID
492
BRUSHSTYLE_TRANSPARENT = _gdi_.BRUSHSTYLE_TRANSPARENT
493
BRUSHSTYLE_STIPPLE_MASK_OPAQUE = _gdi_.BRUSHSTYLE_STIPPLE_MASK_OPAQUE
494
BRUSHSTYLE_STIPPLE_MASK = _gdi_.BRUSHSTYLE_STIPPLE_MASK
495
BRUSHSTYLE_STIPPLE = _gdi_.BRUSHSTYLE_STIPPLE
496
BRUSHSTYLE_BDIAGONAL_HATCH = _gdi_.BRUSHSTYLE_BDIAGONAL_HATCH
497
BRUSHSTYLE_CROSSDIAG_HATCH = _gdi_.BRUSHSTYLE_CROSSDIAG_HATCH
498
BRUSHSTYLE_FDIAGONAL_HATCH = _gdi_.BRUSHSTYLE_FDIAGONAL_HATCH
499
BRUSHSTYLE_CROSS_HATCH = _gdi_.BRUSHSTYLE_CROSS_HATCH
500
BRUSHSTYLE_HORIZONTAL_HATCH = _gdi_.BRUSHSTYLE_HORIZONTAL_HATCH
501
BRUSHSTYLE_VERTICAL_HATCH = _gdi_.BRUSHSTYLE_VERTICAL_HATCH
502
BRUSHSTYLE_FIRST_HATCH = _gdi_.BRUSHSTYLE_FIRST_HATCH
503
BRUSHSTYLE_LAST_HATCH = _gdi_.BRUSHSTYLE_LAST_HATCH
504
class Brush(GDIObject):
506
A brush is a drawing tool for filling in areas. It is used for
507
painting the background of rectangles, ellipses, etc. when drawing on
508
a `wx.DC`. It has a colour and a style.
510
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
511
__repr__ = _swig_repr
512
def __init__(self, *args, **kwargs):
514
__init__(self, Colour colour, int style=SOLID) -> Brush
516
Constructs a brush from a `wx.Colour` object and a style.
518
_gdi_.Brush_swiginit(self,_gdi_.new_Brush(*args, **kwargs))
519
__swig_destroy__ = _gdi_.delete_Brush
520
__del__ = lambda self : None;
521
def SetColour(*args, **kwargs):
523
SetColour(self, Colour col)
525
Set the brush's `wx.Colour`.
527
return _gdi_.Brush_SetColour(*args, **kwargs)
529
def SetStyle(*args, **kwargs):
531
SetStyle(self, int style)
533
Sets the style of the brush. See `__init__` for a listing of styles.
535
return _gdi_.Brush_SetStyle(*args, **kwargs)
537
def SetStipple(*args, **kwargs):
539
SetStipple(self, Bitmap stipple)
541
Sets the stipple `wx.Bitmap`.
543
return _gdi_.Brush_SetStipple(*args, **kwargs)
545
def GetColour(*args, **kwargs):
547
GetColour(self) -> Colour
549
Returns the `wx.Colour` of the brush.
551
return _gdi_.Brush_GetColour(*args, **kwargs)
553
def GetStyle(*args, **kwargs):
555
GetStyle(self) -> int
557
Returns the style of the brush. See `__init__` for a listing of
560
return _gdi_.Brush_GetStyle(*args, **kwargs)
562
def GetStipple(*args, **kwargs):
564
GetStipple(self) -> Bitmap
566
Returns the stiple `wx.Bitmap` of the brush. If the brush does not
567
have a wx.STIPPLE style, then the return value may be non-None but an
568
uninitialised bitmap (`wx.Bitmap.Ok` returns False).
570
return _gdi_.Brush_GetStipple(*args, **kwargs)
572
def IsHatch(*args, **kwargs):
574
IsHatch(self) -> bool
576
Is the current style a hatch type?
578
return _gdi_.Brush_IsHatch(*args, **kwargs)
580
def IsTransparent(*args, **kwargs):
581
"""IsTransparent(self) -> bool"""
582
return _gdi_.Brush_IsTransparent(*args, **kwargs)
584
def IsNonTransparent(*args, **kwargs):
585
"""IsNonTransparent(self) -> bool"""
586
return _gdi_.Brush_IsNonTransparent(*args, **kwargs)
588
def IsOk(*args, **kwargs):
592
Returns True if the brush is initialised and valid.
594
return _gdi_.Brush_IsOk(*args, **kwargs)
597
def MacSetTheme(self, macThemeBrush): self.SetColour(wx.Colour(macThemeBrush))
598
def __nonzero__(self): return self.IsOk()
599
Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
600
Stipple = property(GetStipple,SetStipple,doc="See `GetStipple` and `SetStipple`")
601
Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
602
_gdi_.Brush_swigregister(Brush)
604
def BrushFromBitmap(*args, **kwargs):
606
BrushFromBitmap(Bitmap stippleBitmap) -> Brush
608
Constructs a stippled brush using a bitmap.
610
val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
613
BitmapBufferFormat_RGB = _gdi_.BitmapBufferFormat_RGB
614
BitmapBufferFormat_RGBA = _gdi_.BitmapBufferFormat_RGBA
615
BitmapBufferFormat_RGB32 = _gdi_.BitmapBufferFormat_RGB32
616
BitmapBufferFormat_ARGB32 = _gdi_.BitmapBufferFormat_ARGB32
617
BITMAP_SCREEN_DEPTH = _gdi_.BITMAP_SCREEN_DEPTH
618
class Bitmap(GDIObject):
620
The wx.Bitmap class encapsulates the concept of a platform-dependent
621
bitmap. It can be either monochrome or colour, and either loaded from
622
a file or created dynamically. A bitmap can be selected into a memory
623
device context (instance of `wx.MemoryDC`). This enables the bitmap to
624
be copied to a window or memory device context using `wx.DC.Blit`, or
625
to be used as a drawing surface.
627
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
628
__repr__ = _swig_repr
629
def __init__(self, *args, **kwargs):
631
__init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
633
Loads a bitmap from a file.
635
_gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
636
__swig_destroy__ = _gdi_.delete_Bitmap
637
__del__ = lambda self : None;
638
def IsOk(*args, **kwargs):
639
"""IsOk(self) -> bool"""
640
return _gdi_.Bitmap_IsOk(*args, **kwargs)
643
def GetWidth(*args, **kwargs):
645
GetWidth(self) -> int
647
Gets the width of the bitmap in pixels.
649
return _gdi_.Bitmap_GetWidth(*args, **kwargs)
651
def GetHeight(*args, **kwargs):
653
GetHeight(self) -> int
655
Gets the height of the bitmap in pixels.
657
return _gdi_.Bitmap_GetHeight(*args, **kwargs)
659
def GetDepth(*args, **kwargs):
661
GetDepth(self) -> int
663
Gets the colour depth of the bitmap. A value of 1 indicates a
666
return _gdi_.Bitmap_GetDepth(*args, **kwargs)
668
def GetSize(*args, **kwargs):
670
GetSize(self) -> Size
672
Get the size of the bitmap.
674
return _gdi_.Bitmap_GetSize(*args, **kwargs)
676
def ConvertToImage(*args, **kwargs):
678
ConvertToImage(self) -> Image
680
Creates a platform-independent image from a platform-dependent
681
bitmap. This preserves mask information so that bitmaps and images can
682
be converted back and forth without loss in that respect.
684
return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
686
def GetMask(*args, **kwargs):
688
GetMask(self) -> Mask
690
Gets the associated mask (if any) which may have been loaded from a
691
file or explpicitly set for the bitmap.
693
:see: `SetMask`, `wx.Mask`
696
return _gdi_.Bitmap_GetMask(*args, **kwargs)
698
def SetMask(*args, **kwargs):
700
SetMask(self, Mask mask)
702
Sets the mask for this bitmap.
704
:see: `GetMask`, `wx.Mask`
707
return _gdi_.Bitmap_SetMask(*args, **kwargs)
709
def SetMaskColour(*args, **kwargs):
711
SetMaskColour(self, Colour colour)
713
Create a Mask based on a specified colour in the Bitmap.
715
return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
717
def GetSubBitmap(*args, **kwargs):
719
GetSubBitmap(self, Rect rect) -> Bitmap
721
Returns a sub-bitmap of the current one as long as the rect belongs
722
entirely to the bitmap. This function preserves bit depth and mask
725
return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
727
def ConvertToDisabled(*args, **kwargs):
728
"""ConvertToDisabled(self, byte brightness=255) -> Bitmap"""
729
return _gdi_.Bitmap_ConvertToDisabled(*args, **kwargs)
731
def SaveFile(*args, **kwargs):
733
SaveFile(self, String name, int type, Palette palette=None) -> bool
735
Saves a bitmap in the named file. See `__init__` for a description of
736
the ``type`` parameter.
738
return _gdi_.Bitmap_SaveFile(*args, **kwargs)
740
def LoadFile(*args, **kwargs):
742
LoadFile(self, String name, int type) -> bool
744
Loads a bitmap from a file. See `__init__` for a description of the
747
return _gdi_.Bitmap_LoadFile(*args, **kwargs)
749
def GetPalette(*args, **kwargs):
750
"""GetPalette(self) -> Palette"""
751
return _gdi_.Bitmap_GetPalette(*args, **kwargs)
753
def CopyFromIcon(*args, **kwargs):
754
"""CopyFromIcon(self, Icon icon) -> bool"""
755
return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
757
def SetHeight(*args, **kwargs):
759
SetHeight(self, int height)
761
Set the height property (does not affect the existing bitmap data).
763
return _gdi_.Bitmap_SetHeight(*args, **kwargs)
765
def SetWidth(*args, **kwargs):
767
SetWidth(self, int width)
769
Set the width property (does not affect the existing bitmap data).
771
return _gdi_.Bitmap_SetWidth(*args, **kwargs)
773
def SetDepth(*args, **kwargs):
775
SetDepth(self, int depth)
777
Set the depth property (does not affect the existing bitmap data).
779
return _gdi_.Bitmap_SetDepth(*args, **kwargs)
781
def SetSize(*args, **kwargs):
783
SetSize(self, Size size)
785
Set the bitmap size (does not affect the existing bitmap data).
787
return _gdi_.Bitmap_SetSize(*args, **kwargs)
789
def CopyFromBuffer(*args, **kwargs):
791
CopyFromBuffer(self, buffer data, int format=BitmapBufferFormat_RGB, int stride=-1)
793
Copy data from a buffer object to replace the bitmap pixel data.
794
Default format is plain RGB, but other formats are now supported as
795
well. The following symbols are used to specify the format of the
798
============================= ================================
799
wx.BitmapBufferFormat_RGB A simple sequence of RGB bytes
800
wx.BitmapBufferFormat_RGBA A simple sequence of RGBA bytes
801
wx.BitmapBufferFormat_ARGB32 A sequence of 32-bit values in native
802
endian order, with alpha in the upper
803
8 bits, followed by red, green, and
805
wx.BitmapBufferFormat_RGB32 Same as above but the alpha byte
807
============================= ================================
810
return _gdi_.Bitmap_CopyFromBuffer(*args, **kwargs)
812
def CopyFromBufferRGBA(self, buffer):
814
Copy data from a RGBA buffer object to replace the bitmap pixel
815
data. This method is now just a compatibility wrapper around
818
self.CopyFromBuffer(buffer, wx.BitmapBufferFormat_RGBA)
820
def CopyToBuffer(*args, **kwargs):
822
CopyToBuffer(self, buffer data, int format=BitmapBufferFormat_RGB, int stride=-1)
824
Copy pixel data to a buffer object. See `CopyFromBuffer` for buffer
827
return _gdi_.Bitmap_CopyToBuffer(*args, **kwargs)
829
def HasAlpha(*args, **kwargs):
830
"""HasAlpha(self) -> bool"""
831
return _gdi_.Bitmap_HasAlpha(*args, **kwargs)
833
def __nonzero__(self): return self.IsOk()
834
def __eq__(*args, **kwargs):
835
"""__eq__(self, Bitmap other) -> bool"""
836
return _gdi_.Bitmap___eq__(*args, **kwargs)
838
def __ne__(*args, **kwargs):
839
"""__ne__(self, Bitmap other) -> bool"""
840
return _gdi_.Bitmap___ne__(*args, **kwargs)
842
Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
843
Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
844
Mask = property(GetMask,SetMask,doc="See `GetMask` and `SetMask`")
845
Palette = property(GetPalette,doc="See `GetPalette`")
846
Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`")
847
Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
848
_gdi_.Bitmap_swigregister(Bitmap)
850
def EmptyBitmap(*args, **kwargs):
852
EmptyBitmap(int width, int height, int depth=BITMAP_SCREEN_DEPTH) -> Bitmap
854
Creates a new bitmap of the given size. A depth of -1 indicates the
855
depth of the current screen or visual. Some platforms only support 1
856
for monochrome and -1 for the current display depth.
858
val = _gdi_.new_EmptyBitmap(*args, **kwargs)
861
def BitmapFromIcon(*args, **kwargs):
863
BitmapFromIcon(Icon icon) -> Bitmap
865
Create a new bitmap from a `wx.Icon` object.
867
val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
870
def BitmapFromImage(*args, **kwargs):
872
BitmapFromImage(Image image, int depth=BITMAP_SCREEN_DEPTH) -> Bitmap
874
Creates bitmap object from a `wx.Image`. This has to be done to
875
actually display a `wx.Image` as you cannot draw an image directly on
876
a window. The resulting bitmap will use the provided colour depth (or
877
that of the current screen colour depth if depth is -1) which entails
878
that a colour reduction may have to take place.
880
val = _gdi_.new_BitmapFromImage(*args, **kwargs)
883
def BitmapFromXPMData(*args, **kwargs):
885
BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
887
Construct a Bitmap from a list of strings formatted as XPM data.
889
val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
892
def BitmapFromBits(*args, **kwargs):
894
BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
896
Creates a bitmap from an array of bits. You should only use this
897
function for monochrome bitmaps (depth 1) in portable programs: in
898
this case the bits parameter should contain an XBM image as a data
899
string. For other bit depths, the behaviour is platform dependent.
901
val = _gdi_.new_BitmapFromBits(*args, **kwargs)
905
def _BitmapFromBufferAlpha(*args, **kwargs):
906
"""_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
907
return _gdi_._BitmapFromBufferAlpha(*args, **kwargs)
909
def _BitmapFromBuffer(*args, **kwargs):
910
"""_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
911
return _gdi_._BitmapFromBuffer(*args, **kwargs)
912
def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
914
Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
915
parameter must be a Python object that implements the buffer
916
interface, such as a string, array, etc. The dataBuffer object is
917
expected to contain a series of RGB bytes and be width*height*3
918
bytes long. A buffer object can optionally be supplied for the
919
image's alpha channel data, and it is expected to be width*height
920
bytes long. On Windows and Mac the RGB values are 'premultiplied'
921
by the alpha values. (The other platforms do the multiplication
924
Unlike `wx.ImageFromBuffer` the bitmap created with this function
925
does not share the memory buffer with the buffer object. This is
926
because the native pixel buffer format varies on different
927
platforms, and so instead an efficient as possible copy of the
928
data is made from the buffer objects to the bitmap's native pixel
929
buffer. For direct access to a bitmap's pixel buffer see
930
`wx.NativePixelData` and `wx.AlphaPixelData`.
932
:see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
933
`wx.AlphaPixelData`, `wx.ImageFromBuffer`
935
if alphaBuffer is not None:
936
return _gdi_._BitmapFromBufferAlpha(width, height, dataBuffer, alphaBuffer)
938
return _gdi_._BitmapFromBuffer(width, height, dataBuffer)
941
def _BitmapFromBufferRGBA(*args, **kwargs):
942
"""_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
943
return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)
944
def BitmapFromBufferRGBA(width, height, dataBuffer):
946
Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
947
parameter must be a Python object that implements the buffer
948
interface, such as a string, array, etc. The dataBuffer object is
949
expected to contain a series of RGBA bytes (red, green, blue and
950
alpha) and be width*height*4 bytes long. On Windows and Mac the
951
RGB values are 'premultiplied' by the alpha values. (The other
952
platforms do the multiplication themselves.)
954
Unlike `wx.ImageFromBuffer` the bitmap created with this function
955
does not share the memory buffer with the buffer object. This is
956
because the native pixel buffer format varies on different
957
platforms, and so instead an efficient as possible copy of the
958
data is made from the buffer object to the bitmap's native pixel
959
buffer. For direct access to a bitmap's pixel buffer see
960
`wx.NativePixelData` and `wx.AlphaPixelData`.
962
:see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
963
`wx.AlphaPixelData`, `wx.ImageFromBuffer`
965
return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
968
def _EmptyBitmapRGBA(*args, **kwargs):
970
_EmptyBitmapRGBA(int width, int height, byte red, byte green, byte blue,
971
byte alpha) -> Bitmap
973
return _gdi_._EmptyBitmapRGBA(*args, **kwargs)
974
def EmptyBitmapRGBA(width, height, red=0, green=0, blue=0, alpha=0):
976
Returns a new empty 32-bit bitmap where every pixel has been
977
initialized with the given RGBA values.
979
return _gdi_._EmptyBitmapRGBA(width, height, red, green, blue, alpha)
981
class PixelDataBase(object):
982
"""Proxy of C++ PixelDataBase class"""
983
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
984
def __init__(self): raise AttributeError, "No constructor defined"
985
__repr__ = _swig_repr
986
def GetOrigin(*args, **kwargs):
987
"""GetOrigin(self) -> Point"""
988
return _gdi_.PixelDataBase_GetOrigin(*args, **kwargs)
990
def GetWidth(*args, **kwargs):
991
"""GetWidth(self) -> int"""
992
return _gdi_.PixelDataBase_GetWidth(*args, **kwargs)
994
def GetHeight(*args, **kwargs):
995
"""GetHeight(self) -> int"""
996
return _gdi_.PixelDataBase_GetHeight(*args, **kwargs)
998
def GetSize(*args, **kwargs):
999
"""GetSize(self) -> Size"""
1000
return _gdi_.PixelDataBase_GetSize(*args, **kwargs)
1002
def GetRowStride(*args, **kwargs):
1003
"""GetRowStride(self) -> int"""
1004
return _gdi_.PixelDataBase_GetRowStride(*args, **kwargs)
1006
Height = property(GetHeight,doc="See `GetHeight`")
1007
Origin = property(GetOrigin,doc="See `GetOrigin`")
1008
RowStride = property(GetRowStride,doc="See `GetRowStride`")
1009
Size = property(GetSize,doc="See `GetSize`")
1010
Width = property(GetWidth,doc="See `GetWidth`")
1011
_gdi_.PixelDataBase_swigregister(PixelDataBase)
1013
class NativePixelData(PixelDataBase):
1014
"""Proxy of C++ NativePixelData class"""
1015
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1016
__repr__ = _swig_repr
1017
def __init__(self, *args):
1019
__init__(self, Bitmap bmp) -> NativePixelData
1020
__init__(self, Bitmap bmp, Rect rect) -> NativePixelData
1021
__init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
1023
_gdi_.NativePixelData_swiginit(self,_gdi_.new_NativePixelData(*args))
1024
__swig_destroy__ = _gdi_.delete_NativePixelData
1025
__del__ = lambda self : None;
1026
def GetPixels(*args, **kwargs):
1027
"""GetPixels(self) -> NativePixelData_Accessor"""
1028
return _gdi_.NativePixelData_GetPixels(*args, **kwargs)
1030
def UseAlpha(self): pass
1031
UseAlpha = wx.deprecated(UseAlpha)
1033
def __nonzero__(*args, **kwargs):
1034
"""__nonzero__(self) -> bool"""
1035
return _gdi_.NativePixelData___nonzero__(*args, **kwargs)
1039
Create and return an iterator object for this pixel data
1040
object. (It's really a generator but I won't tell if you
1043
width = self.GetWidth()
1044
height = self.GetHeight()
1045
pixels = self.GetPixels()
1050
class PixelFacade(object):
1053
def Set(self, *args, **kw):
1054
return pixels.Set(*args, **kw)
1056
return str(self.Get())
1058
return 'pixel(%d,%d): %s' % (x,y,self.Get())
1059
X = property(lambda self: x)
1060
Y = property(lambda self: y)
1063
for y in xrange(height):
1064
pixels.MoveTo(self, 0, y)
1065
for x in xrange(width):
1072
Pixels = property(GetPixels,doc="See `GetPixels`")
1073
_gdi_.NativePixelData_swigregister(NativePixelData)
1075
class NativePixelData_Accessor(object):
1076
"""Proxy of C++ NativePixelData_Accessor class"""
1077
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1078
__repr__ = _swig_repr
1079
def __init__(self, *args):
1081
__init__(self, NativePixelData data) -> NativePixelData_Accessor
1082
__init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
1083
__init__(self) -> NativePixelData_Accessor
1085
_gdi_.NativePixelData_Accessor_swiginit(self,_gdi_.new_NativePixelData_Accessor(*args))
1086
__swig_destroy__ = _gdi_.delete_NativePixelData_Accessor
1087
__del__ = lambda self : None;
1088
def Reset(*args, **kwargs):
1089
"""Reset(self, NativePixelData data)"""
1090
return _gdi_.NativePixelData_Accessor_Reset(*args, **kwargs)
1092
def IsOk(*args, **kwargs):
1093
"""IsOk(self) -> bool"""
1094
return _gdi_.NativePixelData_Accessor_IsOk(*args, **kwargs)
1096
def nextPixel(*args, **kwargs):
1097
"""nextPixel(self)"""
1098
return _gdi_.NativePixelData_Accessor_nextPixel(*args, **kwargs)
1100
def Offset(*args, **kwargs):
1101
"""Offset(self, NativePixelData data, int x, int y)"""
1102
return _gdi_.NativePixelData_Accessor_Offset(*args, **kwargs)
1104
def OffsetX(*args, **kwargs):
1105
"""OffsetX(self, NativePixelData data, int x)"""
1106
return _gdi_.NativePixelData_Accessor_OffsetX(*args, **kwargs)
1108
def OffsetY(*args, **kwargs):
1109
"""OffsetY(self, NativePixelData data, int y)"""
1110
return _gdi_.NativePixelData_Accessor_OffsetY(*args, **kwargs)
1112
def MoveTo(*args, **kwargs):
1113
"""MoveTo(self, NativePixelData data, int x, int y)"""
1114
return _gdi_.NativePixelData_Accessor_MoveTo(*args, **kwargs)
1116
def Set(*args, **kwargs):
1117
"""Set(self, byte red, byte green, byte blue)"""
1118
return _gdi_.NativePixelData_Accessor_Set(*args, **kwargs)
1120
def Get(*args, **kwargs):
1121
"""Get(self) -> PyObject"""
1122
return _gdi_.NativePixelData_Accessor_Get(*args, **kwargs)
1124
_gdi_.NativePixelData_Accessor_swigregister(NativePixelData_Accessor)
1126
class AlphaPixelData(PixelDataBase):
1127
"""Proxy of C++ AlphaPixelData class"""
1128
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1129
__repr__ = _swig_repr
1130
def __init__(self, *args):
1132
__init__(self, Bitmap bmp) -> AlphaPixelData
1133
__init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
1134
__init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
1136
_gdi_.AlphaPixelData_swiginit(self,_gdi_.new_AlphaPixelData(*args))
1137
__swig_destroy__ = _gdi_.delete_AlphaPixelData
1138
__del__ = lambda self : None;
1139
def GetPixels(*args, **kwargs):
1140
"""GetPixels(self) -> AlphaPixelData_Accessor"""
1141
return _gdi_.AlphaPixelData_GetPixels(*args, **kwargs)
1143
def UseAlpha(self): pass
1144
UseAlpha = wx.deprecated(UseAlpha)
1146
def __nonzero__(*args, **kwargs):
1147
"""__nonzero__(self) -> bool"""
1148
return _gdi_.AlphaPixelData___nonzero__(*args, **kwargs)
1152
Create and return an iterator object for this pixel data
1153
object. (It's really a generator but I won't tell if you
1156
width = self.GetWidth()
1157
height = self.GetHeight()
1158
pixels = self.GetPixels()
1163
class PixelFacade(object):
1166
def Set(self, *args, **kw):
1167
return pixels.Set(*args, **kw)
1169
return str(self.Get())
1171
return 'pixel(%d,%d): %s' % (x,y,self.Get())
1172
X = property(lambda self: x)
1173
Y = property(lambda self: y)
1176
for y in xrange(height):
1177
pixels.MoveTo(self, 0, y)
1178
for x in xrange(width):
1185
Pixels = property(GetPixels,doc="See `GetPixels`")
1186
_gdi_.AlphaPixelData_swigregister(AlphaPixelData)
1188
class AlphaPixelData_Accessor(object):
1189
"""Proxy of C++ AlphaPixelData_Accessor class"""
1190
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1191
__repr__ = _swig_repr
1192
def __init__(self, *args):
1194
__init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1195
__init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1196
__init__(self) -> AlphaPixelData_Accessor
1198
_gdi_.AlphaPixelData_Accessor_swiginit(self,_gdi_.new_AlphaPixelData_Accessor(*args))
1199
__swig_destroy__ = _gdi_.delete_AlphaPixelData_Accessor
1200
__del__ = lambda self : None;
1201
def Reset(*args, **kwargs):
1202
"""Reset(self, AlphaPixelData data)"""
1203
return _gdi_.AlphaPixelData_Accessor_Reset(*args, **kwargs)
1205
def IsOk(*args, **kwargs):
1206
"""IsOk(self) -> bool"""
1207
return _gdi_.AlphaPixelData_Accessor_IsOk(*args, **kwargs)
1209
def nextPixel(*args, **kwargs):
1210
"""nextPixel(self)"""
1211
return _gdi_.AlphaPixelData_Accessor_nextPixel(*args, **kwargs)
1213
def Offset(*args, **kwargs):
1214
"""Offset(self, AlphaPixelData data, int x, int y)"""
1215
return _gdi_.AlphaPixelData_Accessor_Offset(*args, **kwargs)
1217
def OffsetX(*args, **kwargs):
1218
"""OffsetX(self, AlphaPixelData data, int x)"""
1219
return _gdi_.AlphaPixelData_Accessor_OffsetX(*args, **kwargs)
1221
def OffsetY(*args, **kwargs):
1222
"""OffsetY(self, AlphaPixelData data, int y)"""
1223
return _gdi_.AlphaPixelData_Accessor_OffsetY(*args, **kwargs)
1225
def MoveTo(*args, **kwargs):
1226
"""MoveTo(self, AlphaPixelData data, int x, int y)"""
1227
return _gdi_.AlphaPixelData_Accessor_MoveTo(*args, **kwargs)
1229
def Set(*args, **kwargs):
1230
"""Set(self, byte red, byte green, byte blue, byte alpha)"""
1231
return _gdi_.AlphaPixelData_Accessor_Set(*args, **kwargs)
1233
def Get(*args, **kwargs):
1234
"""Get(self) -> PyObject"""
1235
return _gdi_.AlphaPixelData_Accessor_Get(*args, **kwargs)
1237
_gdi_.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor)
1239
class Mask(_core.Object):
1241
This class encapsulates a monochrome mask bitmap, where the masked
1242
area is black and the unmasked area is white. When associated with a
1243
bitmap and drawn in a device context, the unmasked area of the bitmap
1244
will be drawn, and the masked area will not be drawn.
1246
A mask may be associated with a `wx.Bitmap`. It is used in
1247
`wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1248
`wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1251
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1252
__repr__ = _swig_repr
1253
def __init__(self, *args, **kwargs):
1255
__init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1257
Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1258
that indicates the transparent portions of the mask. In other words,
1259
the pixels in ``bitmap`` that match ``colour`` will be the transparent
1260
portions of the mask. If no ``colour`` or an invalid ``colour`` is
1261
passed then BLACK is used.
1263
:see: `wx.Bitmap`, `wx.Colour`
1265
_gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs))
1266
__swig_destroy__ = _gdi_.delete_Mask
1267
__del__ = lambda self : None;
1268
_gdi_.Mask_swigregister(Mask)
1270
MaskColour = wx.deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1271
class Icon(GDIObject):
1272
"""Proxy of C++ Icon class"""
1273
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1274
__repr__ = _swig_repr
1275
def __init__(self, *args, **kwargs):
1277
__init__(self, String name, int type=BITMAP_TYPE_ANY, int desiredWidth=-1,
1278
int desiredHeight=-1) -> Icon
1280
_gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
1281
__swig_destroy__ = _gdi_.delete_Icon
1282
__del__ = lambda self : None;
1283
def IsOk(*args, **kwargs):
1284
"""IsOk(self) -> bool"""
1285
return _gdi_.Icon_IsOk(*args, **kwargs)
1288
def GetWidth(*args, **kwargs):
1289
"""GetWidth(self) -> int"""
1290
return _gdi_.Icon_GetWidth(*args, **kwargs)
1292
def GetHeight(*args, **kwargs):
1293
"""GetHeight(self) -> int"""
1294
return _gdi_.Icon_GetHeight(*args, **kwargs)
1296
def GetDepth(*args, **kwargs):
1297
"""GetDepth(self) -> int"""
1298
return _gdi_.Icon_GetDepth(*args, **kwargs)
1300
def SetWidth(*args, **kwargs):
1301
"""SetWidth(self, int w)"""
1302
return _gdi_.Icon_SetWidth(*args, **kwargs)
1304
def SetHeight(*args, **kwargs):
1305
"""SetHeight(self, int h)"""
1306
return _gdi_.Icon_SetHeight(*args, **kwargs)
1308
def SetDepth(*args, **kwargs):
1309
"""SetDepth(self, int d)"""
1310
return _gdi_.Icon_SetDepth(*args, **kwargs)
1312
def CopyFromBitmap(*args, **kwargs):
1313
"""CopyFromBitmap(self, Bitmap bmp)"""
1314
return _gdi_.Icon_CopyFromBitmap(*args, **kwargs)
1316
def __nonzero__(self): return self.IsOk()
1317
Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
1318
Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
1319
Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
1320
_gdi_.Icon_swigregister(Icon)
1322
def EmptyIcon(*args, **kwargs):
1323
"""EmptyIcon() -> Icon"""
1324
val = _gdi_.new_EmptyIcon(*args, **kwargs)
1327
def IconFromLocation(*args, **kwargs):
1328
"""IconFromLocation(IconLocation loc) -> Icon"""
1329
val = _gdi_.new_IconFromLocation(*args, **kwargs)
1332
def IconFromBitmap(*args, **kwargs):
1333
"""IconFromBitmap(Bitmap bmp) -> Icon"""
1334
val = _gdi_.new_IconFromBitmap(*args, **kwargs)
1337
def IconFromXPMData(*args, **kwargs):
1338
"""IconFromXPMData(PyObject listOfStrings) -> Icon"""
1339
val = _gdi_.new_IconFromXPMData(*args, **kwargs)
1342
class IconLocation(object):
1343
"""Proxy of C++ IconLocation class"""
1344
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1345
__repr__ = _swig_repr
1346
def __init__(self, *args, **kwargs):
1347
"""__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1348
_gdi_.IconLocation_swiginit(self,_gdi_.new_IconLocation(*args, **kwargs))
1349
__swig_destroy__ = _gdi_.delete_IconLocation
1350
__del__ = lambda self : None;
1351
def IsOk(*args, **kwargs):
1352
"""IsOk(self) -> bool"""
1353
return _gdi_.IconLocation_IsOk(*args, **kwargs)
1355
def __nonzero__(self): return self.IsOk()
1356
def SetFileName(*args, **kwargs):
1357
"""SetFileName(self, String filename)"""
1358
return _gdi_.IconLocation_SetFileName(*args, **kwargs)
1360
def GetFileName(*args, **kwargs):
1361
"""GetFileName(self) -> String"""
1362
return _gdi_.IconLocation_GetFileName(*args, **kwargs)
1364
def SetIndex(*args, **kwargs):
1365
"""SetIndex(self, int num)"""
1366
return _gdi_.IconLocation_SetIndex(*args, **kwargs)
1368
def GetIndex(*args, **kwargs):
1369
"""GetIndex(self) -> int"""
1370
return _gdi_.IconLocation_GetIndex(*args, **kwargs)
1372
FileName = property(GetFileName,SetFileName,doc="See `GetFileName` and `SetFileName`")
1373
Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`")
1374
_gdi_.IconLocation_swigregister(IconLocation)
1376
class IconBundle(object):
1377
"""Proxy of C++ IconBundle class"""
1378
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1379
__repr__ = _swig_repr
1380
FALLBACK_NONE = _gdi_.IconBundle_FALLBACK_NONE
1381
FALLBACK_SYSTEM = _gdi_.IconBundle_FALLBACK_SYSTEM
1382
FALLBACK_NEAREST_LARGER = _gdi_.IconBundle_FALLBACK_NEAREST_LARGER
1383
def __init__(self, *args, **kwargs):
1384
"""__init__(self) -> IconBundle"""
1385
_gdi_.IconBundle_swiginit(self,_gdi_.new_IconBundle(*args, **kwargs))
1386
__swig_destroy__ = _gdi_.delete_IconBundle
1387
__del__ = lambda self : None;
1388
def IsOk(*args, **kwargs):
1389
"""IsOk(self) -> bool"""
1390
return _gdi_.IconBundle_IsOk(*args, **kwargs)
1392
def __nonzero__(self): return self.IsOk()
1393
def AddIcon(*args, **kwargs):
1395
AddIcon(self, Icon icon)
1397
Adds the icon to the collection, if the collection already contains an
1398
icon with the same width and height, it is replaced
1400
return _gdi_.IconBundle_AddIcon(*args, **kwargs)
1402
def AddIconFromFile(*args, **kwargs):
1404
AddIconFromFile(self, String file, int type=BITMAP_TYPE_ANY)
1406
Adds all the icons contained in the file to the collection, if the
1407
collection already contains icons with the same width and height, they
1410
return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs)
1412
def AddIconFromStream(*args, **kwargs):
1414
AddIconFromStream(self, InputStream stream, int type=BITMAP_TYPE_ANY)
1416
Just like `AddIconFromFile` but pulls icons from a file-liek object.
1418
return _gdi_.IconBundle_AddIconFromStream(*args, **kwargs)
1420
def GetIcon(*args, **kwargs):
1422
GetIcon(self, Size size, int flags=FALLBACK_SYSTEM) -> Icon
1424
Returns the icon with the given size; if no such icon exists, returns
1425
the icon with size wxSYS_ICON_[XY]; if no such icon exists, returns
1426
the first icon in the bundle
1428
return _gdi_.IconBundle_GetIcon(*args, **kwargs)
1430
def GetIconOfExactSize(*args, **kwargs):
1432
GetIconOfExactSize(self, Size size) -> Icon
1434
Returns the icon exactly of the specified size or wxNullIcon if no
1435
icon of exactly given size are available.
1437
return _gdi_.IconBundle_GetIconOfExactSize(*args, **kwargs)
1439
def GetIconCount(*args, **kwargs):
1441
GetIconCount(self) -> size_t
1443
return the number of available icons
1445
return _gdi_.IconBundle_GetIconCount(*args, **kwargs)
1447
def GetIconByIndex(*args, **kwargs):
1449
GetIconByIndex(self, size_t n) -> Icon
1451
Return the icon at index (must be < GetIconCount())
1453
return _gdi_.IconBundle_GetIconByIndex(*args, **kwargs)
1455
def IsEmpty(*args, **kwargs):
1457
IsEmpty(self) -> bool
1459
Check if we have any icons at all
1461
return _gdi_.IconBundle_IsEmpty(*args, **kwargs)
1463
_gdi_.IconBundle_swigregister(IconBundle)
1465
def IconBundleFromFile(*args, **kwargs):
1466
"""IconBundleFromFile(String file, int type=BITMAP_TYPE_ANY) -> IconBundle"""
1467
val = _gdi_.new_IconBundleFromFile(*args, **kwargs)
1470
def IconBundleFromIcon(*args, **kwargs):
1471
"""IconBundleFromIcon(Icon icon) -> IconBundle"""
1472
val = _gdi_.new_IconBundleFromIcon(*args, **kwargs)
1475
def IconBundleFromStream(*args, **kwargs):
1476
"""IconBundleFromStream(InputStream stream, int type=BITMAP_TYPE_ANY) -> IconBundle"""
1477
val = _gdi_.new_IconBundleFromStream(*args, **kwargs)
1480
class Cursor(GDIObject):
1482
A cursor is a small bitmap usually used for denoting where the mouse
1483
pointer is, with a picture that might indicate the interpretation of a
1486
A single cursor object may be used in many windows (any subwindow
1487
type). The wxWindows convention is to set the cursor for a window, as
1488
in X, rather than to set it globally as in MS Windows, although a
1489
global `wx.SetCursor` function is also available for use on MS Windows.
1492
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1493
__repr__ = _swig_repr
1494
def __init__(self, *args, **kwargs):
1496
__init__(self, String cursorName, int type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1498
Construct a Cursor from a file. Specify the type of file using
1499
wx.BITMAP_TYPE* constants, and specify the hotspot if not using a .cur
1502
_gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
1503
__swig_destroy__ = _gdi_.delete_Cursor
1504
__del__ = lambda self : None;
1505
def IsOk(*args, **kwargs):
1506
"""IsOk(self) -> bool"""
1507
return _gdi_.Cursor_IsOk(*args, **kwargs)
1510
def __nonzero__(self): return self.IsOk()
1511
_gdi_.Cursor_swigregister(Cursor)
1513
def StockCursor(*args, **kwargs):
1515
StockCursor(int id) -> Cursor
1517
Create a cursor using one of the stock cursors. Note that not all
1518
stock cursors are available on all platforms.
1520
val = _gdi_.new_StockCursor(*args, **kwargs)
1523
def CursorFromImage(*args, **kwargs):
1525
CursorFromImage(Image image) -> Cursor
1527
Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1528
for setting the transparent portions of the cursor.
1530
val = _gdi_.new_CursorFromImage(*args, **kwargs)
1533
#---------------------------------------------------------------------------
1535
OutRegion = _gdi_.OutRegion
1536
PartRegion = _gdi_.PartRegion
1537
InRegion = _gdi_.InRegion
1538
class Region(GDIObject):
1539
"""Proxy of C++ Region class"""
1540
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1541
__repr__ = _swig_repr
1542
def __init__(self, *args, **kwargs):
1543
"""__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1544
_gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs))
1545
__swig_destroy__ = _gdi_.delete_Region
1546
__del__ = lambda self : None;
1547
def Clear(*args, **kwargs):
1549
return _gdi_.Region_Clear(*args, **kwargs)
1551
def Offset(*args, **kwargs):
1552
"""Offset(self, int x, int y) -> bool"""
1553
return _gdi_.Region_Offset(*args, **kwargs)
1555
def Contains(*args, **kwargs):
1556
"""Contains(self, int x, int y) -> int"""
1557
return _gdi_.Region_Contains(*args, **kwargs)
1559
def ContainsPoint(*args, **kwargs):
1560
"""ContainsPoint(self, Point pt) -> int"""
1561
return _gdi_.Region_ContainsPoint(*args, **kwargs)
1563
def ContainsRect(*args, **kwargs):
1564
"""ContainsRect(self, Rect rect) -> int"""
1565
return _gdi_.Region_ContainsRect(*args, **kwargs)
1567
def ContainsRectDim(*args, **kwargs):
1568
"""ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1569
return _gdi_.Region_ContainsRectDim(*args, **kwargs)
1571
def GetBox(*args, **kwargs):
1572
"""GetBox(self) -> Rect"""
1573
return _gdi_.Region_GetBox(*args, **kwargs)
1575
def Intersect(*args, **kwargs):
1576
"""Intersect(self, int x, int y, int width, int height) -> bool"""
1577
return _gdi_.Region_Intersect(*args, **kwargs)
1579
def IntersectRect(*args, **kwargs):
1580
"""IntersectRect(self, Rect rect) -> bool"""
1581
return _gdi_.Region_IntersectRect(*args, **kwargs)
1583
def IntersectRegion(*args, **kwargs):
1584
"""IntersectRegion(self, Region region) -> bool"""
1585
return _gdi_.Region_IntersectRegion(*args, **kwargs)
1587
def IsEmpty(*args, **kwargs):
1588
"""IsEmpty(self) -> bool"""
1589
return _gdi_.Region_IsEmpty(*args, **kwargs)
1591
def IsEqual(*args, **kwargs):
1592
"""IsEqual(self, Region region) -> bool"""
1593
return _gdi_.Region_IsEqual(*args, **kwargs)
1595
def Union(*args, **kwargs):
1596
"""Union(self, int x, int y, int width, int height) -> bool"""
1597
return _gdi_.Region_Union(*args, **kwargs)
1599
def UnionRect(*args, **kwargs):
1600
"""UnionRect(self, Rect rect) -> bool"""
1601
return _gdi_.Region_UnionRect(*args, **kwargs)
1603
def UnionRegion(*args, **kwargs):
1604
"""UnionRegion(self, Region region) -> bool"""
1605
return _gdi_.Region_UnionRegion(*args, **kwargs)
1607
def Subtract(*args, **kwargs):
1608
"""Subtract(self, int x, int y, int width, int height) -> bool"""
1609
return _gdi_.Region_Subtract(*args, **kwargs)
1611
def SubtractRect(*args, **kwargs):
1612
"""SubtractRect(self, Rect rect) -> bool"""
1613
return _gdi_.Region_SubtractRect(*args, **kwargs)
1615
def SubtractRegion(*args, **kwargs):
1616
"""SubtractRegion(self, Region region) -> bool"""
1617
return _gdi_.Region_SubtractRegion(*args, **kwargs)
1619
def Xor(*args, **kwargs):
1620
"""Xor(self, int x, int y, int width, int height) -> bool"""
1621
return _gdi_.Region_Xor(*args, **kwargs)
1623
def XorRect(*args, **kwargs):
1624
"""XorRect(self, Rect rect) -> bool"""
1625
return _gdi_.Region_XorRect(*args, **kwargs)
1627
def XorRegion(*args, **kwargs):
1628
"""XorRegion(self, Region region) -> bool"""
1629
return _gdi_.Region_XorRegion(*args, **kwargs)
1631
def ConvertToBitmap(*args, **kwargs):
1632
"""ConvertToBitmap(self) -> Bitmap"""
1633
return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
1635
def UnionBitmap(*args, **kwargs):
1636
"""UnionBitmap(self, Bitmap bmp) -> bool"""
1637
return _gdi_.Region_UnionBitmap(*args, **kwargs)
1639
def UnionBitmapColour(*args, **kwargs):
1640
"""UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1641
return _gdi_.Region_UnionBitmapColour(*args, **kwargs)
1643
Box = property(GetBox,doc="See `GetBox`")
1644
_gdi_.Region_swigregister(Region)
1646
def RegionFromBitmap(*args, **kwargs):
1647
"""RegionFromBitmap(Bitmap bmp) -> Region"""
1648
val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
1651
def RegionFromBitmapColour(*args, **kwargs):
1652
"""RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1653
val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs)
1656
def RegionFromPoints(*args, **kwargs):
1657
"""RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1658
val = _gdi_.new_RegionFromPoints(*args, **kwargs)
1661
class RegionIterator(_core.Object):
1662
"""Proxy of C++ RegionIterator class"""
1663
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1664
__repr__ = _swig_repr
1665
def __init__(self, *args, **kwargs):
1666
"""__init__(self, Region region) -> RegionIterator"""
1667
_gdi_.RegionIterator_swiginit(self,_gdi_.new_RegionIterator(*args, **kwargs))
1668
__swig_destroy__ = _gdi_.delete_RegionIterator
1669
__del__ = lambda self : None;
1670
def GetX(*args, **kwargs):
1671
"""GetX(self) -> int"""
1672
return _gdi_.RegionIterator_GetX(*args, **kwargs)
1674
def GetY(*args, **kwargs):
1675
"""GetY(self) -> int"""
1676
return _gdi_.RegionIterator_GetY(*args, **kwargs)
1678
def GetW(*args, **kwargs):
1679
"""GetW(self) -> int"""
1680
return _gdi_.RegionIterator_GetW(*args, **kwargs)
1682
def GetWidth(*args, **kwargs):
1683
"""GetWidth(self) -> int"""
1684
return _gdi_.RegionIterator_GetWidth(*args, **kwargs)
1686
def GetH(*args, **kwargs):
1687
"""GetH(self) -> int"""
1688
return _gdi_.RegionIterator_GetH(*args, **kwargs)
1690
def GetHeight(*args, **kwargs):
1691
"""GetHeight(self) -> int"""
1692
return _gdi_.RegionIterator_GetHeight(*args, **kwargs)
1694
def GetRect(*args, **kwargs):
1695
"""GetRect(self) -> Rect"""
1696
return _gdi_.RegionIterator_GetRect(*args, **kwargs)
1698
def HaveRects(*args, **kwargs):
1699
"""HaveRects(self) -> bool"""
1700
return _gdi_.RegionIterator_HaveRects(*args, **kwargs)
1702
def Reset(*args, **kwargs):
1704
return _gdi_.RegionIterator_Reset(*args, **kwargs)
1706
def Next(*args, **kwargs):
1708
return _gdi_.RegionIterator_Next(*args, **kwargs)
1710
def __nonzero__(*args, **kwargs):
1711
"""__nonzero__(self) -> bool"""
1712
return _gdi_.RegionIterator___nonzero__(*args, **kwargs)
1714
H = property(GetH,doc="See `GetH`")
1715
Height = property(GetHeight,doc="See `GetHeight`")
1716
Rect = property(GetRect,doc="See `GetRect`")
1717
W = property(GetW,doc="See `GetW`")
1718
Width = property(GetWidth,doc="See `GetWidth`")
1719
X = property(GetX,doc="See `GetX`")
1720
Y = property(GetY,doc="See `GetY`")
1721
_gdi_.RegionIterator_swigregister(RegionIterator)
1723
#---------------------------------------------------------------------------
1725
FONTFAMILY_DEFAULT = _gdi_.FONTFAMILY_DEFAULT
1726
FONTFAMILY_DECORATIVE = _gdi_.FONTFAMILY_DECORATIVE
1727
FONTFAMILY_ROMAN = _gdi_.FONTFAMILY_ROMAN
1728
FONTFAMILY_SCRIPT = _gdi_.FONTFAMILY_SCRIPT
1729
FONTFAMILY_SWISS = _gdi_.FONTFAMILY_SWISS
1730
FONTFAMILY_MODERN = _gdi_.FONTFAMILY_MODERN
1731
FONTFAMILY_TELETYPE = _gdi_.FONTFAMILY_TELETYPE
1732
FONTFAMILY_MAX = _gdi_.FONTFAMILY_MAX
1733
FONTFAMILY_UNKNOWN = _gdi_.FONTFAMILY_UNKNOWN
1734
FONTSTYLE_NORMAL = _gdi_.FONTSTYLE_NORMAL
1735
FONTSTYLE_ITALIC = _gdi_.FONTSTYLE_ITALIC
1736
FONTSTYLE_SLANT = _gdi_.FONTSTYLE_SLANT
1737
FONTSTYLE_MAX = _gdi_.FONTSTYLE_MAX
1738
FONTWEIGHT_NORMAL = _gdi_.FONTWEIGHT_NORMAL
1739
FONTWEIGHT_LIGHT = _gdi_.FONTWEIGHT_LIGHT
1740
FONTWEIGHT_BOLD = _gdi_.FONTWEIGHT_BOLD
1741
FONTWEIGHT_MAX = _gdi_.FONTWEIGHT_MAX
1742
FONTSIZE_XX_SMALL = _gdi_.FONTSIZE_XX_SMALL
1743
FONTSIZE_X_SMALL = _gdi_.FONTSIZE_X_SMALL
1744
FONTSIZE_SMALL = _gdi_.FONTSIZE_SMALL
1745
FONTSIZE_MEDIUM = _gdi_.FONTSIZE_MEDIUM
1746
FONTSIZE_LARGE = _gdi_.FONTSIZE_LARGE
1747
FONTSIZE_X_LARGE = _gdi_.FONTSIZE_X_LARGE
1748
FONTSIZE_XX_LARGE = _gdi_.FONTSIZE_XX_LARGE
1749
FONTFLAG_DEFAULT = _gdi_.FONTFLAG_DEFAULT
1750
FONTFLAG_ITALIC = _gdi_.FONTFLAG_ITALIC
1751
FONTFLAG_SLANT = _gdi_.FONTFLAG_SLANT
1752
FONTFLAG_LIGHT = _gdi_.FONTFLAG_LIGHT
1753
FONTFLAG_BOLD = _gdi_.FONTFLAG_BOLD
1754
FONTFLAG_ANTIALIASED = _gdi_.FONTFLAG_ANTIALIASED
1755
FONTFLAG_NOT_ANTIALIASED = _gdi_.FONTFLAG_NOT_ANTIALIASED
1756
FONTFLAG_UNDERLINED = _gdi_.FONTFLAG_UNDERLINED
1757
FONTFLAG_STRIKETHROUGH = _gdi_.FONTFLAG_STRIKETHROUGH
1758
FONTFLAG_MASK = _gdi_.FONTFLAG_MASK
1759
FONTENCODING_SYSTEM = _gdi_.FONTENCODING_SYSTEM
1760
FONTENCODING_DEFAULT = _gdi_.FONTENCODING_DEFAULT
1761
FONTENCODING_ISO8859_1 = _gdi_.FONTENCODING_ISO8859_1
1762
FONTENCODING_ISO8859_2 = _gdi_.FONTENCODING_ISO8859_2
1763
FONTENCODING_ISO8859_3 = _gdi_.FONTENCODING_ISO8859_3
1764
FONTENCODING_ISO8859_4 = _gdi_.FONTENCODING_ISO8859_4
1765
FONTENCODING_ISO8859_5 = _gdi_.FONTENCODING_ISO8859_5
1766
FONTENCODING_ISO8859_6 = _gdi_.FONTENCODING_ISO8859_6
1767
FONTENCODING_ISO8859_7 = _gdi_.FONTENCODING_ISO8859_7
1768
FONTENCODING_ISO8859_8 = _gdi_.FONTENCODING_ISO8859_8
1769
FONTENCODING_ISO8859_9 = _gdi_.FONTENCODING_ISO8859_9
1770
FONTENCODING_ISO8859_10 = _gdi_.FONTENCODING_ISO8859_10
1771
FONTENCODING_ISO8859_11 = _gdi_.FONTENCODING_ISO8859_11
1772
FONTENCODING_ISO8859_12 = _gdi_.FONTENCODING_ISO8859_12
1773
FONTENCODING_ISO8859_13 = _gdi_.FONTENCODING_ISO8859_13
1774
FONTENCODING_ISO8859_14 = _gdi_.FONTENCODING_ISO8859_14
1775
FONTENCODING_ISO8859_15 = _gdi_.FONTENCODING_ISO8859_15
1776
FONTENCODING_ISO8859_MAX = _gdi_.FONTENCODING_ISO8859_MAX
1777
FONTENCODING_KOI8 = _gdi_.FONTENCODING_KOI8
1778
FONTENCODING_KOI8_U = _gdi_.FONTENCODING_KOI8_U
1779
FONTENCODING_ALTERNATIVE = _gdi_.FONTENCODING_ALTERNATIVE
1780
FONTENCODING_BULGARIAN = _gdi_.FONTENCODING_BULGARIAN
1781
FONTENCODING_CP437 = _gdi_.FONTENCODING_CP437
1782
FONTENCODING_CP850 = _gdi_.FONTENCODING_CP850
1783
FONTENCODING_CP852 = _gdi_.FONTENCODING_CP852
1784
FONTENCODING_CP855 = _gdi_.FONTENCODING_CP855
1785
FONTENCODING_CP866 = _gdi_.FONTENCODING_CP866
1786
FONTENCODING_CP874 = _gdi_.FONTENCODING_CP874
1787
FONTENCODING_CP932 = _gdi_.FONTENCODING_CP932
1788
FONTENCODING_CP936 = _gdi_.FONTENCODING_CP936
1789
FONTENCODING_CP949 = _gdi_.FONTENCODING_CP949
1790
FONTENCODING_CP950 = _gdi_.FONTENCODING_CP950
1791
FONTENCODING_CP1250 = _gdi_.FONTENCODING_CP1250
1792
FONTENCODING_CP1251 = _gdi_.FONTENCODING_CP1251
1793
FONTENCODING_CP1252 = _gdi_.FONTENCODING_CP1252
1794
FONTENCODING_CP1253 = _gdi_.FONTENCODING_CP1253
1795
FONTENCODING_CP1254 = _gdi_.FONTENCODING_CP1254
1796
FONTENCODING_CP1255 = _gdi_.FONTENCODING_CP1255
1797
FONTENCODING_CP1256 = _gdi_.FONTENCODING_CP1256
1798
FONTENCODING_CP1257 = _gdi_.FONTENCODING_CP1257
1799
FONTENCODING_CP12_MAX = _gdi_.FONTENCODING_CP12_MAX
1800
FONTENCODING_UTF7 = _gdi_.FONTENCODING_UTF7
1801
FONTENCODING_UTF8 = _gdi_.FONTENCODING_UTF8
1802
FONTENCODING_EUC_JP = _gdi_.FONTENCODING_EUC_JP
1803
FONTENCODING_UTF16BE = _gdi_.FONTENCODING_UTF16BE
1804
FONTENCODING_UTF16LE = _gdi_.FONTENCODING_UTF16LE
1805
FONTENCODING_UTF32BE = _gdi_.FONTENCODING_UTF32BE
1806
FONTENCODING_UTF32LE = _gdi_.FONTENCODING_UTF32LE
1807
FONTENCODING_MACROMAN = _gdi_.FONTENCODING_MACROMAN
1808
FONTENCODING_MACJAPANESE = _gdi_.FONTENCODING_MACJAPANESE
1809
FONTENCODING_MACCHINESETRAD = _gdi_.FONTENCODING_MACCHINESETRAD
1810
FONTENCODING_MACKOREAN = _gdi_.FONTENCODING_MACKOREAN
1811
FONTENCODING_MACARABIC = _gdi_.FONTENCODING_MACARABIC
1812
FONTENCODING_MACHEBREW = _gdi_.FONTENCODING_MACHEBREW
1813
FONTENCODING_MACGREEK = _gdi_.FONTENCODING_MACGREEK
1814
FONTENCODING_MACCYRILLIC = _gdi_.FONTENCODING_MACCYRILLIC
1815
FONTENCODING_MACDEVANAGARI = _gdi_.FONTENCODING_MACDEVANAGARI
1816
FONTENCODING_MACGURMUKHI = _gdi_.FONTENCODING_MACGURMUKHI
1817
FONTENCODING_MACGUJARATI = _gdi_.FONTENCODING_MACGUJARATI
1818
FONTENCODING_MACORIYA = _gdi_.FONTENCODING_MACORIYA
1819
FONTENCODING_MACBENGALI = _gdi_.FONTENCODING_MACBENGALI
1820
FONTENCODING_MACTAMIL = _gdi_.FONTENCODING_MACTAMIL
1821
FONTENCODING_MACTELUGU = _gdi_.FONTENCODING_MACTELUGU
1822
FONTENCODING_MACKANNADA = _gdi_.FONTENCODING_MACKANNADA
1823
FONTENCODING_MACMALAJALAM = _gdi_.FONTENCODING_MACMALAJALAM
1824
FONTENCODING_MACSINHALESE = _gdi_.FONTENCODING_MACSINHALESE
1825
FONTENCODING_MACBURMESE = _gdi_.FONTENCODING_MACBURMESE
1826
FONTENCODING_MACKHMER = _gdi_.FONTENCODING_MACKHMER
1827
FONTENCODING_MACTHAI = _gdi_.FONTENCODING_MACTHAI
1828
FONTENCODING_MACLAOTIAN = _gdi_.FONTENCODING_MACLAOTIAN
1829
FONTENCODING_MACGEORGIAN = _gdi_.FONTENCODING_MACGEORGIAN
1830
FONTENCODING_MACARMENIAN = _gdi_.FONTENCODING_MACARMENIAN
1831
FONTENCODING_MACCHINESESIMP = _gdi_.FONTENCODING_MACCHINESESIMP
1832
FONTENCODING_MACTIBETAN = _gdi_.FONTENCODING_MACTIBETAN
1833
FONTENCODING_MACMONGOLIAN = _gdi_.FONTENCODING_MACMONGOLIAN
1834
FONTENCODING_MACETHIOPIC = _gdi_.FONTENCODING_MACETHIOPIC
1835
FONTENCODING_MACCENTRALEUR = _gdi_.FONTENCODING_MACCENTRALEUR
1836
FONTENCODING_MACVIATNAMESE = _gdi_.FONTENCODING_MACVIATNAMESE
1837
FONTENCODING_MACARABICEXT = _gdi_.FONTENCODING_MACARABICEXT
1838
FONTENCODING_MACSYMBOL = _gdi_.FONTENCODING_MACSYMBOL
1839
FONTENCODING_MACDINGBATS = _gdi_.FONTENCODING_MACDINGBATS
1840
FONTENCODING_MACTURKISH = _gdi_.FONTENCODING_MACTURKISH
1841
FONTENCODING_MACCROATIAN = _gdi_.FONTENCODING_MACCROATIAN
1842
FONTENCODING_MACICELANDIC = _gdi_.FONTENCODING_MACICELANDIC
1843
FONTENCODING_MACROMANIAN = _gdi_.FONTENCODING_MACROMANIAN
1844
FONTENCODING_MACCELTIC = _gdi_.FONTENCODING_MACCELTIC
1845
FONTENCODING_MACGAELIC = _gdi_.FONTENCODING_MACGAELIC
1846
FONTENCODING_MACKEYBOARD = _gdi_.FONTENCODING_MACKEYBOARD
1847
FONTENCODING_ISO2022_JP = _gdi_.FONTENCODING_ISO2022_JP
1848
FONTENCODING_MACMIN = _gdi_.FONTENCODING_MACMIN
1849
FONTENCODING_MACMAX = _gdi_.FONTENCODING_MACMAX
1850
FONTENCODING_MAX = _gdi_.FONTENCODING_MAX
1851
FONTENCODING_UTF16 = _gdi_.FONTENCODING_UTF16
1852
FONTENCODING_UTF32 = _gdi_.FONTENCODING_UTF32
1853
FONTENCODING_UNICODE = _gdi_.FONTENCODING_UNICODE
1854
FONTENCODING_GB2312 = _gdi_.FONTENCODING_GB2312
1855
FONTENCODING_BIG5 = _gdi_.FONTENCODING_BIG5
1856
FONTENCODING_SHIFT_JIS = _gdi_.FONTENCODING_SHIFT_JIS
1857
FONTENCODING_EUC_KR = _gdi_.FONTENCODING_EUC_KR
1858
#---------------------------------------------------------------------------
1860
class NativeFontInfo(object):
1861
"""Proxy of C++ NativeFontInfo class"""
1862
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1863
__repr__ = _swig_repr
1864
def __init__(self, *args, **kwargs):
1865
"""__init__(self) -> NativeFontInfo"""
1866
_gdi_.NativeFontInfo_swiginit(self,_gdi_.new_NativeFontInfo(*args, **kwargs))
1867
__swig_destroy__ = _gdi_.delete_NativeFontInfo
1868
__del__ = lambda self : None;
1869
def Init(*args, **kwargs):
1871
return _gdi_.NativeFontInfo_Init(*args, **kwargs)
1873
def InitFromFont(*args, **kwargs):
1874
"""InitFromFont(self, Font font)"""
1875
return _gdi_.NativeFontInfo_InitFromFont(*args, **kwargs)
1877
def GetPointSize(*args, **kwargs):
1878
"""GetPointSize(self) -> int"""
1879
return _gdi_.NativeFontInfo_GetPointSize(*args, **kwargs)
1881
def GetStyle(*args, **kwargs):
1882
"""GetStyle(self) -> int"""
1883
return _gdi_.NativeFontInfo_GetStyle(*args, **kwargs)
1885
def GetWeight(*args, **kwargs):
1886
"""GetWeight(self) -> int"""
1887
return _gdi_.NativeFontInfo_GetWeight(*args, **kwargs)
1889
def GetUnderlined(*args, **kwargs):
1890
"""GetUnderlined(self) -> bool"""
1891
return _gdi_.NativeFontInfo_GetUnderlined(*args, **kwargs)
1893
def GetStrikethrough(*args, **kwargs):
1894
"""GetStrikethrough(self) -> bool"""
1895
return _gdi_.NativeFontInfo_GetStrikethrough(*args, **kwargs)
1897
def GetFaceName(*args, **kwargs):
1898
"""GetFaceName(self) -> String"""
1899
return _gdi_.NativeFontInfo_GetFaceName(*args, **kwargs)
1901
def GetFamily(*args, **kwargs):
1902
"""GetFamily(self) -> int"""
1903
return _gdi_.NativeFontInfo_GetFamily(*args, **kwargs)
1905
def GetEncoding(*args, **kwargs):
1906
"""GetEncoding(self) -> int"""
1907
return _gdi_.NativeFontInfo_GetEncoding(*args, **kwargs)
1909
def SetPointSize(*args, **kwargs):
1910
"""SetPointSize(self, int pointsize)"""
1911
return _gdi_.NativeFontInfo_SetPointSize(*args, **kwargs)
1913
def SetStyle(*args, **kwargs):
1914
"""SetStyle(self, int style)"""
1915
return _gdi_.NativeFontInfo_SetStyle(*args, **kwargs)
1917
def SetWeight(*args, **kwargs):
1918
"""SetWeight(self, int weight)"""
1919
return _gdi_.NativeFontInfo_SetWeight(*args, **kwargs)
1921
def SetUnderlined(*args, **kwargs):
1922
"""SetUnderlined(self, bool underlined)"""
1923
return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs)
1925
def SetStrikethrough(*args, **kwargs):
1926
"""SetStrikethrough(self, bool strikethrough)"""
1927
return _gdi_.NativeFontInfo_SetStrikethrough(*args, **kwargs)
1929
def SetFaceName(*args, **kwargs):
1930
"""SetFaceName(self, String facename) -> bool"""
1931
return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs)
1933
def SetFamily(*args, **kwargs):
1934
"""SetFamily(self, int family)"""
1935
return _gdi_.NativeFontInfo_SetFamily(*args, **kwargs)
1937
def SetEncoding(*args, **kwargs):
1938
"""SetEncoding(self, int encoding)"""
1939
return _gdi_.NativeFontInfo_SetEncoding(*args, **kwargs)
1941
def FromString(*args, **kwargs):
1942
"""FromString(self, String s) -> bool"""
1943
return _gdi_.NativeFontInfo_FromString(*args, **kwargs)
1945
def ToString(*args, **kwargs):
1946
"""ToString(self) -> String"""
1947
return _gdi_.NativeFontInfo_ToString(*args, **kwargs)
1949
def __str__(*args, **kwargs):
1950
"""__str__(self) -> String"""
1951
return _gdi_.NativeFontInfo___str__(*args, **kwargs)
1953
def FromUserString(*args, **kwargs):
1954
"""FromUserString(self, String s) -> bool"""
1955
return _gdi_.NativeFontInfo_FromUserString(*args, **kwargs)
1957
def ToUserString(*args, **kwargs):
1958
"""ToUserString(self) -> String"""
1959
return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs)
1961
Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
1962
FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
1963
Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
1964
PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
1965
Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
1966
Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
1967
Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
1968
_gdi_.NativeFontInfo_swigregister(NativeFontInfo)
1970
class NativeEncodingInfo(object):
1971
"""Proxy of C++ NativeEncodingInfo class"""
1972
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1973
__repr__ = _swig_repr
1974
facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set)
1975
encoding = property(_gdi_.NativeEncodingInfo_encoding_get, _gdi_.NativeEncodingInfo_encoding_set)
1976
def __init__(self, *args, **kwargs):
1977
"""__init__(self) -> NativeEncodingInfo"""
1978
_gdi_.NativeEncodingInfo_swiginit(self,_gdi_.new_NativeEncodingInfo(*args, **kwargs))
1979
__swig_destroy__ = _gdi_.delete_NativeEncodingInfo
1980
__del__ = lambda self : None;
1981
def FromString(*args, **kwargs):
1982
"""FromString(self, String s) -> bool"""
1983
return _gdi_.NativeEncodingInfo_FromString(*args, **kwargs)
1985
def ToString(*args, **kwargs):
1986
"""ToString(self) -> String"""
1987
return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs)
1989
_gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfo)
1992
def GetNativeFontEncoding(*args, **kwargs):
1993
"""GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1994
return _gdi_.GetNativeFontEncoding(*args, **kwargs)
1996
def TestFontEncoding(*args, **kwargs):
1997
"""TestFontEncoding(NativeEncodingInfo info) -> bool"""
1998
return _gdi_.TestFontEncoding(*args, **kwargs)
1999
#---------------------------------------------------------------------------
2001
class FontMapper(object):
2002
"""Proxy of C++ FontMapper class"""
2003
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2004
__repr__ = _swig_repr
2005
def __init__(self, *args, **kwargs):
2006
"""__init__(self) -> FontMapper"""
2007
_gdi_.FontMapper_swiginit(self,_gdi_.new_FontMapper(*args, **kwargs))
2008
__swig_destroy__ = _gdi_.delete_FontMapper
2009
__del__ = lambda self : None;
2010
def Get(*args, **kwargs):
2011
"""Get() -> FontMapper"""
2012
return _gdi_.FontMapper_Get(*args, **kwargs)
2014
Get = staticmethod(Get)
2015
def Set(*args, **kwargs):
2016
"""Set(FontMapper mapper) -> FontMapper"""
2017
return _gdi_.FontMapper_Set(*args, **kwargs)
2019
Set = staticmethod(Set)
2020
def CharsetToEncoding(*args, **kwargs):
2021
"""CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
2022
return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs)
2024
def GetSupportedEncodingsCount(*args, **kwargs):
2025
"""GetSupportedEncodingsCount() -> size_t"""
2026
return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
2028
GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount)
2029
def GetEncoding(*args, **kwargs):
2030
"""GetEncoding(size_t n) -> int"""
2031
return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
2033
GetEncoding = staticmethod(GetEncoding)
2034
def GetEncodingName(*args, **kwargs):
2035
"""GetEncodingName(int encoding) -> String"""
2036
return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
2038
GetEncodingName = staticmethod(GetEncodingName)
2039
def GetEncodingDescription(*args, **kwargs):
2040
"""GetEncodingDescription(int encoding) -> String"""
2041
return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
2043
GetEncodingDescription = staticmethod(GetEncodingDescription)
2044
def GetEncodingFromName(*args, **kwargs):
2045
"""GetEncodingFromName(String name) -> int"""
2046
return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
2048
GetEncodingFromName = staticmethod(GetEncodingFromName)
2049
def SetConfigPath(*args, **kwargs):
2050
"""SetConfigPath(self, String prefix)"""
2051
return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
2053
def GetDefaultConfigPath(*args, **kwargs):
2054
"""GetDefaultConfigPath() -> String"""
2055
return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
2057
GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
2058
def GetAltForEncoding(*args, **kwargs):
2059
"""GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
2060
return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs)
2062
def IsEncodingAvailable(*args, **kwargs):
2063
"""IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
2064
return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs)
2066
def SetDialogParent(*args, **kwargs):
2067
"""SetDialogParent(self, Window parent)"""
2068
return _gdi_.FontMapper_SetDialogParent(*args, **kwargs)
2070
def SetDialogTitle(*args, **kwargs):
2071
"""SetDialogTitle(self, String title)"""
2072
return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs)
2074
_gdi_.FontMapper_swigregister(FontMapper)
2076
def FontMapper_Get(*args):
2077
"""FontMapper_Get() -> FontMapper"""
2078
return _gdi_.FontMapper_Get(*args)
2080
def FontMapper_Set(*args, **kwargs):
2081
"""FontMapper_Set(FontMapper mapper) -> FontMapper"""
2082
return _gdi_.FontMapper_Set(*args, **kwargs)
2084
def FontMapper_GetSupportedEncodingsCount(*args):
2085
"""FontMapper_GetSupportedEncodingsCount() -> size_t"""
2086
return _gdi_.FontMapper_GetSupportedEncodingsCount(*args)
2088
def FontMapper_GetEncoding(*args, **kwargs):
2089
"""FontMapper_GetEncoding(size_t n) -> int"""
2090
return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
2092
def FontMapper_GetEncodingName(*args, **kwargs):
2093
"""FontMapper_GetEncodingName(int encoding) -> String"""
2094
return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
2096
def FontMapper_GetEncodingDescription(*args, **kwargs):
2097
"""FontMapper_GetEncodingDescription(int encoding) -> String"""
2098
return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
2100
def FontMapper_GetEncodingFromName(*args, **kwargs):
2101
"""FontMapper_GetEncodingFromName(String name) -> int"""
2102
return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
2104
def FontMapper_GetDefaultConfigPath(*args):
2105
"""FontMapper_GetDefaultConfigPath() -> String"""
2106
return _gdi_.FontMapper_GetDefaultConfigPath(*args)
2108
#---------------------------------------------------------------------------
2110
class Font(GDIObject):
2112
A font is an object which determines the appearance of text. Fonts are
2113
used for drawing text to a device context, and setting the appearance
2116
You can retrieve the current system font settings with `wx.SystemSettings`.
2118
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2119
__repr__ = _swig_repr
2120
def __init__(self, *args, **kwargs):
2122
__init__(self, int pointSize, int family, int style, int weight, bool underline=False,
2123
String face=EmptyString,
2124
int encoding=FONTENCODING_DEFAULT) -> Font
2126
Creates a font object with the specified attributes.
2128
:param pointSize: The size of the font in points.
2130
:param family: Font family. A generic way of referring to fonts
2131
without specifying actual facename. It can be One of
2132
the ``wx.FONTFAMILY_xxx`` constants.
2134
:param style: One of the ``wx.FONTSTYLE_xxx`` constants.
2136
:param weight: Font weight, sometimes also referred to as font
2137
boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
2139
:param underline: The value can be ``True`` or ``False`` and
2140
indicates whether the font will include an underline. This
2141
may not be supported on all platforms.
2143
:param face: An optional string specifying the actual typeface to
2144
be used. If it is an empty string, a default typeface will be
2145
chosen based on the family.
2147
:param encoding: An encoding which may be one of the
2148
``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
2149
available, no font is created.
2151
:see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
2152
`wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
2155
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2156
_gdi_.Font_swiginit(self,_gdi_.new_Font(*args, **kwargs))
2157
__swig_destroy__ = _gdi_.delete_Font
2158
__del__ = lambda self : None;
2159
def IsOk(*args, **kwargs):
2163
Returns ``True`` if this font was successfully created.
2165
return _gdi_.Font_IsOk(*args, **kwargs)
2168
def __nonzero__(self): return self.IsOk()
2169
def __eq__(*args, **kwargs):
2170
"""__eq__(self, Font other) -> bool"""
2171
return _gdi_.Font___eq__(*args, **kwargs)
2173
def __ne__(*args, **kwargs):
2174
"""__ne__(self, Font other) -> bool"""
2175
return _gdi_.Font___ne__(*args, **kwargs)
2177
def GetPointSize(*args, **kwargs):
2179
GetPointSize(self) -> int
2181
Gets the point size.
2183
return _gdi_.Font_GetPointSize(*args, **kwargs)
2185
def GetPixelSize(*args, **kwargs):
2187
GetPixelSize(self) -> Size
2189
Returns the size in pixels if the font was constructed with a pixel
2192
return _gdi_.Font_GetPixelSize(*args, **kwargs)
2194
def IsUsingSizeInPixels(*args, **kwargs):
2196
IsUsingSizeInPixels(self) -> bool
2198
Returns ``True`` if the font is using a pixelSize.
2200
return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
2202
def GetFamily(*args, **kwargs):
2204
GetFamily(self) -> int
2206
Gets the font family.
2208
return _gdi_.Font_GetFamily(*args, **kwargs)
2210
def GetStyle(*args, **kwargs):
2212
GetStyle(self) -> int
2214
Gets the font style.
2216
return _gdi_.Font_GetStyle(*args, **kwargs)
2218
def GetWeight(*args, **kwargs):
2220
GetWeight(self) -> int
2222
Gets the font weight.
2224
return _gdi_.Font_GetWeight(*args, **kwargs)
2226
def GetUnderlined(*args, **kwargs):
2228
GetUnderlined(self) -> bool
2230
Returns ``True`` if the font is underlined, ``False`` otherwise.
2232
return _gdi_.Font_GetUnderlined(*args, **kwargs)
2234
def GetStrikethrough(*args, **kwargs):
2235
"""GetStrikethrough(self) -> bool"""
2236
return _gdi_.Font_GetStrikethrough(*args, **kwargs)
2238
def GetFaceName(*args, **kwargs):
2240
GetFaceName(self) -> String
2242
Returns the typeface name associated with the font, or the empty
2243
string if there is no typeface information.
2245
return _gdi_.Font_GetFaceName(*args, **kwargs)
2247
def GetEncoding(*args, **kwargs):
2249
GetEncoding(self) -> int
2251
Get the font's encoding.
2253
return _gdi_.Font_GetEncoding(*args, **kwargs)
2255
def GetNativeFontInfo(*args, **kwargs):
2257
GetNativeFontInfo(self) -> NativeFontInfo
2259
Constructs a `wx.NativeFontInfo` object from this font.
2261
return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
2263
def IsFixedWidth(*args, **kwargs):
2265
IsFixedWidth(self) -> bool
2267
Returns true if the font is a fixed width (or monospaced) font, false
2268
if it is a proportional one or font is invalid.
2270
return _gdi_.Font_IsFixedWidth(*args, **kwargs)
2272
def GetNativeFontInfoDesc(*args, **kwargs):
2274
GetNativeFontInfoDesc(self) -> String
2276
Returns the platform-dependent string completely describing this font
2277
or an empty string if the font isn't valid.
2279
return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
2281
def GetNativeFontInfoUserDesc(*args, **kwargs):
2283
GetNativeFontInfoUserDesc(self) -> String
2285
Returns a human readable version of `GetNativeFontInfoDesc`.
2287
return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
2289
def SetPointSize(*args, **kwargs):
2291
SetPointSize(self, int pointSize)
2293
Sets the point size.
2295
return _gdi_.Font_SetPointSize(*args, **kwargs)
2297
def SetPixelSize(*args, **kwargs):
2299
SetPixelSize(self, Size pixelSize)
2301
Sets the size in pixels rather than points. If there is platform API
2302
support for this then it is used, otherwise a font with the closest
2303
size is found using a binary search.
2305
return _gdi_.Font_SetPixelSize(*args, **kwargs)
2307
def SetFamily(*args, **kwargs):
2309
SetFamily(self, int family)
2311
Sets the font family.
2313
return _gdi_.Font_SetFamily(*args, **kwargs)
2315
def SetStyle(*args, **kwargs):
2317
SetStyle(self, int style)
2319
Sets the font style.
2321
return _gdi_.Font_SetStyle(*args, **kwargs)
2323
def SetWeight(*args, **kwargs):
2325
SetWeight(self, int weight)
2327
Sets the font weight.
2329
return _gdi_.Font_SetWeight(*args, **kwargs)
2331
def SetFaceName(*args, **kwargs):
2333
SetFaceName(self, String faceName) -> bool
2335
Sets the facename for the font. The facename, which should be a valid
2336
font installed on the end-user's system.
2338
To avoid portability problems, don't rely on a specific face, but
2339
specify the font family instead or as well. A suitable font will be
2340
found on the end-user's system. If both the family and the facename
2341
are specified, wxWidgets will first search for the specific face, and
2342
then for a font belonging to the same family.
2344
return _gdi_.Font_SetFaceName(*args, **kwargs)
2346
def SetUnderlined(*args, **kwargs):
2348
SetUnderlined(self, bool underlined)
2352
return _gdi_.Font_SetUnderlined(*args, **kwargs)
2354
def SetStrikethrough(*args, **kwargs):
2355
"""SetStrikethrough(self, bool strikethrough)"""
2356
return _gdi_.Font_SetStrikethrough(*args, **kwargs)
2358
def SetEncoding(*args, **kwargs):
2360
SetEncoding(self, int encoding)
2362
Set the font encoding.
2364
return _gdi_.Font_SetEncoding(*args, **kwargs)
2366
def SetNativeFontInfo(*args, **kwargs):
2368
SetNativeFontInfo(self, NativeFontInfo info)
2370
Set the font's attributes from a `wx.NativeFontInfo` object.
2372
return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
2374
def SetNativeFontInfoFromString(*args, **kwargs):
2376
SetNativeFontInfoFromString(self, String info) -> bool
2378
Set the font's attributes from string representation of a
2379
`wx.NativeFontInfo` object.
2381
return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
2383
def SetNativeFontInfoUserDesc(*args, **kwargs):
2385
SetNativeFontInfoUserDesc(self, String info) -> bool
2387
Set the font's attributes from a string formerly returned from
2388
`GetNativeFontInfoDesc`.
2390
return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
2392
def SetSymbolicSize(*args, **kwargs):
2393
"""SetSymbolicSize(self, int size)"""
2394
return _gdi_.Font_SetSymbolicSize(*args, **kwargs)
2396
def SetSymbolicSizeRelativeTo(*args, **kwargs):
2397
"""SetSymbolicSizeRelativeTo(self, int size, int base)"""
2398
return _gdi_.Font_SetSymbolicSizeRelativeTo(*args, **kwargs)
2400
def AdjustToSymbolicSize(*args, **kwargs):
2401
"""AdjustToSymbolicSize(int size, int base) -> int"""
2402
return _gdi_.Font_AdjustToSymbolicSize(*args, **kwargs)
2404
AdjustToSymbolicSize = staticmethod(AdjustToSymbolicSize)
2405
def GetFamilyString(*args, **kwargs):
2407
GetFamilyString(self) -> String
2409
Returns a string representation of the font family.
2411
return _gdi_.Font_GetFamilyString(*args, **kwargs)
2413
def GetStyleString(*args, **kwargs):
2415
GetStyleString(self) -> String
2417
Returns a string representation of the font style.
2419
return _gdi_.Font_GetStyleString(*args, **kwargs)
2421
def GetWeightString(*args, **kwargs):
2423
GetWeightString(self) -> String
2425
Return a string representation of the font weight.
2427
return _gdi_.Font_GetWeightString(*args, **kwargs)
2429
def SetNoAntiAliasing(*args, **kwargs):
2430
"""SetNoAntiAliasing(self, bool no=True)"""
2431
return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
2433
def GetNoAntiAliasing(*args, **kwargs):
2434
"""GetNoAntiAliasing(self) -> bool"""
2435
return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
2437
SetNoAntiAliasing = wx.deprecated(SetNoAntiAliasing)
2438
GetNoAntiAliasing = wx.deprecated(GetNoAntiAliasing)
2440
def MakeBold(*args, **kwargs):
2441
"""MakeBold(self) -> Font"""
2442
return _gdi_.Font_MakeBold(*args, **kwargs)
2444
def MakeItalic(*args, **kwargs):
2445
"""MakeItalic(self) -> Font"""
2446
return _gdi_.Font_MakeItalic(*args, **kwargs)
2448
def MakeUnderlined(*args, **kwargs):
2449
"""MakeUnderlined(self) -> Font"""
2450
return _gdi_.Font_MakeUnderlined(*args, **kwargs)
2452
def MakeStrikethrough(*args, **kwargs):
2453
"""MakeStrikethrough(self) -> Font"""
2454
return _gdi_.Font_MakeStrikethrough(*args, **kwargs)
2456
def MakeLarger(*args, **kwargs):
2457
"""MakeLarger(self) -> Font"""
2458
return _gdi_.Font_MakeLarger(*args, **kwargs)
2460
def MakeSmaller(*args, **kwargs):
2461
"""MakeSmaller(self) -> Font"""
2462
return _gdi_.Font_MakeSmaller(*args, **kwargs)
2464
def Scale(*args, **kwargs):
2465
"""Scale(self, float x) -> Font"""
2466
return _gdi_.Font_Scale(*args, **kwargs)
2468
def Bold(*args, **kwargs):
2469
"""Bold(self) -> Font"""
2470
return _gdi_.Font_Bold(*args, **kwargs)
2472
def Italic(*args, **kwargs):
2473
"""Italic(self) -> Font"""
2474
return _gdi_.Font_Italic(*args, **kwargs)
2476
def Underlined(*args, **kwargs):
2477
"""Underlined(self) -> Font"""
2478
return _gdi_.Font_Underlined(*args, **kwargs)
2480
def Strikethrough(*args, **kwargs):
2481
"""Strikethrough(self) -> Font"""
2482
return _gdi_.Font_Strikethrough(*args, **kwargs)
2484
def Larger(*args, **kwargs):
2485
"""Larger(self) -> Font"""
2486
return _gdi_.Font_Larger(*args, **kwargs)
2488
def Smaller(*args, **kwargs):
2489
"""Smaller(self) -> Font"""
2490
return _gdi_.Font_Smaller(*args, **kwargs)
2492
def Scaled(*args, **kwargs):
2493
"""Scaled(self, float x) -> Font"""
2494
return _gdi_.Font_Scaled(*args, **kwargs)
2496
def OSXGetCGFont(*args, **kwargs):
2497
"""OSXGetCGFont(self) -> void"""
2498
return _gdi_.Font_OSXGetCGFont(*args, **kwargs)
2500
def GetDefaultEncoding(*args, **kwargs):
2502
GetDefaultEncoding() -> int
2504
Returns the encoding used for all fonts created with an encoding of
2505
``wx.FONTENCODING_DEFAULT``.
2507
return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
2509
GetDefaultEncoding = staticmethod(GetDefaultEncoding)
2510
def SetDefaultEncoding(*args, **kwargs):
2512
SetDefaultEncoding(int encoding)
2514
Sets the default font encoding.
2516
return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2518
SetDefaultEncoding = staticmethod(SetDefaultEncoding)
2519
Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
2520
FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
2521
Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
2522
FamilyString = property(GetFamilyString,doc="See `GetFamilyString`")
2523
NativeFontInfo = property(GetNativeFontInfo,SetNativeFontInfo,doc="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2524
NativeFontInfoDesc = property(GetNativeFontInfoDesc,doc="See `GetNativeFontInfoDesc`")
2525
NativeFontInfoUserDesc = property(GetNativeFontInfoUserDesc,SetNativeFontInfoUserDesc,doc="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2526
NoAntiAliasing = property(GetNoAntiAliasing,SetNoAntiAliasing,doc="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2527
PixelSize = property(GetPixelSize,SetPixelSize,doc="See `GetPixelSize` and `SetPixelSize`")
2528
PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
2529
Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
2530
StyleString = property(GetStyleString,doc="See `GetStyleString`")
2531
Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
2532
WeightString = property(GetWeightString,doc="See `GetWeightString`")
2533
_gdi_.Font_swigregister(Font)
2535
def FontFromNativeInfo(*args, **kwargs):
2537
FontFromNativeInfo(NativeFontInfo info) -> Font
2539
Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2541
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2542
val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
2545
def FontFromNativeInfoString(*args, **kwargs):
2547
FontFromNativeInfoString(String info) -> Font
2549
Construct a `wx.Font` from the string representation of a
2550
`wx.NativeFontInfo` object.
2552
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2553
val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
2556
def FFont(*args, **kwargs):
2558
FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2559
String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2561
A bit of a simpler way to create a `wx.Font` using flags instead of
2562
individual attribute settings. The value of flags can be a
2563
combination of the following:
2565
============================ ==
2571
wx.FONTFLAG_ANTIALIASED
2572
wx.FONTFLAG_NOT_ANTIALIASED
2573
wx.FONTFLAG_UNDERLINED
2574
wx.FONTFLAG_STRIKETHROUGH
2575
============================ ==
2577
:see: `wx.Font.__init__`
2579
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2580
val = _gdi_.new_FFont(*args, **kwargs)
2583
def FontFromPixelSize(*args, **kwargs):
2585
FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2586
bool underlined=False, String face=wxEmptyString,
2587
int encoding=FONTENCODING_DEFAULT) -> Font
2589
Creates a font using a size in pixels rather than points. If there is
2590
platform API support for this then it is used, otherwise a font with
2591
the closest size is found using a binary search.
2593
:see: `wx.Font.__init__`
2595
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2596
val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
2599
def FFontFromPixelSize(*args, **kwargs):
2601
FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2602
String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2604
Creates a font using a size in pixels rather than points. If there is
2605
platform API support for this then it is used, otherwise a font with
2606
the closest size is found using a binary search.
2608
:see: `wx.Font.__init__`, `wx.FFont`
2610
if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2611
val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
2614
def Font_AdjustToSymbolicSize(*args, **kwargs):
2615
"""Font_AdjustToSymbolicSize(int size, int base) -> int"""
2616
return _gdi_.Font_AdjustToSymbolicSize(*args, **kwargs)
2618
def Font_GetDefaultEncoding(*args):
2620
Font_GetDefaultEncoding() -> int
2622
Returns the encoding used for all fonts created with an encoding of
2623
``wx.FONTENCODING_DEFAULT``.
2625
return _gdi_.Font_GetDefaultEncoding(*args)
2627
def Font_SetDefaultEncoding(*args, **kwargs):
2629
Font_SetDefaultEncoding(int encoding)
2631
Sets the default font encoding.
2633
return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2635
Font2 = wx.deprecated(FFont, "Use `wx.FFont` instead.")
2636
#---------------------------------------------------------------------------
2638
class FontEnumerator(object):
2639
"""Proxy of C++ FontEnumerator class"""
2640
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2641
__repr__ = _swig_repr
2642
def __init__(self, *args, **kwargs):
2643
"""__init__(self) -> FontEnumerator"""
2644
_gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs))
2645
FontEnumerator._setCallbackInfo(self, self, FontEnumerator)
2647
__swig_destroy__ = _gdi_.delete_FontEnumerator
2648
__del__ = lambda self : None;
2649
def _setCallbackInfo(*args, **kwargs):
2650
"""_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)"""
2651
return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
2653
def EnumerateFacenames(*args, **kwargs):
2654
"""EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2655
return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
2657
def EnumerateEncodings(*args, **kwargs):
2658
"""EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2659
return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
2661
def GetEncodings(*args, **kwargs):
2662
"""GetEncodings() -> PyObject"""
2663
return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
2665
GetEncodings = staticmethod(GetEncodings)
2666
def GetFacenames(*args, **kwargs):
2667
"""GetFacenames() -> PyObject"""
2668
return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
2670
GetFacenames = staticmethod(GetFacenames)
2671
def IsValidFacename(*args, **kwargs):
2673
IsValidFacename(String str) -> bool
2675
Convenience function that returns true if the given face name exist in
2678
return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2680
IsValidFacename = staticmethod(IsValidFacename)
2681
_gdi_.FontEnumerator_swigregister(FontEnumerator)
2683
def FontEnumerator_GetEncodings(*args):
2684
"""FontEnumerator_GetEncodings() -> PyObject"""
2685
return _gdi_.FontEnumerator_GetEncodings(*args)
2687
def FontEnumerator_GetFacenames(*args):
2688
"""FontEnumerator_GetFacenames() -> PyObject"""
2689
return _gdi_.FontEnumerator_GetFacenames(*args)
2691
def FontEnumerator_IsValidFacename(*args, **kwargs):
2693
FontEnumerator_IsValidFacename(String str) -> bool
2695
Convenience function that returns true if the given face name exist in
2698
return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2700
#---------------------------------------------------------------------------
2702
LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
2703
LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
2704
LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
2705
LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
2706
LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
2707
LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
2708
LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
2709
LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
2710
LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
2711
LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
2712
LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
2713
LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
2714
LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
2715
LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
2716
LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
2717
LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
2718
LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
2719
LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
2720
LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
2721
LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
2722
LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
2723
LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
2724
LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
2725
LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
2726
LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
2727
LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
2728
LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
2729
LANGUAGE_ASTURIAN = _gdi_.LANGUAGE_ASTURIAN
2730
LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
2731
LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
2732
LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
2733
LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
2734
LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
2735
LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
2736
LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
2737
LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
2738
LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
2739
LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
2740
LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
2741
LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
2742
LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
2743
LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
2744
LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
2745
LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
2746
LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
2747
LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
2748
LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
2749
LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
2750
LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
2751
LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
2752
LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
2753
LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
2754
LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
2755
LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
2756
LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
2757
LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
2758
LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
2759
LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2760
LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2761
LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2762
LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2763
LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2764
LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2765
LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2766
LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2767
LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2768
LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2769
LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2770
LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2771
LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2772
LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2773
LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2774
LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2775
LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2776
LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2777
LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2778
LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2779
LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2780
LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2781
LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2782
LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2783
LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2784
LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2785
LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2786
LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2787
LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2788
LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2789
LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2790
LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2791
LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2792
LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2793
LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2794
LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2795
LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2796
LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2797
LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2798
LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2799
LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2800
LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2801
LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2802
LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2803
LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2804
LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2805
LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2806
LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2807
LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2808
LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2809
LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2810
LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2811
LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2812
LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2813
LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2814
LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2815
LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2816
LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2817
LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2818
LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2819
LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2820
LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2821
LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2822
LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2823
LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2824
LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2825
LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2826
LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2827
LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2828
LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2829
LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2830
LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2831
LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2832
LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2833
LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2834
LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2835
LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2836
LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2837
LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2838
LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2839
LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2840
LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2841
LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2842
LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2843
LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2844
LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2845
LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2846
LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2847
LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2848
LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2849
LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2850
LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2851
LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2852
LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2853
LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2854
LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2855
LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2856
LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2857
LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2858
LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2859
LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2860
LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2861
LANGUAGE_SAMI = _gdi_.LANGUAGE_SAMI
2862
LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2863
LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2864
LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2865
LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2866
LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2867
LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2868
LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2869
LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2870
LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2871
LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2872
LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2873
LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2874
LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2875
LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2876
LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2877
LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2878
LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2879
LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2880
LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2881
LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2882
LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2883
LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2884
LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2885
LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2886
LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2887
LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2888
LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2889
LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2890
LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2891
LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2892
LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2893
LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2894
LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2895
LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2896
LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2897
LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2898
LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2899
LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2900
LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2901
LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2902
LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2903
LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2904
LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2905
LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2906
LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2907
LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2908
LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2909
LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2910
LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2911
LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2912
LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2913
LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2914
LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2915
LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2916
LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2917
LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2918
LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2919
LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2920
LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2921
LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2922
LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2923
LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2924
LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2925
LANGUAGE_VALENCIAN = _gdi_.LANGUAGE_VALENCIAN
2926
LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2927
LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2928
LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2929
LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2930
LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2931
LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2932
LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2933
LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2934
LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2935
LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
2936
class LanguageInfo(object):
2937
"""Proxy of C++ LanguageInfo class"""
2938
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2939
def __init__(self): raise AttributeError, "No constructor defined"
2940
__repr__ = _swig_repr
2941
Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2942
CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2943
Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2944
LayoutDirection = property(_gdi_.LanguageInfo_LayoutDirection_get, _gdi_.LanguageInfo_LayoutDirection_set)
2945
def GetLocaleName(*args, **kwargs):
2946
"""GetLocaleName(self) -> String"""
2947
return _gdi_.LanguageInfo_GetLocaleName(*args, **kwargs)
2949
_gdi_.LanguageInfo_swigregister(LanguageInfo)
2951
LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2952
LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2953
LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2954
LOCALE_CAT_DEFAULT = _gdi_.LOCALE_CAT_DEFAULT
2955
LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2956
LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2957
LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2958
LOCALE_SHORT_DATE_FMT = _gdi_.LOCALE_SHORT_DATE_FMT
2959
LOCALE_LONG_DATE_FMT = _gdi_.LOCALE_LONG_DATE_FMT
2960
LOCALE_DATE_TIME_FMT = _gdi_.LOCALE_DATE_TIME_FMT
2961
LOCALE_TIME_FMT = _gdi_.LOCALE_TIME_FMT
2962
LOCALE_DONT_LOAD_DEFAULT = _gdi_.LOCALE_DONT_LOAD_DEFAULT
2963
LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2964
LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
2965
class Locale(object):
2966
"""Proxy of C++ Locale class"""
2967
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2968
__repr__ = _swig_repr
2969
def __init__(self, *args, **kwargs):
2970
"""__init__(self, int language=-1, int flags=LOCALE_LOAD_DEFAULT) -> Locale"""
2971
_gdi_.Locale_swiginit(self,_gdi_.new_Locale(*args, **kwargs))
2972
__swig_destroy__ = _gdi_.delete_Locale
2973
__del__ = lambda self : None;
2974
def Init1(*args, **kwargs):
2976
Init1(self, String name, String shortName=EmptyString, String locale=EmptyString,
2977
bool bLoadDefault=True) -> bool
2979
return _gdi_.Locale_Init1(*args, **kwargs)
2981
def Init2(*args, **kwargs):
2982
"""Init2(self, int language=LANGUAGE_DEFAULT, int flags=LOCALE_LOAD_DEFAULT) -> bool"""
2983
return _gdi_.Locale_Init2(*args, **kwargs)
2985
def Init(self, *_args, **_kwargs):
2986
if type(_args[0]) in [type(''), type(u'')]:
2987
val = self.Init1(*_args, **_kwargs)
2989
val = self.Init2(*_args, **_kwargs)
2992
def GetSystemLanguage(*args, **kwargs):
2993
"""GetSystemLanguage() -> int"""
2994
return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2996
GetSystemLanguage = staticmethod(GetSystemLanguage)
2997
def GetSystemEncoding(*args, **kwargs):
2998
"""GetSystemEncoding() -> int"""
2999
return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
3001
GetSystemEncoding = staticmethod(GetSystemEncoding)
3002
def GetSystemEncodingName(*args, **kwargs):
3003
"""GetSystemEncodingName() -> String"""
3004
return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
3006
GetSystemEncodingName = staticmethod(GetSystemEncodingName)
3007
def GetInfo(*args, **kwargs):
3008
"""GetInfo(int index, int cat=LOCALE_CAT_DEFAULT) -> String"""
3009
return _gdi_.Locale_GetInfo(*args, **kwargs)
3011
GetInfo = staticmethod(GetInfo)
3012
def IsOk(*args, **kwargs):
3013
"""IsOk(self) -> bool"""
3014
return _gdi_.Locale_IsOk(*args, **kwargs)
3016
def __nonzero__(self): return self.IsOk()
3017
def GetLocale(*args, **kwargs):
3018
"""GetLocale(self) -> String"""
3019
return _gdi_.Locale_GetLocale(*args, **kwargs)
3021
def GetLanguage(*args, **kwargs):
3022
"""GetLanguage(self) -> int"""
3023
return _gdi_.Locale_GetLanguage(*args, **kwargs)
3025
def GetSysName(*args, **kwargs):
3026
"""GetSysName(self) -> String"""
3027
return _gdi_.Locale_GetSysName(*args, **kwargs)
3029
def GetCanonicalName(*args, **kwargs):
3030
"""GetCanonicalName(self) -> String"""
3031
return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
3033
def AddCatalogLookupPathPrefix(*args, **kwargs):
3034
"""AddCatalogLookupPathPrefix(String prefix)"""
3035
return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
3037
AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
3038
def AddCatalog(*args):
3040
AddCatalog(self, String domain) -> bool
3041
AddCatalog(self, String domain, int msgIdLanguage) -> bool
3042
AddCatalog(self, String domain, int msgIdLanguage, String msgIdCharset) -> bool
3044
return _gdi_.Locale_AddCatalog(*args)
3046
def IsAvailable(*args, **kwargs):
3047
"""IsAvailable(int lang) -> bool"""
3048
return _gdi_.Locale_IsAvailable(*args, **kwargs)
3050
IsAvailable = staticmethod(IsAvailable)
3051
def IsLoaded(*args, **kwargs):
3052
"""IsLoaded(self, String domain) -> bool"""
3053
return _gdi_.Locale_IsLoaded(*args, **kwargs)
3055
def GetLanguageInfo(*args, **kwargs):
3056
"""GetLanguageInfo(int lang) -> LanguageInfo"""
3057
return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
3059
GetLanguageInfo = staticmethod(GetLanguageInfo)
3060
def GetLanguageName(*args, **kwargs):
3061
"""GetLanguageName(int lang) -> String"""
3062
return _gdi_.Locale_GetLanguageName(*args, **kwargs)
3064
GetLanguageName = staticmethod(GetLanguageName)
3065
def GetLanguageCanonicalName(*args, **kwargs):
3066
"""GetLanguageCanonicalName(int lang) -> String"""
3067
return _gdi_.Locale_GetLanguageCanonicalName(*args, **kwargs)
3069
GetLanguageCanonicalName = staticmethod(GetLanguageCanonicalName)
3070
def FindLanguageInfo(*args, **kwargs):
3071
"""FindLanguageInfo(String locale) -> LanguageInfo"""
3072
return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
3074
FindLanguageInfo = staticmethod(FindLanguageInfo)
3075
def AddLanguage(*args, **kwargs):
3076
"""AddLanguage(LanguageInfo info)"""
3077
return _gdi_.Locale_AddLanguage(*args, **kwargs)
3079
AddLanguage = staticmethod(AddLanguage)
3080
def GetString(*args, **kwargs):
3081
"""GetString(self, String origString, String domain=EmptyString) -> String"""
3082
return _gdi_.Locale_GetString(*args, **kwargs)
3084
def GetName(*args, **kwargs):
3085
"""GetName(self) -> String"""
3086
return _gdi_.Locale_GetName(*args, **kwargs)
3088
CanonicalName = property(GetCanonicalName,doc="See `GetCanonicalName`")
3089
Language = property(GetLanguage,doc="See `GetLanguage`")
3090
Locale = property(GetLocale,doc="See `GetLocale`")
3091
Name = property(GetName,doc="See `GetName`")
3092
String = property(GetString,doc="See `GetString`")
3093
SysName = property(GetSysName,doc="See `GetSysName`")
3094
_gdi_.Locale_swigregister(Locale)
3096
def Locale_GetSystemLanguage(*args):
3097
"""Locale_GetSystemLanguage() -> int"""
3098
return _gdi_.Locale_GetSystemLanguage(*args)
3100
def Locale_GetSystemEncoding(*args):
3101
"""Locale_GetSystemEncoding() -> int"""
3102
return _gdi_.Locale_GetSystemEncoding(*args)
3104
def Locale_GetSystemEncodingName(*args):
3105
"""Locale_GetSystemEncodingName() -> String"""
3106
return _gdi_.Locale_GetSystemEncodingName(*args)
3108
def Locale_GetInfo(*args, **kwargs):
3109
"""Locale_GetInfo(int index, int cat=LOCALE_CAT_DEFAULT) -> String"""
3110
return _gdi_.Locale_GetInfo(*args, **kwargs)
3112
def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
3113
"""Locale_AddCatalogLookupPathPrefix(String prefix)"""
3114
return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
3116
def Locale_IsAvailable(*args, **kwargs):
3117
"""Locale_IsAvailable(int lang) -> bool"""
3118
return _gdi_.Locale_IsAvailable(*args, **kwargs)
3120
def Locale_GetLanguageInfo(*args, **kwargs):
3121
"""Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
3122
return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
3124
def Locale_GetLanguageName(*args, **kwargs):
3125
"""Locale_GetLanguageName(int lang) -> String"""
3126
return _gdi_.Locale_GetLanguageName(*args, **kwargs)
3128
def Locale_GetLanguageCanonicalName(*args, **kwargs):
3129
"""Locale_GetLanguageCanonicalName(int lang) -> String"""
3130
return _gdi_.Locale_GetLanguageCanonicalName(*args, **kwargs)
3132
def Locale_FindLanguageInfo(*args, **kwargs):
3133
"""Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
3134
return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
3136
def Locale_AddLanguage(*args, **kwargs):
3137
"""Locale_AddLanguage(LanguageInfo info)"""
3138
return _gdi_.Locale_AddLanguage(*args, **kwargs)
3140
class PyLocale(Locale):
3141
"""Proxy of C++ PyLocale class"""
3142
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3143
__repr__ = _swig_repr
3144
def __init__(self, *args, **kwargs):
3145
"""__init__(self, int language=-1, int flags=LOCALE_LOAD_DEFAULT) -> PyLocale"""
3146
_gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
3147
PyLocale._setCallbackInfo(self, self, PyLocale)
3149
__swig_destroy__ = _gdi_.delete_PyLocale
3150
__del__ = lambda self : None;
3151
def _setCallbackInfo(*args, **kwargs):
3152
"""_setCallbackInfo(self, PyObject self, PyObject _class)"""
3153
return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs)
3155
def GetSingularString(*args, **kwargs):
3156
"""GetSingularString(self, String origString, String domain=EmptyString) -> String"""
3157
return _gdi_.PyLocale_GetSingularString(*args, **kwargs)
3159
def GetPluralString(*args, **kwargs):
3160
"""GetPluralString(self, String origString, String origString2, size_t n, String domain=EmptyString) -> String"""
3161
return _gdi_.PyLocale_GetPluralString(*args, **kwargs)
3163
_gdi_.PyLocale_swigregister(PyLocale)
3166
def GetLocale(*args):
3167
"""GetLocale() -> Locale"""
3168
return _gdi_.GetLocale(*args)
3169
#---------------------------------------------------------------------------
3171
CONVERT_STRICT = _gdi_.CONVERT_STRICT
3172
CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
3173
PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
3174
PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
3175
PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
3176
PLATFORM_OS2 = _gdi_.PLATFORM_OS2
3177
PLATFORM_MAC = _gdi_.PLATFORM_MAC
3178
class EncodingConverter(_core.Object):
3179
"""Proxy of C++ EncodingConverter class"""
3180
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3181
__repr__ = _swig_repr
3182
def __init__(self, *args, **kwargs):
3183
"""__init__(self) -> EncodingConverter"""
3184
_gdi_.EncodingConverter_swiginit(self,_gdi_.new_EncodingConverter(*args, **kwargs))
3185
__swig_destroy__ = _gdi_.delete_EncodingConverter
3186
__del__ = lambda self : None;
3187
def Init(*args, **kwargs):
3188
"""Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
3189
return _gdi_.EncodingConverter_Init(*args, **kwargs)
3191
def Convert(*args, **kwargs):
3192
"""Convert(self, String input) -> String"""
3193
return _gdi_.EncodingConverter_Convert(*args, **kwargs)
3195
def GetPlatformEquivalents(*args, **kwargs):
3196
"""GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
3197
return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
3199
GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
3200
def GetAllEquivalents(*args, **kwargs):
3201
"""GetAllEquivalents(int enc) -> wxFontEncodingArray"""
3202
return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
3204
GetAllEquivalents = staticmethod(GetAllEquivalents)
3205
def CanConvert(*args, **kwargs):
3206
"""CanConvert(int encIn, int encOut) -> bool"""
3207
return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
3209
CanConvert = staticmethod(CanConvert)
3210
def __nonzero__(self): return self.IsOk()
3211
_gdi_.EncodingConverter_swigregister(EncodingConverter)
3213
def GetTranslation(*args):
3215
GetTranslation(String str) -> String
3216
GetTranslation(String str, String domain) -> String
3217
GetTranslation(String str, String strPlural, size_t n) -> String
3218
GetTranslation(String str, String strPlural, size_t n, String domain) -> String
3220
return _gdi_.GetTranslation(*args)
3222
def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
3223
"""EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
3224
return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
3226
def EncodingConverter_GetAllEquivalents(*args, **kwargs):
3227
"""EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
3228
return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
3230
def EncodingConverter_CanConvert(*args, **kwargs):
3231
"""EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
3232
return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
3234
#----------------------------------------------------------------------------
3235
# Add the directory where the wxWidgets catalogs were installed
3236
# to the default catalog path, if they were put in the pacakge dir.
3238
_localedir = os.path.join(os.path.dirname(__file__), "locale")
3239
if os.path.exists(_localedir):
3240
Locale.AddCatalogLookupPathPrefix(_localedir)
3243
#----------------------------------------------------------------------------
3245
#---------------------------------------------------------------------------
3249
INVERT = _gdi_.INVERT
3250
OR_REVERSE = _gdi_.OR_REVERSE
3251
AND_REVERSE = _gdi_.AND_REVERSE
3254
AND_INVERT = _gdi_.AND_INVERT
3258
SRC_INVERT = _gdi_.SRC_INVERT
3259
OR_INVERT = _gdi_.OR_INVERT
3263
FLOOD_SURFACE = _gdi_.FLOOD_SURFACE
3264
FLOOD_BORDER = _gdi_.FLOOD_BORDER
3265
MM_TEXT = _gdi_.MM_TEXT
3266
MM_TWIPS = _gdi_.MM_TWIPS
3267
MM_POINTS = _gdi_.MM_POINTS
3268
MM_METRIC = _gdi_.MM_METRIC
3269
class FontMetrics(object):
3270
"""Proxy of C++ FontMetrics class"""
3271
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3272
__repr__ = _swig_repr
3273
def __init__(self, *args, **kwargs):
3274
"""__init__(self) -> FontMetrics"""
3275
_gdi_.FontMetrics_swiginit(self,_gdi_.new_FontMetrics(*args, **kwargs))
3276
__swig_destroy__ = _gdi_.delete_FontMetrics
3277
__del__ = lambda self : None;
3278
height = property(_gdi_.FontMetrics_height_get, _gdi_.FontMetrics_height_set)
3279
ascent = property(_gdi_.FontMetrics_ascent_get, _gdi_.FontMetrics_ascent_set)
3280
descent = property(_gdi_.FontMetrics_descent_get, _gdi_.FontMetrics_descent_set)
3281
internalLeading = property(_gdi_.FontMetrics_internalLeading_get, _gdi_.FontMetrics_internalLeading_set)
3282
externalLeading = property(_gdi_.FontMetrics_externalLeading_get, _gdi_.FontMetrics_externalLeading_set)
3283
averageWidth = property(_gdi_.FontMetrics_averageWidth_get, _gdi_.FontMetrics_averageWidth_set)
3284
_gdi_.FontMetrics_swigregister(FontMetrics)
3286
class DC(_core.Object):
3288
A wx.DC is a device context onto which graphics and text can be
3289
drawn. It is intended to represent a number of output devices in a
3290
generic way, so a window can have a device context associated with it,
3291
and a printer also has a device context. In this way, the same piece
3292
of code may write to a number of different devices, if the device
3293
context is used as a parameter.
3295
Derived types of wxDC have documentation for specific features only,
3296
so refer to this section for most device context information.
3298
The wx.DC class is abstract and can not be instantiated, you must use
3299
one of the derived classes instead. Which one will depend on the
3300
situation in which it is used.
3302
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3303
def __init__(self): raise AttributeError, "No constructor defined"
3304
__repr__ = _swig_repr
3305
__swig_destroy__ = _gdi_.delete_DC
3306
__del__ = lambda self : None;
3307
# These have been deprecated in wxWidgets. Since they never
3308
# really did anything to begin with, just make them be NOPs.
3309
def BeginDrawing(self): pass
3310
def EndDrawing(self): pass
3312
def GetImpl(*args, **kwargs):
3313
"""GetImpl(self) -> DCImpl"""
3314
return _gdi_.DC_GetImpl(*args, **kwargs)
3316
def GetWindow(*args, **kwargs):
3317
"""GetWindow(self) -> Window"""
3318
return _gdi_.DC_GetWindow(*args, **kwargs)
3320
def CopyAttributes(*args, **kwargs):
3321
"""CopyAttributes(self, DC dc)"""
3322
return _gdi_.DC_CopyAttributes(*args, **kwargs)
3324
def FloodFill(*args, **kwargs):
3326
FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
3328
Flood fills the device context starting from the given point, using
3329
the current brush colour, and using a style:
3331
- **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
3332
the given colour is encountered.
3334
- **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3337
Returns False if the operation failed.
3339
Note: The present implementation for non-Windows platforms may fail to
3340
find colour borders if the pixels do not match the colour
3341
exactly. However the function will still return true.
3343
return _gdi_.DC_FloodFill(*args, **kwargs)
3345
def FloodFillPoint(*args, **kwargs):
3347
FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
3349
Flood fills the device context starting from the given point, using
3350
the current brush colour, and using a style:
3352
- **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
3353
the given colour is encountered.
3355
- **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3358
Returns False if the operation failed.
3360
Note: The present implementation for non-Windows platforms may fail to
3361
find colour borders if the pixels do not match the colour
3362
exactly. However the function will still return true.
3364
return _gdi_.DC_FloodFillPoint(*args, **kwargs)
3366
def GradientFillConcentric(*args, **kwargs):
3368
GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
3371
Fill the area specified by rect with a radial gradient, starting from
3372
initialColour in the center of the circle and fading to destColour on
3373
the outside of the circle. The circleCenter argument is the relative
3374
coordinants of the center of the circle in the specified rect.
3376
Note: Currently this function is very slow, don't use it for real-time
3379
return _gdi_.DC_GradientFillConcentric(*args, **kwargs)
3381
def GradientFillLinear(*args, **kwargs):
3383
GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
3384
int nDirection=EAST)
3386
Fill the area specified by rect with a linear gradient, starting from
3387
initialColour and eventually fading to destColour. The nDirection
3388
parameter specifies the direction of the colour change, default is to
3389
use initialColour on the left part of the rectangle and destColour on
3392
return _gdi_.DC_GradientFillLinear(*args, **kwargs)
3394
def GetPixel(*args, **kwargs):
3396
GetPixel(self, int x, int y) -> Colour
3398
Gets the colour at the specified location on the DC.
3400
return _gdi_.DC_GetPixel(*args, **kwargs)
3402
def GetPixelPoint(*args, **kwargs):
3403
"""GetPixelPoint(self, Point pt) -> Colour"""
3404
return _gdi_.DC_GetPixelPoint(*args, **kwargs)
3406
def DrawLine(*args, **kwargs):
3408
DrawLine(self, int x1, int y1, int x2, int y2)
3410
Draws a line from the first point to the second. The current pen is
3411
used for drawing the line. Note that the second point is *not* part of
3412
the line and is not drawn by this function (this is consistent with
3413
the behaviour of many other toolkits).
3415
return _gdi_.DC_DrawLine(*args, **kwargs)
3417
def DrawLinePoint(*args, **kwargs):
3419
DrawLinePoint(self, Point pt1, Point pt2)
3421
Draws a line from the first point to the second. The current pen is
3422
used for drawing the line. Note that the second point is *not* part of
3423
the line and is not drawn by this function (this is consistent with
3424
the behaviour of many other toolkits).
3426
return _gdi_.DC_DrawLinePoint(*args, **kwargs)
3428
def CrossHair(*args, **kwargs):
3430
CrossHair(self, int x, int y)
3432
Displays a cross hair using the current pen. This is a vertical and
3433
horizontal line the height and width of the window, centred on the
3436
return _gdi_.DC_CrossHair(*args, **kwargs)
3438
def CrossHairPoint(*args, **kwargs):
3440
CrossHairPoint(self, Point pt)
3442
Displays a cross hair using the current pen. This is a vertical and
3443
horizontal line the height and width of the window, centred on the
3446
return _gdi_.DC_CrossHairPoint(*args, **kwargs)
3448
def DrawArc(*args, **kwargs):
3450
DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
3452
Draws an arc of a circle, centred on the *center* point (xc, yc), from
3453
the first point to the second. The current pen is used for the outline
3454
and the current brush for filling the shape.
3456
The arc is drawn in an anticlockwise direction from the start point to
3459
return _gdi_.DC_DrawArc(*args, **kwargs)
3461
def DrawArcPoint(*args, **kwargs):
3463
DrawArcPoint(self, Point pt1, Point pt2, Point center)
3465
Draws an arc of a circle, centred on the *center* point (xc, yc), from
3466
the first point to the second. The current pen is used for the outline
3467
and the current brush for filling the shape.
3469
The arc is drawn in an anticlockwise direction from the start point to
3472
return _gdi_.DC_DrawArcPoint(*args, **kwargs)
3474
def DrawCheckMark(*args, **kwargs):
3476
DrawCheckMark(self, int x, int y, int width, int height)
3478
Draws a check mark inside the given rectangle.
3480
return _gdi_.DC_DrawCheckMark(*args, **kwargs)
3482
def DrawCheckMarkRect(*args, **kwargs):
3484
DrawCheckMarkRect(self, Rect rect)
3486
Draws a check mark inside the given rectangle.
3488
return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
3490
def DrawEllipticArc(*args, **kwargs):
3492
DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3494
Draws an arc of an ellipse, with the given rectangle defining the
3495
bounds of the ellipse. The current pen is used for drawing the arc and
3496
the current brush is used for drawing the pie.
3498
The *start* and *end* parameters specify the start and end of the arc
3499
relative to the three-o'clock position from the center of the
3500
rectangle. Angles are specified in degrees (360 is a complete
3501
circle). Positive values mean counter-clockwise motion. If start is
3502
equal to end, a complete ellipse will be drawn.
3504
return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
3506
def DrawEllipticArcPointSize(*args, **kwargs):
3508
DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3510
Draws an arc of an ellipse, with the given rectangle defining the
3511
bounds of the ellipse. The current pen is used for drawing the arc and
3512
the current brush is used for drawing the pie.
3514
The *start* and *end* parameters specify the start and end of the arc
3515
relative to the three-o'clock position from the center of the
3516
rectangle. Angles are specified in degrees (360 is a complete
3517
circle). Positive values mean counter-clockwise motion. If start is
3518
equal to end, a complete ellipse will be drawn.
3520
return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
3522
def DrawPoint(*args, **kwargs):
3524
DrawPoint(self, int x, int y)
3526
Draws a point using the current pen.
3528
return _gdi_.DC_DrawPoint(*args, **kwargs)
3530
def DrawPointPoint(*args, **kwargs):
3532
DrawPointPoint(self, Point pt)
3534
Draws a point using the current pen.
3536
return _gdi_.DC_DrawPointPoint(*args, **kwargs)
3538
def DrawRectangle(*args, **kwargs):
3540
DrawRectangle(self, int x, int y, int width, int height)
3542
Draws a rectangle with the given top left corner, and with the given
3543
size. The current pen is used for the outline and the current brush
3544
for filling the shape.
3546
return _gdi_.DC_DrawRectangle(*args, **kwargs)
3548
def DrawRectangleRect(*args, **kwargs):
3550
DrawRectangleRect(self, Rect rect)
3552
Draws a rectangle with the given top left corner, and with the given
3553
size. The current pen is used for the outline and the current brush
3554
for filling the shape.
3556
return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
3558
def DrawRectanglePointSize(*args, **kwargs):
3560
DrawRectanglePointSize(self, Point pt, Size sz)
3562
Draws a rectangle with the given top left corner, and with the given
3563
size. The current pen is used for the outline and the current brush
3564
for filling the shape.
3566
return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
3568
def DrawRoundedRectangle(*args, **kwargs):
3570
DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3572
Draws a rectangle with the given top left corner, and with the given
3573
size. The corners are quarter-circles using the given radius. The
3574
current pen is used for the outline and the current brush for filling
3577
If radius is positive, the value is assumed to be the radius of the
3578
rounded corner. If radius is negative, the absolute value is assumed
3579
to be the proportion of the smallest dimension of the rectangle. This
3580
means that the corner can be a sensible size relative to the size of
3581
the rectangle, and also avoids the strange effects X produces when the
3582
corners are too big for the rectangle.
3584
return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
3586
def DrawRoundedRectangleRect(*args, **kwargs):
3588
DrawRoundedRectangleRect(self, Rect r, double radius)
3590
Draws a rectangle with the given top left corner, and with the given
3591
size. The corners are quarter-circles using the given radius. The
3592
current pen is used for the outline and the current brush for filling
3595
If radius is positive, the value is assumed to be the radius of the
3596
rounded corner. If radius is negative, the absolute value is assumed
3597
to be the proportion of the smallest dimension of the rectangle. This
3598
means that the corner can be a sensible size relative to the size of
3599
the rectangle, and also avoids the strange effects X produces when the
3600
corners are too big for the rectangle.
3602
return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
3604
def DrawRoundedRectanglePointSize(*args, **kwargs):
3606
DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3608
Draws a rectangle with the given top left corner, and with the given
3609
size. The corners are quarter-circles using the given radius. The
3610
current pen is used for the outline and the current brush for filling
3613
If radius is positive, the value is assumed to be the radius of the
3614
rounded corner. If radius is negative, the absolute value is assumed
3615
to be the proportion of the smallest dimension of the rectangle. This
3616
means that the corner can be a sensible size relative to the size of
3617
the rectangle, and also avoids the strange effects X produces when the
3618
corners are too big for the rectangle.
3620
return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
3622
def DrawCircle(*args, **kwargs):
3624
DrawCircle(self, int x, int y, int radius)
3626
Draws a circle with the given center point and radius. The current
3627
pen is used for the outline and the current brush for filling the
3630
return _gdi_.DC_DrawCircle(*args, **kwargs)
3632
def DrawCirclePoint(*args, **kwargs):
3634
DrawCirclePoint(self, Point pt, int radius)
3636
Draws a circle with the given center point and radius. The current
3637
pen is used for the outline and the current brush for filling the
3640
return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
3642
def DrawEllipse(*args, **kwargs):
3644
DrawEllipse(self, int x, int y, int width, int height)
3646
Draws an ellipse contained in the specified rectangle. The current pen
3647
is used for the outline and the current brush for filling the shape.
3649
return _gdi_.DC_DrawEllipse(*args, **kwargs)
3651
def DrawEllipseRect(*args, **kwargs):
3653
DrawEllipseRect(self, Rect rect)
3655
Draws an ellipse contained in the specified rectangle. The current pen
3656
is used for the outline and the current brush for filling the shape.
3658
return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
3660
def DrawEllipsePointSize(*args, **kwargs):
3662
DrawEllipsePointSize(self, Point pt, Size sz)
3664
Draws an ellipse contained in the specified rectangle. The current pen
3665
is used for the outline and the current brush for filling the shape.
3667
return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
3669
def DrawIcon(*args, **kwargs):
3671
DrawIcon(self, Icon icon, int x, int y)
3673
Draw an icon on the display (does nothing if the device context is
3674
PostScript). This can be the simplest way of drawing bitmaps on a
3677
return _gdi_.DC_DrawIcon(*args, **kwargs)
3679
def DrawIconPoint(*args, **kwargs):
3681
DrawIconPoint(self, Icon icon, Point pt)
3683
Draw an icon on the display (does nothing if the device context is
3684
PostScript). This can be the simplest way of drawing bitmaps on a
3687
return _gdi_.DC_DrawIconPoint(*args, **kwargs)
3689
def DrawBitmap(*args, **kwargs):
3691
DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3693
Draw a bitmap on the device context at the specified point. If
3694
*transparent* is true and the bitmap has a transparency mask, (or
3695
alpha channel on the platforms that support it) then the bitmap will
3696
be drawn transparently.
3698
return _gdi_.DC_DrawBitmap(*args, **kwargs)
3700
def DrawBitmapPoint(*args, **kwargs):
3702
DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3704
Draw a bitmap on the device context at the specified point. If
3705
*transparent* is true and the bitmap has a transparency mask, (or
3706
alpha channel on the platforms that support it) then the bitmap will
3707
be drawn transparently.
3709
return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
3711
def DrawText(*args, **kwargs):
3713
DrawText(self, String text, int x, int y)
3715
Draws a text string at the specified point, using the current text
3716
font, and the current text foreground and background colours.
3718
The coordinates refer to the top-left corner of the rectangle bounding
3719
the string. See `GetTextExtent` for how to get the dimensions of a
3720
text string, which can be used to position the text more precisely.
3722
**NOTE**: under wxGTK the current logical function is used by this
3723
function but it is ignored by wxMSW. Thus, you should avoid using
3724
logical functions with this function in portable programs.
3726
return _gdi_.DC_DrawText(*args, **kwargs)
3728
def DrawTextPoint(*args, **kwargs):
3730
DrawTextPoint(self, String text, Point pt)
3732
Draws a text string at the specified point, using the current text
3733
font, and the current text foreground and background colours.
3735
The coordinates refer to the top-left corner of the rectangle bounding
3736
the string. See `GetTextExtent` for how to get the dimensions of a
3737
text string, which can be used to position the text more precisely.
3739
**NOTE**: under wxGTK the current logical function is used by this
3740
function but it is ignored by wxMSW. Thus, you should avoid using
3741
logical functions with this function in portable programs.
3743
return _gdi_.DC_DrawTextPoint(*args, **kwargs)
3745
def DrawRotatedText(*args, **kwargs):
3747
DrawRotatedText(self, String text, int x, int y, double angle)
3749
Draws the text rotated by *angle* degrees, if supported by the platform.
3751
**NOTE**: Under Win9x only TrueType fonts can be drawn by this
3752
function. In particular, a font different from ``wx.NORMAL_FONT``
3753
should be used as the it is not normally a TrueType
3754
font. ``wx.SWISS_FONT`` is an example of a font which is.
3756
return _gdi_.DC_DrawRotatedText(*args, **kwargs)
3758
def DrawRotatedTextPoint(*args, **kwargs):
3760
DrawRotatedTextPoint(self, String text, Point pt, double angle)
3762
Draws the text rotated by *angle* degrees, if supported by the platform.
3764
**NOTE**: Under Win9x only TrueType fonts can be drawn by this
3765
function. In particular, a font different from ``wx.NORMAL_FONT``
3766
should be used as the it is not normally a TrueType
3767
font. ``wx.SWISS_FONT`` is an example of a font which is.
3769
return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
3771
def Blit(*args, **kwargs):
3773
Blit(self, int xdest, int ydest, int width, int height, DC source,
3774
int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3775
int xsrcMask=-1, int ysrcMask=-1) -> bool
3777
Copy from a source DC to this DC. Parameters specify the destination
3778
coordinates, size of area to copy, source DC, source coordinates,
3779
logical function, whether to use a bitmap mask, and mask source
3782
return _gdi_.DC_Blit(*args, **kwargs)
3784
def BlitPointSize(*args, **kwargs):
3786
BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3787
bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3789
Copy from a source DC to this DC. Parameters specify the destination
3790
coordinates, size of area to copy, source DC, source coordinates,
3791
logical function, whether to use a bitmap mask, and mask source
3794
return _gdi_.DC_BlitPointSize(*args, **kwargs)
3796
def StretchBlit(*args, **kwargs):
3798
StretchBlit(self, int dstX, int dstY, int dstWidth, int dstHeight, DC source,
3799
int srcX, int srcY, int srcWidth, int srcHeight,
3800
int rop=COPY, bool useMask=False,
3801
int srcMaskX=DefaultCoord, int srcMaskY=DefaultCoord) -> bool
3803
Copy from a source DC to this DC, specifying the destination
3804
coordinates, destination size, source DC, source coordinates, size of
3805
source area to copy, logical function, whether to use a bitmap mask,
3806
and mask source position.
3808
return _gdi_.DC_StretchBlit(*args, **kwargs)
3810
def StretchBlitPointSize(*args, **kwargs):
3812
StretchBlitPointSize(self, Point dstPt, Size dstSize, DC source, Point srcPt,
3813
Size srcSize, int rop=COPY, bool useMask=False,
3814
Point srcMaskPt=DefaultPosition) -> bool
3816
Copy from a source DC to this DC, specifying the destination
3817
coordinates, destination size, source DC, source coordinates, size of
3818
source area to copy, logical function, whether to use a bitmap mask,
3819
and mask source position. This version is the same as `StretchBlit`
3820
except `wx.Point` and `wx.Size` objects are used instead of individual
3821
position and size components.
3823
return _gdi_.DC_StretchBlitPointSize(*args, **kwargs)
3825
def GetAsBitmap(*args, **kwargs):
3826
"""GetAsBitmap(self, Rect subrect=None) -> Bitmap"""
3827
return _gdi_.DC_GetAsBitmap(*args, **kwargs)
3829
def SetClippingRegion(*args, **kwargs):
3831
SetClippingRegion(self, int x, int y, int width, int height)
3833
Sets the clipping region for this device context to the intersection
3834
of the given region described by the parameters of this method and the
3835
previously set clipping region. You should call `DestroyClippingRegion`
3836
if you want to set the clipping region exactly to the region
3839
The clipping region is an area to which drawing is
3840
restricted. Possible uses for the clipping region are for clipping
3841
text or for speeding up window redraws when only a known area of the
3844
return _gdi_.DC_SetClippingRegion(*args, **kwargs)
3846
def SetClippingRegionPointSize(*args, **kwargs):
3848
SetClippingRegionPointSize(self, Point pt, Size sz)
3850
Sets the clipping region for this device context to the intersection
3851
of the given region described by the parameters of this method and the
3852
previously set clipping region. You should call `DestroyClippingRegion`
3853
if you want to set the clipping region exactly to the region
3856
The clipping region is an area to which drawing is
3857
restricted. Possible uses for the clipping region are for clipping
3858
text or for speeding up window redraws when only a known area of the
3861
return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
3863
def SetClippingRegionAsRegion(*args, **kwargs):
3865
SetClippingRegionAsRegion(self, Region region)
3867
Sets the clipping region for this device context to the intersection
3868
of the given region described by the parameters of this method and the
3869
previously set clipping region. You should call `DestroyClippingRegion`
3870
if you want to set the clipping region exactly to the region
3873
The clipping region is an area to which drawing is
3874
restricted. Possible uses for the clipping region are for clipping
3875
text or for speeding up window redraws when only a known area of the
3878
return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
3880
def SetClippingRect(*args, **kwargs):
3882
SetClippingRect(self, Rect rect)
3884
Sets the clipping region for this device context to the intersection
3885
of the given region described by the parameters of this method and the
3886
previously set clipping region. You should call `DestroyClippingRegion`
3887
if you want to set the clipping region exactly to the region
3890
The clipping region is an area to which drawing is
3891
restricted. Possible uses for the clipping region are for clipping
3892
text or for speeding up window redraws when only a known area of the
3895
return _gdi_.DC_SetClippingRect(*args, **kwargs)
3897
def SetDeviceClippingRegion(*args, **kwargs):
3899
SetDeviceClippingRegion(self, Region region)
3901
The coordinates of the region used in this method one are in device
3902
coordinates, not the logical ones
3904
return _gdi_.DC_SetDeviceClippingRegion(*args, **kwargs)
3906
def DrawLines(*args, **kwargs):
3908
DrawLines(self, List points, int xoffset=0, int yoffset=0)
3910
Draws lines using a sequence of `wx.Point` objects, adding the
3911
optional offset coordinate. The current pen is used for drawing the
3914
return _gdi_.DC_DrawLines(*args, **kwargs)
3916
def DrawPolygon(*args, **kwargs):
3918
DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3919
wxPolygonFillMode fillStyle=ODDEVEN_RULE)
3921
Draws a filled polygon using a sequence of `wx.Point` objects, adding
3922
the optional offset coordinate. The last argument specifies the fill
3923
rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3925
The current pen is used for drawing the outline, and the current brush
3926
for filling the shape. Using a transparent brush suppresses
3927
filling. Note that wxWidgets automatically closes the first and last
3930
return _gdi_.DC_DrawPolygon(*args, **kwargs)
3932
def DrawLabel(*args, **kwargs):
3934
DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3937
Draw *text* within the specified rectangle, abiding by the alignment
3938
flags. Will additionally emphasize the character at *indexAccel* if
3941
return _gdi_.DC_DrawLabel(*args, **kwargs)
3943
def DrawImageLabel(*args, **kwargs):
3945
DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3946
int indexAccel=-1) -> Rect
3948
Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3949
drawing it) within the specified rectangle, abiding by the alignment
3950
flags. Will additionally emphasize the character at *indexAccel* if
3951
it is not -1. Returns the bounding rectangle.
3953
return _gdi_.DC_DrawImageLabel(*args, **kwargs)
3955
def DrawSpline(*args, **kwargs):
3957
DrawSpline(self, List points)
3959
Draws a spline between all given control points, (a list of `wx.Point`
3960
objects) using the current pen. The spline is drawn using a series of
3961
lines, using an algorithm taken from the X drawing program 'XFIG'.
3963
return _gdi_.DC_DrawSpline(*args, **kwargs)
3965
def Clear(*args, **kwargs):
3969
Clears the device context using the current background brush.
3971
return _gdi_.DC_Clear(*args, **kwargs)
3973
def StartDoc(*args, **kwargs):
3975
StartDoc(self, String message) -> bool
3977
Starts a document (only relevant when outputting to a
3978
printer). *Message* is a message to show whilst printing.
3980
return _gdi_.DC_StartDoc(*args, **kwargs)
3982
def EndDoc(*args, **kwargs):
3986
Ends a document (only relevant when outputting to a printer).
3988
return _gdi_.DC_EndDoc(*args, **kwargs)
3990
def StartPage(*args, **kwargs):
3994
Starts a document page (only relevant when outputting to a printer).
3996
return _gdi_.DC_StartPage(*args, **kwargs)
3998
def EndPage(*args, **kwargs):
4002
Ends a document page (only relevant when outputting to a printer).
4004
return _gdi_.DC_EndPage(*args, **kwargs)
4006
def SetFont(*args, **kwargs):
4008
SetFont(self, Font font)
4010
Sets the current font for the DC. It must be a valid font, in
4011
particular you should not pass ``wx.NullFont`` to this method.
4013
return _gdi_.DC_SetFont(*args, **kwargs)
4015
def SetPen(*args, **kwargs):
4017
SetPen(self, Pen pen)
4019
Sets the current pen for the DC.
4021
If the argument is ``wx.NullPen``, the current pen is selected out of the
4022
device context, and the original pen restored.
4024
return _gdi_.DC_SetPen(*args, **kwargs)
4026
def SetBrush(*args, **kwargs):
4028
SetBrush(self, Brush brush)
4030
Sets the current brush for the DC.
4032
If the argument is ``wx.NullBrush``, the current brush is selected out
4033
of the device context, and the original brush restored, allowing the
4034
current brush to be destroyed safely.
4036
return _gdi_.DC_SetBrush(*args, **kwargs)
4038
def SetBackground(*args, **kwargs):
4040
SetBackground(self, Brush brush)
4042
Sets the current background brush for the DC.
4044
return _gdi_.DC_SetBackground(*args, **kwargs)
4046
def SetBackgroundMode(*args, **kwargs):
4048
SetBackgroundMode(self, int mode)
4050
*mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
4051
determines whether text will be drawn with a background colour or
4054
return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
4056
def SetPalette(*args, **kwargs):
4058
SetPalette(self, Palette palette)
4060
If this is a window DC or memory DC, assigns the given palette to the
4061
window or bitmap associated with the DC. If the argument is
4062
``wx.NullPalette``, the current palette is selected out of the device
4063
context, and the original palette restored.
4065
return _gdi_.DC_SetPalette(*args, **kwargs)
4067
def DestroyClippingRegion(*args, **kwargs):
4069
DestroyClippingRegion(self)
4071
Destroys the current clipping region so that none of the DC is
4074
return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
4076
def GetClippingBox(*args, **kwargs):
4078
GetClippingBox() -> (x, y, width, height)
4080
Gets the rectangle surrounding the current clipping region.
4082
return _gdi_.DC_GetClippingBox(*args, **kwargs)
4084
def GetClippingRect(*args, **kwargs):
4086
GetClippingRect(self) -> Rect
4088
Gets the rectangle surrounding the current clipping region.
4090
return _gdi_.DC_GetClippingRect(*args, **kwargs)
4092
def GetCharHeight(*args, **kwargs):
4094
GetCharHeight(self) -> int
4096
Gets the character height of the currently set font.
4098
return _gdi_.DC_GetCharHeight(*args, **kwargs)
4100
def GetCharWidth(*args, **kwargs):
4102
GetCharWidth(self) -> int
4104
Gets the average character width of the currently set font.
4106
return _gdi_.DC_GetCharWidth(*args, **kwargs)
4108
def GetFontMetrics(*args, **kwargs):
4109
"""GetFontMetrics(self) -> FontMetrics"""
4110
return _gdi_.DC_GetFontMetrics(*args, **kwargs)
4112
def GetTextExtent(*args, **kwargs):
4114
GetTextExtent(wxString string) -> (width, height)
4116
Get the width and height of the text using the current font. Only
4117
works for single line strings.
4119
return _gdi_.DC_GetTextExtent(*args, **kwargs)
4121
def GetFullTextExtent(*args, **kwargs):
4123
GetFullTextExtent(wxString string, Font font=None) ->
4124
(width, height, descent, externalLeading)
4126
Get the width, height, decent and leading of the text using the
4127
current or specified font. Only works for single line strings.
4129
return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
4131
def GetMultiLineTextExtent(*args, **kwargs):
4133
GetMultiLineTextExtent(wxString string, Font font=None) ->
4134
(width, height, lineHeight)
4136
Get the width, height, and line height of the text using the
4137
current or specified font. Works for single as well as multi-line
4140
return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
4142
def GetPartialTextExtents(*args, **kwargs):
4144
GetPartialTextExtents(self, text) -> [widths]
4146
Returns a list of integers such that each value is the distance in
4147
pixels from the begining of text to the coresponding character of
4148
*text*. The generic version simply builds a running total of the widths
4149
of each character using GetTextExtent, however if the various
4150
platforms have a native API function that is faster or more accurate
4151
than the generic implementation then it will be used instead.
4153
return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
4155
def GetSize(*args, **kwargs):
4157
GetSize(self) -> Size
4159
This gets the horizontal and vertical resolution in device units. It
4160
can be used to scale graphics to fit the page. For example, if *maxX*
4161
and *maxY* represent the maximum horizontal and vertical 'pixel' values
4162
used in your application, the following code will scale the graphic to
4163
fit on the printer page::
4166
scaleX = maxX*1.0 / w
4167
scaleY = maxY*1.0 / h
4168
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
4171
return _gdi_.DC_GetSize(*args, **kwargs)
4173
def GetSizeTuple(*args, **kwargs):
4175
GetSizeTuple() -> (width, height)
4177
This gets the horizontal and vertical resolution in device units. It
4178
can be used to scale graphics to fit the page. For example, if *maxX*
4179
and *maxY* represent the maximum horizontal and vertical 'pixel' values
4180
used in your application, the following code will scale the graphic to
4181
fit on the printer page::
4184
scaleX = maxX*1.0 / w
4185
scaleY = maxY*1.0 / h
4186
dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
4189
return _gdi_.DC_GetSizeTuple(*args, **kwargs)
4191
def GetSizeMM(*args, **kwargs):
4193
GetSizeMM(self) -> Size
4195
Get the DC size in milimeters.
4197
return _gdi_.DC_GetSizeMM(*args, **kwargs)
4199
def GetSizeMMTuple(*args, **kwargs):
4201
GetSizeMMTuple() -> (width, height)
4203
Get the DC size in milimeters.
4205
return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
4207
def GetResolution(*args, **kwargs):
4208
"""GetResolution(self) -> int"""
4209
return _gdi_.DC_GetResolution(*args, **kwargs)
4211
def DeviceToLogicalX(*args, **kwargs):
4213
DeviceToLogicalX(self, int x) -> int
4215
Convert device X coordinate to logical coordinate, using the current
4218
return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
4220
def DeviceToLogicalY(*args, **kwargs):
4222
DeviceToLogicalY(self, int y) -> int
4224
Converts device Y coordinate to logical coordinate, using the current
4227
return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
4229
def DeviceToLogicalXRel(*args, **kwargs):
4231
DeviceToLogicalXRel(self, int x) -> int
4233
Convert device X coordinate to relative logical coordinate, using the
4234
current mapping mode but ignoring the x axis orientation. Use this
4235
function for converting a width, for example.
4237
return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
4239
def DeviceToLogicalYRel(*args, **kwargs):
4241
DeviceToLogicalYRel(self, int y) -> int
4243
Convert device Y coordinate to relative logical coordinate, using the
4244
current mapping mode but ignoring the y axis orientation. Use this
4245
function for converting a height, for example.
4247
return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
4249
def LogicalToDeviceX(*args, **kwargs):
4251
LogicalToDeviceX(self, int x) -> int
4253
Converts logical X coordinate to device coordinate, using the current
4256
return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
4258
def LogicalToDeviceY(*args, **kwargs):
4260
LogicalToDeviceY(self, int y) -> int
4262
Converts logical Y coordinate to device coordinate, using the current
4265
return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
4267
def LogicalToDeviceXRel(*args, **kwargs):
4269
LogicalToDeviceXRel(self, int x) -> int
4271
Converts logical X coordinate to relative device coordinate, using the
4272
current mapping mode but ignoring the x axis orientation. Use this for
4273
converting a width, for example.
4275
return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
4277
def LogicalToDeviceYRel(*args, **kwargs):
4279
LogicalToDeviceYRel(self, int y) -> int
4281
Converts logical Y coordinate to relative device coordinate, using the
4282
current mapping mode but ignoring the y axis orientation. Use this for
4283
converting a height, for example.
4285
return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
4287
def CanDrawBitmap(*args, **kwargs):
4288
"""CanDrawBitmap(self) -> bool"""
4289
return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
4291
def CanGetTextExtent(*args, **kwargs):
4292
"""CanGetTextExtent(self) -> bool"""
4293
return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
4295
def GetDepth(*args, **kwargs):
4297
GetDepth(self) -> int
4299
Returns the colour depth of the DC.
4301
return _gdi_.DC_GetDepth(*args, **kwargs)
4303
def GetPPI(*args, **kwargs):
4305
GetPPI(self) -> Size
4307
Resolution in pixels per inch
4309
return _gdi_.DC_GetPPI(*args, **kwargs)
4311
def IsOk(*args, **kwargs):
4315
Returns true if the DC is ok to use.
4317
return _gdi_.DC_IsOk(*args, **kwargs)
4320
def GetBackgroundMode(*args, **kwargs):
4322
GetBackgroundMode(self) -> int
4324
Returns the current background mode, either ``wx.SOLID`` or
4327
return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
4329
def GetBackground(*args, **kwargs):
4331
GetBackground(self) -> Brush
4333
Gets the brush used for painting the background.
4335
return _gdi_.DC_GetBackground(*args, **kwargs)
4337
def GetBrush(*args, **kwargs):
4339
GetBrush(self) -> Brush
4341
Gets the current brush
4343
return _gdi_.DC_GetBrush(*args, **kwargs)
4345
def GetFont(*args, **kwargs):
4347
GetFont(self) -> Font
4349
Gets the current font
4351
return _gdi_.DC_GetFont(*args, **kwargs)
4353
def GetPen(*args, **kwargs):
4357
Gets the current pen
4359
return _gdi_.DC_GetPen(*args, **kwargs)
4361
def GetTextBackground(*args, **kwargs):
4363
GetTextBackground(self) -> Colour
4365
Gets the current text background colour
4367
return _gdi_.DC_GetTextBackground(*args, **kwargs)
4369
def GetTextForeground(*args, **kwargs):
4371
GetTextForeground(self) -> Colour
4373
Gets the current text foreground colour
4375
return _gdi_.DC_GetTextForeground(*args, **kwargs)
4377
def SetTextForeground(*args, **kwargs):
4379
SetTextForeground(self, Colour colour)
4381
Sets the current text foreground colour for the DC.
4383
return _gdi_.DC_SetTextForeground(*args, **kwargs)
4385
def SetTextBackground(*args, **kwargs):
4387
SetTextBackground(self, Colour colour)
4389
Sets the current text background colour for the DC.
4391
return _gdi_.DC_SetTextBackground(*args, **kwargs)
4393
def GetMapMode(*args, **kwargs):
4395
GetMapMode(self) -> int
4397
Gets the current *mapping mode* for the device context
4399
return _gdi_.DC_GetMapMode(*args, **kwargs)
4401
def SetMapMode(*args, **kwargs):
4403
SetMapMode(self, int mode)
4405
The *mapping mode* of the device context defines the unit of
4406
measurement used to convert logical units to device units. The
4407
mapping mode can be one of the following:
4409
================ =============================================
4410
wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
4412
wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
4413
wx.MM_METRIC Each logical unit is 1 mm.
4414
wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
4415
wx.MM_TEXT Each logical unit is 1 pixel.
4416
================ =============================================
4419
return _gdi_.DC_SetMapMode(*args, **kwargs)
4421
def GetUserScale(*args, **kwargs):
4423
GetUserScale(self) -> (xScale, yScale)
4425
Gets the current user scale factor (set by `SetUserScale`).
4427
return _gdi_.DC_GetUserScale(*args, **kwargs)
4429
def SetUserScale(*args, **kwargs):
4431
SetUserScale(self, double x, double y)
4433
Sets the user scaling factor, useful for applications which require
4436
return _gdi_.DC_SetUserScale(*args, **kwargs)
4438
def GetLogicalScale(*args, **kwargs):
4439
"""GetLogicalScale() -> (xScale, yScale)"""
4440
return _gdi_.DC_GetLogicalScale(*args, **kwargs)
4442
def SetLogicalScale(*args, **kwargs):
4443
"""SetLogicalScale(self, double x, double y)"""
4444
return _gdi_.DC_SetLogicalScale(*args, **kwargs)
4446
def GetLogicalOrigin(*args, **kwargs):
4447
"""GetLogicalOrigin(self) -> Point"""
4448
return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
4450
def GetLogicalOriginTuple(*args, **kwargs):
4451
"""GetLogicalOriginTuple() -> (x,y)"""
4452
return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
4454
def SetLogicalOrigin(*args, **kwargs):
4455
"""SetLogicalOrigin(self, int x, int y)"""
4456
return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
4458
def SetLogicalOriginPoint(*args, **kwargs):
4459
"""SetLogicalOriginPoint(self, Point point)"""
4460
return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
4462
def GetDeviceOrigin(*args, **kwargs):
4463
"""GetDeviceOrigin(self) -> Point"""
4464
return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
4466
def GetDeviceOriginTuple(*args, **kwargs):
4467
"""GetDeviceOriginTuple() -> (x,y)"""
4468
return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
4470
def SetDeviceOrigin(*args, **kwargs):
4471
"""SetDeviceOrigin(self, int x, int y)"""
4472
return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
4474
def SetDeviceOriginPoint(*args, **kwargs):
4475
"""SetDeviceOriginPoint(self, Point point)"""
4476
return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
4478
def SetAxisOrientation(*args, **kwargs):
4480
SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
4482
Sets the x and y axis orientation (i.e., the direction from lowest to
4483
highest values on the axis). The default orientation is the natural
4484
orientation, e.g. x axis from left to right and y axis from bottom up.
4486
return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
4488
def GetLogicalFunction(*args, **kwargs):
4490
GetLogicalFunction(self) -> int
4492
Gets the current logical function (set by `SetLogicalFunction`).
4494
return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
4496
def SetLogicalFunction(*args, **kwargs):
4498
SetLogicalFunction(self, int function)
4500
Sets the current logical function for the device context. This
4501
determines how a source pixel (from a pen or brush colour, or source
4502
device context if using `Blit`) combines with a destination pixel in
4503
the current device context.
4505
The possible values and their meaning in terms of source and
4506
destination pixel values are as follows:
4508
================ ==========================
4510
wx.AND_INVERT (NOT src) AND dst
4511
wx.AND_REVERSE src AND (NOT dst)
4514
wx.EQUIV (NOT src) XOR dst
4516
wx.NAND (NOT src) OR (NOT dst)
4517
wx.NOR (NOT src) AND (NOT dst)
4520
wx.OR_INVERT (NOT src) OR dst
4521
wx.OR_REVERSE src OR (NOT dst)
4523
wx.SRC_INVERT NOT src
4525
================ ==========================
4527
The default is wx.COPY, which simply draws with the current
4528
colour. The others combine the current colour and the background using
4529
a logical operation. wx.INVERT is commonly used for drawing rubber
4530
bands or moving outlines, since drawing twice reverts to the original
4534
return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
4536
def SetOptimization(self, optimize):
4538
def GetOptimization(self):
4541
SetOptimization = wx.deprecated(SetOptimization)
4542
GetOptimization = wx.deprecated(GetOptimization)
4544
def CalcBoundingBox(*args, **kwargs):
4546
CalcBoundingBox(self, int x, int y)
4548
Adds the specified point to the bounding box which can be retrieved
4549
with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4551
return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
4553
def CalcBoundingBoxPoint(*args, **kwargs):
4555
CalcBoundingBoxPoint(self, Point point)
4557
Adds the specified point to the bounding box which can be retrieved
4558
with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4560
return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
4562
def ResetBoundingBox(*args, **kwargs):
4564
ResetBoundingBox(self)
4566
Resets the bounding box: after a call to this function, the bounding
4567
box doesn't contain anything.
4569
return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
4571
def MinX(*args, **kwargs):
4575
Gets the minimum horizontal extent used in drawing commands so far.
4577
return _gdi_.DC_MinX(*args, **kwargs)
4579
def MaxX(*args, **kwargs):
4583
Gets the maximum horizontal extent used in drawing commands so far.
4585
return _gdi_.DC_MaxX(*args, **kwargs)
4587
def MinY(*args, **kwargs):
4591
Gets the minimum vertical extent used in drawing commands so far.
4593
return _gdi_.DC_MinY(*args, **kwargs)
4595
def MaxY(*args, **kwargs):
4599
Gets the maximum vertical extent used in drawing commands so far.
4601
return _gdi_.DC_MaxY(*args, **kwargs)
4603
def GetBoundingBox(*args, **kwargs):
4605
GetBoundingBox() -> (x1,y1, x2,y2)
4607
Returns the min and max points used in drawing commands so far.
4609
return _gdi_.DC_GetBoundingBox(*args, **kwargs)
4611
def __nonzero__(self): return self.IsOk()
4612
def GetLayoutDirection(*args, **kwargs):
4614
GetLayoutDirection(self) -> int
4616
Get the layout direction (LTR or RTL)_ for this dc. On platforms
4617
where RTL layout is supported, the return value will either be
4618
``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
4619
``wx.Layout_Default`` is returned if layout direction is not
4622
return _gdi_.DC_GetLayoutDirection(*args, **kwargs)
4624
def SetLayoutDirection(*args, **kwargs):
4626
SetLayoutDirection(self, int dir)
4628
Change the layout direction for this dc.
4630
return _gdi_.DC_SetLayoutDirection(*args, **kwargs)
4632
def GetHDC(*args, **kwargs):
4633
"""GetHDC(self) -> long"""
4634
return _gdi_.DC_GetHDC(*args, **kwargs)
4636
def GetCGContext(*args, **kwargs):
4637
"""GetCGContext(self) -> void"""
4638
return _gdi_.DC_GetCGContext(*args, **kwargs)
4640
def _DrawPointList(*args, **kwargs):
4641
"""_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4642
return _gdi_.DC__DrawPointList(*args, **kwargs)
4644
def _DrawLineList(*args, **kwargs):
4645
"""_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4646
return _gdi_.DC__DrawLineList(*args, **kwargs)
4648
def _DrawRectangleList(*args, **kwargs):
4649
"""_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4650
return _gdi_.DC__DrawRectangleList(*args, **kwargs)
4652
def _DrawEllipseList(*args, **kwargs):
4653
"""_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4654
return _gdi_.DC__DrawEllipseList(*args, **kwargs)
4656
def _DrawPolygonList(*args, **kwargs):
4657
"""_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4658
return _gdi_.DC__DrawPolygonList(*args, **kwargs)
4660
def _DrawTextList(*args, **kwargs):
4662
_DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4663
PyObject backgroundList) -> PyObject
4665
return _gdi_.DC__DrawTextList(*args, **kwargs)
4667
def DrawPointList(self, points, pens=None):
4669
Draw a list of points as quickly as possible.
4671
:param points: A sequence of 2-element sequences representing
4672
each point to draw, (x,y).
4673
:param pens: If None, then the current pen is used. If a
4674
single pen then it will be used for all points. If
4675
a list of pens then there should be one for each point
4680
elif isinstance(pens, wx.Pen):
4682
elif len(pens) != len(points):
4683
raise ValueError('points and pens must have same length')
4684
return self._DrawPointList(points, pens, [])
4687
def DrawLineList(self, lines, pens=None):
4689
Draw a list of lines as quickly as possible.
4691
:param lines: A sequence of 4-element sequences representing
4692
each line to draw, (x1,y1, x2,y2).
4693
:param pens: If None, then the current pen is used. If a
4694
single pen then it will be used for all lines. If
4695
a list of pens then there should be one for each line
4700
elif isinstance(pens, wx.Pen):
4702
elif len(pens) != len(lines):
4703
raise ValueError('lines and pens must have same length')
4704
return self._DrawLineList(lines, pens, [])
4707
def DrawRectangleList(self, rectangles, pens=None, brushes=None):
4709
Draw a list of rectangles as quickly as possible.
4711
:param rectangles: A sequence of 4-element sequences representing
4712
each rectangle to draw, (x,y, w,h).
4713
:param pens: If None, then the current pen is used. If a
4714
single pen then it will be used for all rectangles.
4715
If a list of pens then there should be one for each
4716
rectangle in rectangles.
4717
:param brushes: A brush or brushes to be used to fill the rectagles,
4718
with similar semantics as the pens parameter.
4722
elif isinstance(pens, wx.Pen):
4724
elif len(pens) != len(rectangles):
4725
raise ValueError('rectangles and pens must have same length')
4728
elif isinstance(brushes, wx.Brush):
4730
elif len(brushes) != len(rectangles):
4731
raise ValueError('rectangles and brushes must have same length')
4732
return self._DrawRectangleList(rectangles, pens, brushes)
4735
def DrawEllipseList(self, ellipses, pens=None, brushes=None):
4737
Draw a list of ellipses as quickly as possible.
4739
:param ellipses: A sequence of 4-element sequences representing
4740
each ellipse to draw, (x,y, w,h).
4741
:param pens: If None, then the current pen is used. If a
4742
single pen then it will be used for all ellipses.
4743
If a list of pens then there should be one for each
4744
ellipse in ellipses.
4745
:param brushes: A brush or brushes to be used to fill the ellipses,
4746
with similar semantics as the pens parameter.
4750
elif isinstance(pens, wx.Pen):
4752
elif len(pens) != len(ellipses):
4753
raise ValueError('ellipses and pens must have same length')
4756
elif isinstance(brushes, wx.Brush):
4758
elif len(brushes) != len(ellipses):
4759
raise ValueError('ellipses and brushes must have same length')
4760
return self._DrawEllipseList(ellipses, pens, brushes)
4763
def DrawPolygonList(self, polygons, pens=None, brushes=None):
4765
Draw a list of polygons, each of which is a list of points.
4767
:param polygons: A sequence of sequences of sequences.
4768
[[(x1,y1),(x2,y2),(x3,y3)...],
4769
[(x1,y1),(x2,y2),(x3,y3)...]]
4771
:param pens: If None, then the current pen is used. If a
4772
single pen then it will be used for all polygons.
4773
If a list of pens then there should be one for each
4775
:param brushes: A brush or brushes to be used to fill the polygons,
4776
with similar semantics as the pens parameter.
4780
elif isinstance(pens, wx.Pen):
4782
elif len(pens) != len(polygons):
4783
raise ValueError('polygons and pens must have same length')
4786
elif isinstance(brushes, wx.Brush):
4788
elif len(brushes) != len(polygons):
4789
raise ValueError('polygons and brushes must have same length')
4790
return self._DrawPolygonList(polygons, pens, brushes)
4793
def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
4795
Draw a list of strings using a list of coordinants for positioning each string.
4797
:param textList: A list of strings
4798
:param coords: A list of (x,y) positions
4799
:param foregrounds: A list of `wx.Colour` objects to use for the
4800
foregrounds of the strings.
4801
:param backgrounds: A list of `wx.Colour` objects to use for the
4802
backgrounds of the strings.
4804
NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4805
If you want backgrounds to do anything.
4807
if type(textList) == type(''):
4808
textList = [textList]
4809
elif len(textList) != len(coords):
4810
raise ValueError('textlist and coords must have same length')
4811
if foregrounds is None:
4813
elif isinstance(foregrounds, wx.Colour):
4814
foregrounds = [foregrounds]
4815
elif len(foregrounds) != len(coords):
4816
raise ValueError('foregrounds and coords must have same length')
4817
if backgrounds is None:
4819
elif isinstance(backgrounds, wx.Colour):
4820
backgrounds = [backgrounds]
4821
elif len(backgrounds) != len(coords):
4822
raise ValueError('backgrounds and coords must have same length')
4823
return self._DrawTextList(textList, coords, foregrounds, backgrounds)
4825
Background = property(GetBackground,SetBackground,doc="See `GetBackground` and `SetBackground`")
4826
BackgroundMode = property(GetBackgroundMode,SetBackgroundMode,doc="See `GetBackgroundMode` and `SetBackgroundMode`")
4827
BoundingBox = property(GetBoundingBox,doc="See `GetBoundingBox`")
4828
Brush = property(GetBrush,SetBrush,doc="See `GetBrush` and `SetBrush`")
4829
CharHeight = property(GetCharHeight,doc="See `GetCharHeight`")
4830
CharWidth = property(GetCharWidth,doc="See `GetCharWidth`")
4831
ClippingBox = property(GetClippingBox,doc="See `GetClippingBox`")
4832
ClippingRect = property(GetClippingRect,SetClippingRect,doc="See `GetClippingRect` and `SetClippingRect`")
4833
Depth = property(GetDepth,doc="See `GetDepth`")
4834
DeviceOrigin = property(GetDeviceOrigin,SetDeviceOrigin,doc="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4835
Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
4836
FullTextExtent = property(GetFullTextExtent,doc="See `GetFullTextExtent`")
4837
LogicalFunction = property(GetLogicalFunction,SetLogicalFunction,doc="See `GetLogicalFunction` and `SetLogicalFunction`")
4838
LogicalOrigin = property(GetLogicalOrigin,SetLogicalOrigin,doc="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4839
LogicalScale = property(GetLogicalScale,SetLogicalScale,doc="See `GetLogicalScale` and `SetLogicalScale`")
4840
MapMode = property(GetMapMode,SetMapMode,doc="See `GetMapMode` and `SetMapMode`")
4841
MultiLineTextExtent = property(GetMultiLineTextExtent,doc="See `GetMultiLineTextExtent`")
4842
Optimization = property(GetOptimization,SetOptimization,doc="See `GetOptimization` and `SetOptimization`")
4843
PPI = property(GetPPI,doc="See `GetPPI`")
4844
PartialTextExtents = property(GetPartialTextExtents,doc="See `GetPartialTextExtents`")
4845
Pen = property(GetPen,SetPen,doc="See `GetPen` and `SetPen`")
4846
Size = property(GetSize,doc="See `GetSize`")
4847
SizeMM = property(GetSizeMM,doc="See `GetSizeMM`")
4848
TextBackground = property(GetTextBackground,SetTextBackground,doc="See `GetTextBackground` and `SetTextBackground`")
4849
TextExtent = property(GetTextExtent,doc="See `GetTextExtent`")
4850
TextForeground = property(GetTextForeground,SetTextForeground,doc="See `GetTextForeground` and `SetTextForeground`")
4851
UserScale = property(GetUserScale,SetUserScale,doc="See `GetUserScale` and `SetUserScale`")
4852
LayoutDirection = property(GetLayoutDirection,SetLayoutDirection)
4853
_gdi_.DC_swigregister(DC)
4855
#---------------------------------------------------------------------------
4857
class DCTextColourChanger(object):
4859
wx.DCTextColourChanger can be used to temporarily change the DC text
4860
colour and restore it automatically when the object goes out of scope
4862
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4863
__repr__ = _swig_repr
4864
def __init__(self, *args, **kwargs):
4866
__init__(self, DC dc, Colour col) -> DCTextColourChanger
4868
wx.DCTextColourChanger can be used to temporarily change the DC text
4869
colour and restore it automatically when the object goes out of scope
4871
_gdi_.DCTextColourChanger_swiginit(self,_gdi_.new_DCTextColourChanger(*args, **kwargs))
4872
__swig_destroy__ = _gdi_.delete_DCTextColourChanger
4873
__del__ = lambda self : None;
4874
def __enter__(self):
4876
def __exit__(self, exc_type, exc_val, exc_tb):
4879
_gdi_.DCTextColourChanger_swigregister(DCTextColourChanger)
4881
class DCPenChanger(object):
4883
wx.DCPenChanger can be used to temporarily change the DC pen and
4884
restore it automatically when the object goes out of scope
4886
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4887
__repr__ = _swig_repr
4888
def __init__(self, *args, **kwargs):
4890
__init__(self, DC dc, Pen pen) -> DCPenChanger
4892
wx.DCPenChanger can be used to temporarily change the DC pen and
4893
restore it automatically when the object goes out of scope
4895
_gdi_.DCPenChanger_swiginit(self,_gdi_.new_DCPenChanger(*args, **kwargs))
4896
__swig_destroy__ = _gdi_.delete_DCPenChanger
4897
__del__ = lambda self : None;
4898
def __enter__(self):
4900
def __exit__(self, exc_type, exc_val, exc_tb):
4903
_gdi_.DCPenChanger_swigregister(DCPenChanger)
4905
class DCBrushChanger(object):
4907
wx.DCBrushChanger can be used to temporarily change the DC brush and
4908
restore it automatically when the object goes out of scope
4910
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4911
__repr__ = _swig_repr
4912
def __init__(self, *args, **kwargs):
4914
__init__(self, DC dc, Brush brush) -> DCBrushChanger
4916
wx.DCBrushChanger can be used to temporarily change the DC brush and
4917
restore it automatically when the object goes out of scope
4919
_gdi_.DCBrushChanger_swiginit(self,_gdi_.new_DCBrushChanger(*args, **kwargs))
4920
__swig_destroy__ = _gdi_.delete_DCBrushChanger
4921
__del__ = lambda self : None;
4922
def __enter__(self):
4924
def __exit__(self, exc_type, exc_val, exc_tb):
4927
_gdi_.DCBrushChanger_swigregister(DCBrushChanger)
4929
class DCClipper(object):
4931
wx.wxDCClipper sets the DC's clipping region when it is constructed,
4932
and then automatically destroys the clipping region when the clipper
4935
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4936
__repr__ = _swig_repr
4937
def __init__(self, *args):
4939
__init__(self, DC dc, Region r) -> DCClipper
4940
__init__(self, DC dc, Rect r) -> DCClipper
4941
__init__(self, DC dc, int x, int y, int w, int h) -> DCClipper
4943
wx.wxDCClipper sets the DC's clipping region when it is constructed,
4944
and then automatically destroys the clipping region when the clipper
4947
_gdi_.DCClipper_swiginit(self,_gdi_.new_DCClipper(*args))
4948
__swig_destroy__ = _gdi_.delete_DCClipper
4949
__del__ = lambda self : None;
4950
def __enter__(self):
4952
def __exit__(self, exc_type, exc_val, exc_tb):
4955
_gdi_.DCClipper_swigregister(DCClipper)
4957
class DCFontChanger(object):
4959
wx.wxDCFontChanger sets the DC's font when it is constructed,
4960
and then restores the old font whrn it goes out of scope.
4962
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4963
__repr__ = _swig_repr
4964
def __init__(self, *args, **kwargs):
4966
__init__(self, DC dc, Font font) -> DCFontChanger
4968
wx.wxDCFontChanger sets the DC's font when it is constructed,
4969
and then restores the old font whrn it goes out of scope.
4971
_gdi_.DCFontChanger_swiginit(self,_gdi_.new_DCFontChanger(*args, **kwargs))
4972
__swig_destroy__ = _gdi_.delete_DCFontChanger
4973
__del__ = lambda self : None;
4974
def Set(*args, **kwargs):
4975
"""Set(self, Font font)"""
4976
return _gdi_.DCFontChanger_Set(*args, **kwargs)
4978
_gdi_.DCFontChanger_swigregister(DCFontChanger)
4980
#---------------------------------------------------------------------------
4984
A wxScreenDC can be used to paint anywhere on the screen. This should
4985
normally be constructed as a temporary stack object; don't store a
4989
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4990
__repr__ = _swig_repr
4991
def __init__(self, *args, **kwargs):
4993
__init__(self) -> ScreenDC
4995
A wxScreenDC can be used to paint anywhere on the screen. This should
4996
normally be constructed as a temporary stack object; don't store a
5000
_gdi_.ScreenDC_swiginit(self,_gdi_.new_ScreenDC(*args, **kwargs))
5001
def StartDrawingOnTopWin(*args, **kwargs):
5003
StartDrawingOnTopWin(self, Window window) -> bool
5005
Specify that the area of the screen to be drawn upon coincides with
5008
:see: `EndDrawingOnTop`
5010
return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
5012
def StartDrawingOnTop(*args, **kwargs):
5014
StartDrawingOnTop(self, Rect rect=None) -> bool
5016
Specify that the area is the given rectangle, or the whole screen if
5019
:see: `EndDrawingOnTop`
5021
return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
5023
def EndDrawingOnTop(*args, **kwargs):
5025
EndDrawingOnTop(self) -> bool
5027
Use this in conjunction with `StartDrawingOnTop` or
5028
`StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
5029
top of existing windows. Without this, some window systems (such as X)
5030
only allow drawing to take place underneath other windows.
5032
You might use this pair of functions when implementing a drag feature,
5033
for example as in the `wx.SplitterWindow` implementation.
5035
These functions are probably obsolete since the X implementations
5036
allow drawing directly on the screen now. However, the fact that this
5037
function allows the screen to be refreshed afterwards may be useful
5038
to some applications.
5040
return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
5042
_gdi_.ScreenDC_swigregister(ScreenDC)
5044
#---------------------------------------------------------------------------
5048
A wx.WindowDC must be constructed if an application wishes to paint on
5049
the whole area of a window (client and decorations). This should
5050
normally be constructed as a temporary stack object; don't store a
5053
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5054
__repr__ = _swig_repr
5055
def __init__(self, *args, **kwargs):
5057
__init__(self, Window win) -> WindowDC
5059
Constructor. Pass the window on which you wish to paint.
5061
_gdi_.WindowDC_swiginit(self,_gdi_.new_WindowDC(*args, **kwargs))
5062
_gdi_.WindowDC_swigregister(WindowDC)
5064
#---------------------------------------------------------------------------
5066
class ClientDC(WindowDC):
5068
A wx.ClientDC must be constructed if an application wishes to paint on
5069
the client area of a window from outside an EVT_PAINT event. This should
5070
normally be constructed as a temporary stack object; don't store a
5071
wx.ClientDC object long term.
5073
To draw on a window from within an EVT_PAINT handler, construct a
5074
`wx.PaintDC` object.
5076
To draw on the whole window including decorations, construct a
5077
`wx.WindowDC` object (Windows only).
5080
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5081
__repr__ = _swig_repr
5082
def __init__(self, *args, **kwargs):
5084
__init__(self, Window win) -> ClientDC
5086
Constructor. Pass the window on which you wish to paint.
5088
_gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))
5089
_gdi_.ClientDC_swigregister(ClientDC)
5091
#---------------------------------------------------------------------------
5093
class PaintDC(ClientDC):
5095
A wx.PaintDC must be constructed if an application wishes to paint on
5096
the client area of a window from within an EVT_PAINT event
5097
handler. This should normally be constructed as a temporary stack
5098
object; don't store a wx.PaintDC object. If you have an EVT_PAINT
5099
handler, you **must** create a wx.PaintDC object within it even if you
5100
don't actually use it.
5102
Using wx.PaintDC within EVT_PAINT handlers is important because it
5103
automatically sets the clipping area to the damaged area of the
5104
window. Attempts to draw outside this area do not appear.
5106
To draw on a window from outside EVT_PAINT handlers, construct a
5107
`wx.ClientDC` object.
5110
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5111
__repr__ = _swig_repr
5112
def __init__(self, *args, **kwargs):
5114
__init__(self, Window win) -> PaintDC
5116
Constructor. Pass the window on which you wish to paint.
5118
_gdi_.PaintDC_swiginit(self,_gdi_.new_PaintDC(*args, **kwargs))
5119
_gdi_.PaintDC_swigregister(PaintDC)
5121
#---------------------------------------------------------------------------
5123
class MemoryDC(WindowDC):
5125
A memory device context provides a means to draw graphics onto a
5126
bitmap. A bitmap must be selected into the new memory DC before it may
5127
be used for anything. Typical usage is as follows::
5130
dc.SelectObject(bitmap)
5131
# draw on the dc using any of the Draw methods
5132
dc.SelectObject(wx.NullBitmap)
5133
# the bitmap now contains wahtever was drawn upon it
5135
Note that the memory DC *must* be deleted (or the bitmap selected out
5136
of it) before a bitmap can be reselected into another memory DC.
5139
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5140
__repr__ = _swig_repr
5141
def __init__(self, *args, **kwargs):
5143
__init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
5145
Constructs a new memory device context.
5147
Use the Ok member to test whether the constructor was successful in
5148
creating a usable device context. If a bitmap is not given to this
5149
constructor then don't forget to select a bitmap into the DC before
5152
_gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
5153
def SelectObject(*args, **kwargs):
5155
SelectObject(self, Bitmap bitmap)
5157
Selects the bitmap into the device context, to use as the memory
5158
bitmap. Selecting the bitmap into a memory DC allows you to draw into
5159
the DC, and therefore the bitmap, and also to use Blit to copy the
5162
If the argument is wx.NullBitmap (or some other uninitialised
5163
`wx.Bitmap`) the current bitmap is selected out of the device context,
5164
and the original bitmap restored, allowing the current bitmap to be
5167
return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
5169
def SelectObjectAsSource(*args, **kwargs):
5170
"""SelectObjectAsSource(self, Bitmap bmp)"""
5171
return _gdi_.MemoryDC_SelectObjectAsSource(*args, **kwargs)
5173
_gdi_.MemoryDC_swigregister(MemoryDC)
5175
def MemoryDCFromDC(*args, **kwargs):
5177
MemoryDCFromDC(DC oldDC) -> MemoryDC
5179
Creates a DC that is compatible with the oldDC.
5181
val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
5184
#---------------------------------------------------------------------------
5186
BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
5187
BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
5188
BUFFER_USES_SHARED_BUFFER = _gdi_.BUFFER_USES_SHARED_BUFFER
5189
class BufferedDC(MemoryDC):
5191
This simple class provides a simple way to avoid flicker: when drawing
5192
on it, everything is in fact first drawn on an in-memory buffer (a
5193
`wx.Bitmap`) and then copied to the screen only once, when this object
5194
is destroyed. You can either provide a buffer bitmap yourself, and
5195
reuse it the next time something needs painted, or you can let the
5196
buffered DC create and provide a buffer bitmap itself.
5198
Buffered DCs can be used in the same way as any other device context.
5199
wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
5200
use it in your EVT_PAINT handler, you should look at
5201
`wx.BufferedPaintDC`. You can also use a wx.BufferedDC without
5202
providing a target DC. In this case the operations done on the dc
5203
will only be written to the buffer bitmap and *not* to any window, so
5204
you will want to have provided the buffer bitmap and then reuse it
5205
when it needs painted to the window.
5207
Please note that GTK+ 2.0 and OS X provide double buffering themselves
5208
natively. You may want to use `wx.Window.IsDoubleBuffered` to
5209
determine whether you need to use buffering or not, or use
5210
`wx.AutoBufferedPaintDC` to avoid needless double buffering on systems
5211
that already do it automatically.
5216
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5217
__repr__ = _swig_repr
5218
def __init__(self, *args):
5220
__init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
5221
__init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
5223
Constructs a buffered DC.
5225
_gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args))
5226
# save a ref so the other dc will not be deleted before self
5228
# also save a ref to the bitmap
5229
if len(args) > 1: self.__bmp = args[1]
5232
__swig_destroy__ = _gdi_.delete_BufferedDC
5233
__del__ = lambda self : None;
5234
def UnMask(*args, **kwargs):
5238
Blits the buffer to the dc, and detaches the dc from the buffer (so it
5239
can be effectively used once only). This is usually only called in
5242
return _gdi_.BufferedDC_UnMask(*args, **kwargs)
5244
def SetStyle(*args, **kwargs):
5245
"""SetStyle(self, int style)"""
5246
return _gdi_.BufferedDC_SetStyle(*args, **kwargs)
5248
def GetStyle(*args, **kwargs):
5249
"""GetStyle(self) -> int"""
5250
return _gdi_.BufferedDC_GetStyle(*args, **kwargs)
5252
_gdi_.BufferedDC_swigregister(BufferedDC)
5254
class BufferedPaintDC(BufferedDC):
5256
This is a subclass of `wx.BufferedDC` which can be used inside of an
5257
EVT_PAINT event handler. Just create an object of this class instead
5258
of `wx.PaintDC` and that's all you have to do to (mostly) avoid
5259
flicker. The only thing to watch out for is that if you are using this
5260
class together with `wx.ScrolledWindow`, you probably do **not** want
5261
to call `wx.ScrolledWindow.PrepareDC` on it as it already does this internally
5262
for the real underlying `wx.PaintDC`.
5264
If your window is already fully buffered in a `wx.Bitmap` then your
5265
EVT_PAINT handler can be as simple as just creating a
5266
``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
5267
automatically when it is destroyed. For example::
5269
def OnPaint(self, event):
5270
dc = wx.BufferedPaintDC(self, self.buffer)
5275
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5276
__repr__ = _swig_repr
5277
def __init__(self, *args, **kwargs):
5279
__init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
5281
Create a buffered paint DC. As with `wx.BufferedDC`, you may either
5282
provide the bitmap to be used for buffering or let this object create
5283
one internally (in the latter case, the size of the client part of the
5284
window is automatically used).
5286
_gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs))
5287
if len(args) > 1: self.__bmp = args[1]
5289
_gdi_.BufferedPaintDC_swigregister(BufferedPaintDC)
5291
#---------------------------------------------------------------------------
5293
class AutoBufferedPaintDC(DC):
5295
If the current platform double buffers by default then this DC is the
5296
same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
5298
:see: `wx.AutoBufferedPaintDCFactory`
5301
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5302
__repr__ = _swig_repr
5303
def __init__(self, *args, **kwargs):
5305
__init__(self, Window win) -> AutoBufferedPaintDC
5307
If the current platform double buffers by default then this DC is the
5308
same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
5310
:see: `wx.AutoBufferedPaintDCFactory`
5313
_gdi_.AutoBufferedPaintDC_swiginit(self,_gdi_.new_AutoBufferedPaintDC(*args, **kwargs))
5314
_gdi_.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC)
5317
def AutoBufferedPaintDCFactory(*args, **kwargs):
5319
AutoBufferedPaintDCFactory(Window window) -> DC
5321
Checks if the window is natively double buffered and will return a
5322
`wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The advantage of
5323
this function over `wx.AutoBufferedPaintDC` is that this function will check
5324
if the the specified window has double-buffering enabled rather than just
5325
going by platform defaults.
5327
return _gdi_.AutoBufferedPaintDCFactory(*args, **kwargs)
5328
#---------------------------------------------------------------------------
5332
wx.MirrorDC is a simple wrapper class which is always associated with a
5333
real `wx.DC` object and either forwards all of its operations to it
5334
without changes (no mirroring takes place) or exchanges x and y
5335
coordinates which makes it possible to reuse the same code to draw a
5336
figure and its mirror -- i.e. reflection related to the diagonal line
5339
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5340
__repr__ = _swig_repr
5341
def __init__(self, *args, **kwargs):
5343
__init__(self, DC dc, bool mirror) -> MirrorDC
5345
Creates a mirrored DC associated with the real *dc*. Everything drawn
5346
on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
5349
_gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs))
5350
_gdi_.MirrorDC_swigregister(MirrorDC)
5352
#---------------------------------------------------------------------------
5354
class PostScriptDC(DC):
5355
"""This is a `wx.DC` that can write to PostScript files on any platform."""
5356
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5357
__repr__ = _swig_repr
5358
def __init__(self, *args, **kwargs):
5360
__init__(self, wxPrintData printData) -> PostScriptDC
5362
Constructs a PostScript printer device context from a `wx.PrintData`
5365
_gdi_.PostScriptDC_swiginit(self,_gdi_.new_PostScriptDC(*args, **kwargs))
5366
_gdi_.PostScriptDC_swigregister(PostScriptDC)
5368
#---------------------------------------------------------------------------
5370
class MetaFile(_core.Object):
5371
"""Proxy of C++ MetaFile class"""
5372
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5373
__repr__ = _swig_repr
5374
def __init__(self, *args, **kwargs):
5375
"""__init__(self, String filename=EmptyString) -> MetaFile"""
5376
_gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs))
5377
__swig_destroy__ = _gdi_.delete_MetaFile
5378
__del__ = lambda self : None;
5379
def Play(*args, **kwargs):
5380
"""Play(self, DC dc) -> bool"""
5381
return _gdi_.MetaFile_Play(*args, **kwargs)
5383
def IsOk(*args, **kwargs):
5384
"""IsOk(self) -> bool"""
5385
return _gdi_.MetaFile_IsOk(*args, **kwargs)
5388
def SetClipboard(*args, **kwargs):
5389
"""SetClipboard(self, int width=0, int height=0) -> bool"""
5390
return _gdi_.MetaFile_SetClipboard(*args, **kwargs)
5392
def GetSize(*args, **kwargs):
5393
"""GetSize(self) -> Size"""
5394
return _gdi_.MetaFile_GetSize(*args, **kwargs)
5396
def GetWidth(*args, **kwargs):
5397
"""GetWidth(self) -> int"""
5398
return _gdi_.MetaFile_GetWidth(*args, **kwargs)
5400
def GetHeight(*args, **kwargs):
5401
"""GetHeight(self) -> int"""
5402
return _gdi_.MetaFile_GetHeight(*args, **kwargs)
5404
def __nonzero__(self): return self.IsOk()
5405
_gdi_.MetaFile_swigregister(MetaFile)
5407
class MetaFileDC(DC):
5408
"""Proxy of C++ MetaFileDC class"""
5409
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5410
__repr__ = _swig_repr
5411
def __init__(self, *args, **kwargs):
5413
__init__(self, String filename=EmptyString, int width=0, int height=0,
5414
String description=EmptyString) -> MetaFileDC
5416
_gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs))
5417
def Close(*args, **kwargs):
5418
"""Close(self) -> MetaFile"""
5419
return _gdi_.MetaFileDC_Close(*args, **kwargs)
5421
_gdi_.MetaFileDC_swigregister(MetaFileDC)
5423
class PrinterDC(DC):
5424
"""Proxy of C++ PrinterDC class"""
5425
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5426
__repr__ = _swig_repr
5427
def __init__(self, *args, **kwargs):
5428
"""__init__(self, wxPrintData printData) -> PrinterDC"""
5429
_gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs))
5430
_gdi_.PrinterDC_swigregister(PrinterDC)
5432
class SVGFileDC(DC):
5433
"""Proxy of C++ SVGFileDC class"""
5434
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5435
__repr__ = _swig_repr
5436
def __init__(self, *args, **kwargs):
5437
"""__init__(self, String filename, int width=320, int height=240, double dpi=72.0) -> SVGFileDC"""
5438
_gdi_.SVGFileDC_swiginit(self,_gdi_.new_SVGFileDC(*args, **kwargs))
5439
_gdi_.SVGFileDC_swigregister(SVGFileDC)
5441
#---------------------------------------------------------------------------
5443
ANTIALIAS_NONE = _gdi_.ANTIALIAS_NONE
5444
ANTIALIAS_DEFAULT = _gdi_.ANTIALIAS_DEFAULT
5445
INTERPOLATION_DEFAULT = _gdi_.INTERPOLATION_DEFAULT
5446
INTERPOLATION_NONE = _gdi_.INTERPOLATION_NONE
5447
INTERPOLATION_FAST = _gdi_.INTERPOLATION_FAST
5448
INTERPOLATION_GOOD = _gdi_.INTERPOLATION_GOOD
5449
INTERPOLATION_BEST = _gdi_.INTERPOLATION_BEST
5450
COMPOSITION_INVALID = _gdi_.COMPOSITION_INVALID
5451
COMPOSITION_CLEAR = _gdi_.COMPOSITION_CLEAR
5452
COMPOSITION_SOURCE = _gdi_.COMPOSITION_SOURCE
5453
COMPOSITION_OVER = _gdi_.COMPOSITION_OVER
5454
COMPOSITION_IN = _gdi_.COMPOSITION_IN
5455
COMPOSITION_OUT = _gdi_.COMPOSITION_OUT
5456
COMPOSITION_ATOP = _gdi_.COMPOSITION_ATOP
5457
COMPOSITION_DEST = _gdi_.COMPOSITION_DEST
5458
COMPOSITION_DEST_OVER = _gdi_.COMPOSITION_DEST_OVER
5459
COMPOSITION_DEST_IN = _gdi_.COMPOSITION_DEST_IN
5460
COMPOSITION_DEST_OUT = _gdi_.COMPOSITION_DEST_OUT
5461
COMPOSITION_DEST_ATOP = _gdi_.COMPOSITION_DEST_ATOP
5462
COMPOSITION_XOR = _gdi_.COMPOSITION_XOR
5463
COMPOSITION_ADD = _gdi_.COMPOSITION_ADD
5464
class GraphicsObject(_core.Object):
5466
This class is the superclass of native graphics objects like pens
5467
etc. It provides the internal reference counting. It is not to be
5468
instantiated by user code.
5470
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5471
__repr__ = _swig_repr
5472
def __init__(self, *args, **kwargs):
5474
__init__(self, GraphicsRenderer renderer=None) -> GraphicsObject
5476
This class is the superclass of native graphics objects like pens
5477
etc. It provides the internal reference counting. It is not to be
5478
instantiated by user code.
5480
_gdi_.GraphicsObject_swiginit(self,_gdi_.new_GraphicsObject(*args, **kwargs))
5481
__swig_destroy__ = _gdi_.delete_GraphicsObject
5482
__del__ = lambda self : None;
5483
def IsNull(*args, **kwargs):
5485
IsNull(self) -> bool
5487
Is this object valid (false) or still empty (true)?
5489
return _gdi_.GraphicsObject_IsNull(*args, **kwargs)
5491
def GetRenderer(*args, **kwargs):
5493
GetRenderer(self) -> GraphicsRenderer
5495
Returns the renderer that was used to create this instance, or
5496
``None`` if it has not been initialized yet.
5498
return _gdi_.GraphicsObject_GetRenderer(*args, **kwargs)
5500
_gdi_.GraphicsObject_swigregister(GraphicsObject)
5502
class GraphicsPen(GraphicsObject):
5504
A wx.GraphicsPen is a native representation of a pen. It is used for
5505
stroking a path on a `wx.GraphicsContext`. The contents are specific and
5506
private to the respective renderer. The only way to get a valid instance
5507
is via a CreatePen call on the graphics context or the renderer
5510
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5511
__repr__ = _swig_repr
5512
def __init__(self, *args, **kwargs):
5514
__init__(self) -> GraphicsPen
5516
A wx.GraphicsPen is a native representation of a pen. It is used for
5517
stroking a path on a `wx.GraphicsContext`. The contents are specific and
5518
private to the respective renderer. The only way to get a valid instance
5519
is via a CreatePen call on the graphics context or the renderer
5522
_gdi_.GraphicsPen_swiginit(self,_gdi_.new_GraphicsPen(*args, **kwargs))
5523
__swig_destroy__ = _gdi_.delete_GraphicsPen
5524
__del__ = lambda self : None;
5525
_gdi_.GraphicsPen_swigregister(GraphicsPen)
5527
class GraphicsBrush(GraphicsObject):
5529
A wx.GraphicsBrush is a native representation of a brush. It is used
5530
for filling a path on a `wx.GraphicsContext`. The contents are
5531
specific and private to the respective renderer. The only way to get a
5532
valid instance is via a Create...Brush call on the graphics context or
5533
the renderer instance.
5535
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5536
__repr__ = _swig_repr
5537
def __init__(self, *args, **kwargs):
5539
__init__(self) -> GraphicsBrush
5541
A wx.GraphicsBrush is a native representation of a brush. It is used
5542
for filling a path on a `wx.GraphicsContext`. The contents are
5543
specific and private to the respective renderer. The only way to get a
5544
valid instance is via a Create...Brush call on the graphics context or
5545
the renderer instance.
5547
_gdi_.GraphicsBrush_swiginit(self,_gdi_.new_GraphicsBrush(*args, **kwargs))
5548
__swig_destroy__ = _gdi_.delete_GraphicsBrush
5549
__del__ = lambda self : None;
5550
_gdi_.GraphicsBrush_swigregister(GraphicsBrush)
5552
class GraphicsFont(GraphicsObject):
5554
A `wx.GraphicsFont` is a native representation of a font (including
5555
text colour). The contents are specific an private to the respective
5556
renderer. The only way to get a valid instance is via a CreateFont
5557
call on the graphics context or the renderer instance.
5559
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5560
__repr__ = _swig_repr
5561
def __init__(self, *args, **kwargs):
5563
__init__(self) -> GraphicsFont
5565
A `wx.GraphicsFont` is a native representation of a font (including
5566
text colour). The contents are specific an private to the respective
5567
renderer. The only way to get a valid instance is via a CreateFont
5568
call on the graphics context or the renderer instance.
5570
_gdi_.GraphicsFont_swiginit(self,_gdi_.new_GraphicsFont(*args, **kwargs))
5571
__swig_destroy__ = _gdi_.delete_GraphicsFont
5572
__del__ = lambda self : None;
5573
_gdi_.GraphicsFont_swigregister(GraphicsFont)
5575
class GraphicsBitmap(GraphicsObject):
5576
"""Proxy of C++ GraphicsBitmap class"""
5577
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5578
__repr__ = _swig_repr
5579
def __init__(self, *args, **kwargs):
5580
"""__init__(self) -> GraphicsBitmap"""
5581
_gdi_.GraphicsBitmap_swiginit(self,_gdi_.new_GraphicsBitmap(*args, **kwargs))
5582
__swig_destroy__ = _gdi_.delete_GraphicsBitmap
5583
__del__ = lambda self : None;
5584
_gdi_.GraphicsBitmap_swigregister(GraphicsBitmap)
5586
class GraphicsMatrix(GraphicsObject):
5588
A wx.GraphicsMatrix is a native representation of an affine
5589
matrix. The contents are specific and private to the respective
5590
renderer. The only way to get a valid instance is via a CreateMatrix
5591
call on the graphics context or the renderer instance.
5593
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5594
def __init__(self): raise AttributeError, "No constructor defined"
5595
__repr__ = _swig_repr
5596
__swig_destroy__ = _gdi_.delete_GraphicsMatrix
5597
__del__ = lambda self : None;
5598
def Concat(*args, **kwargs):
5600
Concat(self, GraphicsMatrix t)
5602
Concatenates the passed in matrix to the current matrix.
5604
return _gdi_.GraphicsMatrix_Concat(*args, **kwargs)
5606
def Set(*args, **kwargs):
5608
Set(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5609
Double tx=0.0, Double ty=0.0)
5611
Sets the matrix to the specified values (default values are the
5614
return _gdi_.GraphicsMatrix_Set(*args, **kwargs)
5616
def Get(*args, **kwargs):
5618
Get(self) --> (a, b, c, d, tx, ty)
5620
Gets the component values of the matrix and returns them as a tuple.
5622
return _gdi_.GraphicsMatrix_Get(*args, **kwargs)
5624
def Invert(*args, **kwargs):
5630
return _gdi_.GraphicsMatrix_Invert(*args, **kwargs)
5632
def IsEqual(*args, **kwargs):
5634
IsEqual(self, GraphicsMatrix t) -> bool
5636
Returns ``True`` if the elements of the transformation matrix are
5639
return _gdi_.GraphicsMatrix_IsEqual(*args, **kwargs)
5641
def IsIdentity(*args, **kwargs):
5643
IsIdentity(self) -> bool
5645
Returns ``True`` if this is the identity matrix
5647
return _gdi_.GraphicsMatrix_IsIdentity(*args, **kwargs)
5649
def Translate(*args, **kwargs):
5651
Translate(self, Double dx, Double dy)
5653
Add a translation to this matrix.
5655
return _gdi_.GraphicsMatrix_Translate(*args, **kwargs)
5657
def Scale(*args, **kwargs):
5659
Scale(self, Double xScale, Double yScale)
5663
return _gdi_.GraphicsMatrix_Scale(*args, **kwargs)
5665
def Rotate(*args, **kwargs):
5667
Rotate(self, Double angle)
5669
Rotates this matrix. The angle should be specified in radians.
5671
return _gdi_.GraphicsMatrix_Rotate(*args, **kwargs)
5673
def TransformPoint(*args, **kwargs):
5675
TransformPoint(self, x, y) --> (x, y)
5677
Applies this matrix to a point, returns the resulting point values
5679
return _gdi_.GraphicsMatrix_TransformPoint(*args, **kwargs)
5681
def TransformDistance(*args, **kwargs):
5683
TransformDistance(self, dx, dy) --> (dx, dy)
5685
Applies this matrix to a distance (ie. performs all transforms except
5688
return _gdi_.GraphicsMatrix_TransformDistance(*args, **kwargs)
5690
def GetNativeMatrix(*args, **kwargs):
5692
GetNativeMatrix(self) -> void
5694
Returns the native representation of the matrix. For CoreGraphics this
5695
is a CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for
5696
Cairo a cairo_matrix_t pointer. NOTE: For wxPython we still need a
5697
way to make this value usable.
5699
return _gdi_.GraphicsMatrix_GetNativeMatrix(*args, **kwargs)
5701
_gdi_.GraphicsMatrix_swigregister(GraphicsMatrix)
5703
class GraphicsPath(GraphicsObject):
5704
"""Proxy of C++ GraphicsPath class"""
5705
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5706
def __init__(self): raise AttributeError, "No constructor defined"
5707
__repr__ = _swig_repr
5708
__swig_destroy__ = _gdi_.delete_GraphicsPath
5709
__del__ = lambda self : None;
5710
def MoveToPoint(*args):
5712
MoveToPoint(self, Double x, Double y)
5713
MoveToPoint(self, Point2D p)
5715
Begins a new subpath at the specified point.
5717
return _gdi_.GraphicsPath_MoveToPoint(*args)
5719
def AddLineToPoint(*args):
5721
AddLineToPoint(self, Double x, Double y)
5722
AddLineToPoint(self, Point2D p)
5724
Adds a straight line from the current point to the specified point.
5726
return _gdi_.GraphicsPath_AddLineToPoint(*args)
5728
def AddCurveToPoint(*args):
5730
AddCurveToPoint(self, Double cx1, Double cy1, Double cx2, Double cy2, Double x,
5732
AddCurveToPoint(self, Point2D c1, Point2D c2, Point2D e)
5734
Adds a cubic Bezier curve from the current point, using two control
5735
points and an end point
5737
return _gdi_.GraphicsPath_AddCurveToPoint(*args)
5739
def AddPath(*args, **kwargs):
5741
AddPath(self, GraphicsPath path)
5745
return _gdi_.GraphicsPath_AddPath(*args, **kwargs)
5747
def CloseSubpath(*args, **kwargs):
5751
Closes the current sub-path.
5753
return _gdi_.GraphicsPath_CloseSubpath(*args, **kwargs)
5755
def GetCurrentPoint(*args, **kwargs):
5757
GetCurrentPoint(self) -> Point2D
5759
Gets the last point of the current path, (0,0) if not yet set
5761
return _gdi_.GraphicsPath_GetCurrentPoint(*args, **kwargs)
5765
AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle,
5766
bool clockwise=True)
5767
AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle,
5768
bool clockwise=True)
5770
Adds an arc of a circle centering at (x,y) with radius (r) from
5771
startAngle to endAngle
5773
return _gdi_.GraphicsPath_AddArc(*args)
5775
def AddQuadCurveToPoint(*args, **kwargs):
5777
AddQuadCurveToPoint(self, Double cx, Double cy, Double x, Double y)
5779
Adds a quadratic Bezier curve from the current point, using a control
5780
point and an end point
5782
return _gdi_.GraphicsPath_AddQuadCurveToPoint(*args, **kwargs)
5784
def AddRectangle(*args, **kwargs):
5786
AddRectangle(self, Double x, Double y, Double w, Double h)
5788
Appends a rectangle as a new closed subpath.
5790
return _gdi_.GraphicsPath_AddRectangle(*args, **kwargs)
5792
def AddCircle(*args, **kwargs):
5794
AddCircle(self, Double x, Double y, Double r)
5796
Appends a circle around (x,y) with radius r as a new closed subpath.
5798
return _gdi_.GraphicsPath_AddCircle(*args, **kwargs)
5800
def AddArcToPoint(*args, **kwargs):
5802
AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r)
5804
Appends an arc to two tangents connecting (current) to (x1,y1) and
5805
(x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)
5807
return _gdi_.GraphicsPath_AddArcToPoint(*args, **kwargs)
5809
def AddEllipse(*args, **kwargs):
5811
AddEllipse(self, Double x, Double y, Double w, Double h)
5813
Appends an ellipse fitting into the passed in rectangle.
5815
return _gdi_.GraphicsPath_AddEllipse(*args, **kwargs)
5817
def AddRoundedRectangle(*args, **kwargs):
5819
AddRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5821
Appends a rounded rectangle.
5823
return _gdi_.GraphicsPath_AddRoundedRectangle(*args, **kwargs)
5825
def GetNativePath(*args, **kwargs):
5827
GetNativePath(self) -> void
5829
Returns the native path (CGPathRef for Core Graphics, Path pointer for
5830
GDIPlus and a cairo_path_t pointer for cairo). NOTE: For wxPython we
5831
still need a way to make this value usable.
5833
return _gdi_.GraphicsPath_GetNativePath(*args, **kwargs)
5835
def UnGetNativePath(*args, **kwargs):
5837
UnGetNativePath(self, void p)
5839
Gives back the native path returned by GetNativePath() because there
5840
might be some deallocations necessary (eg on cairo the native path
5841
returned by GetNativePath is newly allocated each time).
5843
return _gdi_.GraphicsPath_UnGetNativePath(*args, **kwargs)
5845
def Transform(*args, **kwargs):
5847
Transform(self, GraphicsMatrix matrix)
5849
Transforms each point of this path by the matrix
5851
return _gdi_.GraphicsPath_Transform(*args, **kwargs)
5853
def GetBox(*args, **kwargs):
5855
GetBox(self) -> Rect2D
5857
Gets the bounding box enclosing all points (possibly including control
5860
return _gdi_.GraphicsPath_GetBox(*args, **kwargs)
5862
def Contains(*args):
5864
Contains(self, Double x, Double y, int fillStyle=ODDEVEN_RULE) -> bool
5865
Contains(self, Point2D c, int fillStyle=ODDEVEN_RULE) -> bool
5867
Returns ``True`` if the point is within the path.
5869
return _gdi_.GraphicsPath_Contains(*args)
5871
_gdi_.GraphicsPath_swigregister(GraphicsPath)
5873
class GraphicsGradientStop(object):
5874
"""Proxy of C++ GraphicsGradientStop class"""
5875
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5876
__repr__ = _swig_repr
5877
def __init__(self, *args, **kwargs):
5878
"""__init__(self, Colour col=wxTransparentColour, float pos=0.0) -> GraphicsGradientStop"""
5879
_gdi_.GraphicsGradientStop_swiginit(self,_gdi_.new_GraphicsGradientStop(*args, **kwargs))
5880
__swig_destroy__ = _gdi_.delete_GraphicsGradientStop
5881
__del__ = lambda self : None;
5882
def GetColour(*args, **kwargs):
5883
"""GetColour(self) -> Colour"""
5884
return _gdi_.GraphicsGradientStop_GetColour(*args, **kwargs)
5886
def SetColour(*args, **kwargs):
5887
"""SetColour(self, Colour col)"""
5888
return _gdi_.GraphicsGradientStop_SetColour(*args, **kwargs)
5890
def GetPosition(*args, **kwargs):
5891
"""GetPosition(self) -> float"""
5892
return _gdi_.GraphicsGradientStop_GetPosition(*args, **kwargs)
5894
def SetPosition(*args, **kwargs):
5895
"""SetPosition(self, float pos)"""
5896
return _gdi_.GraphicsGradientStop_SetPosition(*args, **kwargs)
5898
Position = property(GetPosition,SetPosition)
5899
Colour = property(GetColour,SetColour)
5900
_gdi_.GraphicsGradientStop_swigregister(GraphicsGradientStop)
5902
NullGraphicsPen = cvar.NullGraphicsPen
5903
NullGraphicsBrush = cvar.NullGraphicsBrush
5904
NullGraphicsFont = cvar.NullGraphicsFont
5905
NullGraphicsBitmap = cvar.NullGraphicsBitmap
5906
NullGraphicsMatrix = cvar.NullGraphicsMatrix
5907
NullGraphicsPath = cvar.NullGraphicsPath
5909
class GraphicsGradientStops(object):
5910
"""Proxy of C++ GraphicsGradientStops class"""
5911
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5912
__repr__ = _swig_repr
5913
def __init__(self, *args, **kwargs):
5914
"""__init__(self, Colour startCol=wxTransparentColour, Colour endCol=wxTransparentColour) -> GraphicsGradientStops"""
5915
_gdi_.GraphicsGradientStops_swiginit(self,_gdi_.new_GraphicsGradientStops(*args, **kwargs))
5916
__swig_destroy__ = _gdi_.delete_GraphicsGradientStops
5917
__del__ = lambda self : None;
5920
Add(self, GraphicsGradientStop stop)
5921
Add(self, Colour col, float pos)
5923
return _gdi_.GraphicsGradientStops_Add(*args)
5925
def GetCount(*args, **kwargs):
5926
"""GetCount(self) -> unsigned int"""
5927
return _gdi_.GraphicsGradientStops_GetCount(*args, **kwargs)
5929
def Item(*args, **kwargs):
5930
"""Item(self, unsigned int n) -> GraphicsGradientStop"""
5931
return _gdi_.GraphicsGradientStops_Item(*args, **kwargs)
5933
def SetStartColour(*args, **kwargs):
5934
"""SetStartColour(self, Colour col)"""
5935
return _gdi_.GraphicsGradientStops_SetStartColour(*args, **kwargs)
5937
def GetStartColour(*args, **kwargs):
5938
"""GetStartColour(self) -> Colour"""
5939
return _gdi_.GraphicsGradientStops_GetStartColour(*args, **kwargs)
5941
def SetEndColour(*args, **kwargs):
5942
"""SetEndColour(self, Colour col)"""
5943
return _gdi_.GraphicsGradientStops_SetEndColour(*args, **kwargs)
5945
def GetEndColour(*args, **kwargs):
5946
"""GetEndColour(self) -> Colour"""
5947
return _gdi_.GraphicsGradientStops_GetEndColour(*args, **kwargs)
5949
def __len__(*args, **kwargs):
5950
"""__len__(self) -> unsigned int"""
5951
return _gdi_.GraphicsGradientStops___len__(*args, **kwargs)
5953
def __getitem__(*args, **kwargs):
5954
"""__getitem__(self, unsigned int n) -> GraphicsGradientStop"""
5955
return _gdi_.GraphicsGradientStops___getitem__(*args, **kwargs)
5957
Count = property(GetCount)
5958
StartColour = property(GetStartColour,SetStartColour)
5959
EndColour = property(GetEndColour,SetEndColour)
5960
_gdi_.GraphicsGradientStops_swigregister(GraphicsGradientStops)
5962
class GraphicsContext(GraphicsObject):
5964
A `wx.GraphicsContext` instance is the object that is drawn upon. It is
5965
created by a renderer using the CreateContext calls, this can be done
5966
either directly using a renderer instance, or indirectly using the
5967
static convenience CreateXXX functions of wx.GraphicsContext that
5968
always delegate the task to the default renderer.
5970
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5971
def __init__(self): raise AttributeError, "No constructor defined"
5972
__repr__ = _swig_repr
5973
__swig_destroy__ = _gdi_.delete_GraphicsContext
5974
__del__ = lambda self : None;
5977
Create(WindowDC dc) -> GraphicsContext
5978
Create(MemoryDC dc) -> GraphicsContext
5979
Create(Window window) -> GraphicsContext
5980
Create(PrinterDC dc) -> GraphicsContext
5981
Create(Image ?) -> GraphicsContext
5983
Creates a wx.GraphicsContext either from a window or a DC.
5985
val = _gdi_.GraphicsContext_Create(*args)
5986
val.__dc = args[0] # save a ref so the dc will not be deleted before self
5989
Create = staticmethod(Create)
5990
def CreateMeasuringContext(*args):
5992
CreateMeasuringContext() -> GraphicsContext
5994
Create a lightwieght context that can be used for measuring text only.
5996
return _gdi_.GraphicsContext_CreateMeasuringContext(*args)
5998
CreateMeasuringContext = staticmethod(CreateMeasuringContext)
5999
def CreateFromNative(*args, **kwargs):
6001
CreateFromNative(void context) -> GraphicsContext
6003
Creates a wx.GraphicsContext from a native context. This native
6004
context must be eg a CGContextRef for Core Graphics, a Graphics
6005
pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
6006
wxPython we still need a way to make this value usable.
6008
return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs)
6010
CreateFromNative = staticmethod(CreateFromNative)
6011
def CreateFromNativeWindow(*args, **kwargs):
6013
CreateFromNativeWindow(void window) -> GraphicsContext
6015
Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
6016
we still need a way to make this value usable.
6018
return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs)
6020
CreateFromNativeWindow = staticmethod(CreateFromNativeWindow)
6021
def StartDoc(*args, **kwargs):
6023
StartDoc(self, String message) -> bool
6025
Begin a new document (relevant only for printing / pdf etc) if there
6026
is a progress dialog, message will be shown
6028
return _gdi_.GraphicsContext_StartDoc(*args, **kwargs)
6030
def EndDoc(*args, **kwargs):
6034
Done with that document (relevant only for printing / pdf etc)
6036
return _gdi_.GraphicsContext_EndDoc(*args, **kwargs)
6038
def StartPage(*args, **kwargs):
6040
StartPage(self, Double width=0, Double height=0)
6042
Opens a new page (relevant only for printing / pdf etc) with the given
6043
size in points (if both are null the default page size will be used)
6046
return _gdi_.GraphicsContext_StartPage(*args, **kwargs)
6048
def EndPage(*args, **kwargs):
6052
Ends the current page (relevant only for printing / pdf etc)
6054
return _gdi_.GraphicsContext_EndPage(*args, **kwargs)
6056
def Flush(*args, **kwargs):
6060
Make sure that the current content of this context is immediately visible
6062
return _gdi_.GraphicsContext_Flush(*args, **kwargs)
6064
def CreatePath(*args, **kwargs):
6066
CreatePath(self) -> GraphicsPath
6068
Creates a native graphics path which is initially empty.
6070
return _gdi_.GraphicsContext_CreatePath(*args, **kwargs)
6072
def CreatePen(*args, **kwargs):
6074
CreatePen(self, Pen pen) -> GraphicsPen
6076
Creates a native pen from a `wx.Pen`.
6078
return _gdi_.GraphicsContext_CreatePen(*args, **kwargs)
6080
def CreateBrush(*args, **kwargs):
6082
CreateBrush(self, Brush brush) -> GraphicsBrush
6084
Creates a native brush from a `wx.Brush`.
6086
return _gdi_.GraphicsContext_CreateBrush(*args, **kwargs)
6088
def CreateLinearGradientBrush(*args):
6090
CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
6091
Colour c2) -> GraphicsBrush
6092
CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, GraphicsGradientStops stops) -> GraphicsBrush
6094
Creates a native brush, having a linear gradient, starting at (x1,y1)
6095
to (x2,y2) with the given boundary colors or the specified stops.
6097
return _gdi_.GraphicsContext_CreateLinearGradientBrush(*args)
6099
def CreateRadialGradientBrush(*args):
6101
CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
6102
Colour oColor, Colour cColor) -> GraphicsBrush
6103
CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
6104
GraphicsGradientStops stops) -> GraphicsBrush
6106
Creates a native brush, having a radial gradient originating at point
6107
(xo,yo) and ending on a circle around (xc,yc) with the given radius; the colours may be
6108
specified by just the two extremes or the full array of gradient stops.
6110
return _gdi_.GraphicsContext_CreateRadialGradientBrush(*args)
6112
def CreateFont(*args):
6114
CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont
6115
CreateFont(self, double sizeInPixels, String facename, int flags=FONTFLAG_DEFAULT,
6116
Colour col=*wxBLACK) -> GraphicsFont
6118
return _gdi_.GraphicsContext_CreateFont(*args)
6120
def CreateBitmap(*args, **kwargs):
6122
CreateBitmap(self, Bitmap bitmap) -> GraphicsBitmap
6124
Create a native bitmap representation.
6126
return _gdi_.GraphicsContext_CreateBitmap(*args, **kwargs)
6128
def CreateBitmapFromImage(*args, **kwargs):
6129
"""CreateBitmapFromImage(self, Image image) -> GraphicsBitmap"""
6130
return _gdi_.GraphicsContext_CreateBitmapFromImage(*args, **kwargs)
6132
def CreateSubBitmap(*args, **kwargs):
6134
CreateSubBitmap(self, GraphicsBitmap bitmap, Double x, Double y, Double w,
6135
Double h) -> GraphicsBitmap
6137
Create a native bitmap representation using a subset of a wx.Bitmap.
6139
return _gdi_.GraphicsContext_CreateSubBitmap(*args, **kwargs)
6141
def CreateMatrix(*args, **kwargs):
6143
CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
6144
Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
6146
Creates a native affine transformation matrix from the passed in
6147
values. The defaults result in an identity matrix.
6149
return _gdi_.GraphicsContext_CreateMatrix(*args, **kwargs)
6151
def PushState(*args, **kwargs):
6155
Push the current state of the context, (ie the transformation matrix)
6158
return _gdi_.GraphicsContext_PushState(*args, **kwargs)
6160
def PopState(*args, **kwargs):
6164
Pops a stored state from the stack
6166
return _gdi_.GraphicsContext_PopState(*args, **kwargs)
6168
def ClipRegion(*args, **kwargs):
6170
ClipRegion(self, Region region)
6172
Clips drawings to the region intersected with the current clipping region.
6174
return _gdi_.GraphicsContext_ClipRegion(*args, **kwargs)
6176
def Clip(*args, **kwargs):
6178
Clip(self, Double x, Double y, Double w, Double h)
6180
Clips drawings to the rectangle intersected with the current clipping region..
6182
return _gdi_.GraphicsContext_Clip(*args, **kwargs)
6184
def ResetClip(*args, **kwargs):
6188
Resets the clipping to original shape.
6190
return _gdi_.GraphicsContext_ResetClip(*args, **kwargs)
6192
def GetNativeContext(*args, **kwargs):
6194
GetNativeContext(self) -> void
6196
Returns the native context (CGContextRef for Core Graphics, Graphics
6197
pointer for GDIPlus and cairo_t pointer for cairo).
6199
return _gdi_.GraphicsContext_GetNativeContext(*args, **kwargs)
6201
def GetAntialiasMode(*args, **kwargs):
6203
GetAntialiasMode(self) -> int
6205
Returns the current shape antialiasing mode
6207
return _gdi_.GraphicsContext_GetAntialiasMode(*args, **kwargs)
6209
def SetAntialiasMode(*args, **kwargs):
6211
SetAntialiasMode(self, int antialias) -> bool
6213
Sets the antialiasing mode, returns true if it is supported
6215
return _gdi_.GraphicsContext_SetAntialiasMode(*args, **kwargs)
6217
def GetInterpolationQuality(*args, **kwargs):
6218
"""GetInterpolationQuality(self) -> int"""
6219
return _gdi_.GraphicsContext_GetInterpolationQuality(*args, **kwargs)
6221
def SetInterpolationQuality(*args, **kwargs):
6222
"""SetInterpolationQuality(self, int interpolation) -> bool"""
6223
return _gdi_.GraphicsContext_SetInterpolationQuality(*args, **kwargs)
6225
def GetCompositionMode(*args, **kwargs):
6227
GetCompositionMode(self) -> int
6229
Returns the current compositing operator
6231
return _gdi_.GraphicsContext_GetCompositionMode(*args, **kwargs)
6233
def SetCompositionMode(*args, **kwargs):
6235
SetCompositionMode(self, int op) -> bool
6237
Sets the compositing operator, returns True if it supported
6239
return _gdi_.GraphicsContext_SetCompositionMode(*args, **kwargs)
6241
def GetSize(*args, **kwargs):
6243
GetSize(self) --> (width, height)
6245
Returns the size of the graphics context in device coordinates
6247
return _gdi_.GraphicsContext_GetSize(*args, **kwargs)
6249
def GetDPI(*args, **kwargs):
6251
GetDPI(self) --> (dpiX, dpiY)
6253
Returns the resolution of the graphics context in device points per inch
6255
return _gdi_.GraphicsContext_GetDPI(*args, **kwargs)
6257
def BeginLayer(*args, **kwargs):
6259
BeginLayer(self, Double opacity)
6261
all rendering is done into a fully transparent temporary context
6263
return _gdi_.GraphicsContext_BeginLayer(*args, **kwargs)
6265
def EndLayer(*args, **kwargs):
6269
composites back the drawings into the context with the opacity given
6270
at the BeginLayer call
6272
return _gdi_.GraphicsContext_EndLayer(*args, **kwargs)
6274
def Translate(*args, **kwargs):
6276
Translate(self, Double dx, Double dy)
6278
Translates the current transformation matrix.
6280
return _gdi_.GraphicsContext_Translate(*args, **kwargs)
6282
def Scale(*args, **kwargs):
6284
Scale(self, Double xScale, Double yScale)
6286
Scale the current transformation matrix of the context.
6288
return _gdi_.GraphicsContext_Scale(*args, **kwargs)
6290
def Rotate(*args, **kwargs):
6292
Rotate(self, Double angle)
6294
Rotate the current transformation matrix of the context. ``angle`` is
6295
specified in radians.
6297
return _gdi_.GraphicsContext_Rotate(*args, **kwargs)
6299
def ConcatTransform(*args, **kwargs):
6301
ConcatTransform(self, GraphicsMatrix matrix)
6303
Concatenates the passed in transform with the current transform of
6306
return _gdi_.GraphicsContext_ConcatTransform(*args, **kwargs)
6308
def SetTransform(*args, **kwargs):
6310
SetTransform(self, GraphicsMatrix matrix)
6312
Sets the current transform of this context.
6314
return _gdi_.GraphicsContext_SetTransform(*args, **kwargs)
6316
def GetTransform(*args, **kwargs):
6318
GetTransform(self) -> GraphicsMatrix
6320
Gets the current transformation matrix of this context.
6322
return _gdi_.GraphicsContext_GetTransform(*args, **kwargs)
6326
SetPen(self, GraphicsPen pen)
6327
SetPen(self, Pen pen)
6331
return _gdi_.GraphicsContext_SetPen(*args)
6333
def SetBrush(*args):
6335
SetBrush(self, GraphicsBrush brush)
6336
SetBrush(self, Brush brush)
6338
Sets the brush for filling
6340
return _gdi_.GraphicsContext_SetBrush(*args)
6344
SetFont(self, GraphicsFont font)
6345
SetFont(self, Font font, Colour colour=*wxBLACK)
6349
return _gdi_.GraphicsContext_SetFont(*args)
6351
def StrokePath(*args, **kwargs):
6353
StrokePath(self, GraphicsPath path)
6355
Strokes along a path with the current pen.
6357
return _gdi_.GraphicsContext_StrokePath(*args, **kwargs)
6359
def FillPath(*args, **kwargs):
6361
FillPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
6363
Fills a path with the current brush.
6365
return _gdi_.GraphicsContext_FillPath(*args, **kwargs)
6367
def DrawPath(*args, **kwargs):
6369
DrawPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
6371
Draws the path by first filling and then stroking.
6373
return _gdi_.GraphicsContext_DrawPath(*args, **kwargs)
6375
def DrawText(*args, **kwargs):
6377
DrawText(self, String str, Double x, Double y, GraphicsBrush backgroundBrush=NullGraphicsBrush)
6379
Draws a text string at the defined position.
6381
return _gdi_.GraphicsContext_DrawText(*args, **kwargs)
6383
def DrawRotatedText(*args, **kwargs):
6385
DrawRotatedText(self, String str, Double x, Double y, Double angle, GraphicsBrush backgroundBrush=NullGraphicsBrush)
6387
Draws a text string at the defined position, at the specified angle,
6388
which is given in radians.
6390
return _gdi_.GraphicsContext_DrawRotatedText(*args, **kwargs)
6392
def GetFullTextExtent(*args, **kwargs):
6394
GetFullTextExtent(self, text) --> (width, height, descent, externalLeading)
6396
Gets the dimensions of the string using the currently selected
6397
font. ``text`` is the string to measure, ``w`` and ``h`` are the total
6398
width and height respectively, ``descent`` is the dimension from the
6399
baseline of the font to the bottom of the descender, and
6400
``externalLeading`` is any extra vertical space added to the font by
6401
the font designer (usually is zero).
6403
return _gdi_.GraphicsContext_GetFullTextExtent(*args, **kwargs)
6405
def GetTextExtent(*args, **kwargs):
6407
GetTextExtent(self, text) --> (width, height)
6409
Gets the dimensions of the string using the currently selected
6410
font. ``text`` is the string to measure, ``w`` and ``h`` are the total
6411
width and height respectively.
6413
return _gdi_.GraphicsContext_GetTextExtent(*args, **kwargs)
6415
def GetPartialTextExtents(*args, **kwargs):
6417
GetPartialTextExtents(self, text) -> [widths]
6419
Returns a list of widths from the beginning of ``text`` to the
6420
coresponding character in ``text``.
6422
return _gdi_.GraphicsContext_GetPartialTextExtents(*args, **kwargs)
6424
def DrawBitmap(*args):
6426
DrawBitmap(self, GraphicsBitmap bmp, Double x, Double y, Double w, Double h)
6427
DrawBitmap(self, Bitmap bmp, Double x, Double y, Double w, Double h)
6429
Draws the bitmap. In case of a mono bitmap, this is treated as a mask
6430
and the current brush is used for filling.
6432
return _gdi_.GraphicsContext_DrawBitmap(*args)
6434
def DrawIcon(*args, **kwargs):
6436
DrawIcon(self, Icon icon, Double x, Double y, Double w, Double h)
6440
return _gdi_.GraphicsContext_DrawIcon(*args, **kwargs)
6442
def StrokeLine(*args, **kwargs):
6444
StrokeLine(self, Double x1, Double y1, Double x2, Double y2)
6446
Strokes a single line.
6448
return _gdi_.GraphicsContext_StrokeLine(*args, **kwargs)
6450
def StrokeLines(*args, **kwargs):
6452
StrokeLines(self, List points)
6454
Stroke lines connecting each of the points
6456
return _gdi_.GraphicsContext_StrokeLines(*args, **kwargs)
6458
def StrokeLineSegements(*args, **kwargs):
6460
StrokeLineSegments(self, List beginPoints, List endPoints)
6462
Stroke disconnected lines from begin to end points
6464
return _gdi_.GraphicsContext_StrokeLineSegements(*args, **kwargs)
6466
def DrawLines(*args, **kwargs):
6468
DrawLines(self, size_t points, int fillStyle=ODDEVEN_RULE)
6472
return _gdi_.GraphicsContext_DrawLines(*args, **kwargs)
6474
def DrawRectangle(*args, **kwargs):
6476
DrawRectangle(self, Double x, Double y, Double w, Double h)
6480
return _gdi_.GraphicsContext_DrawRectangle(*args, **kwargs)
6482
def DrawEllipse(*args, **kwargs):
6484
DrawEllipse(self, Double x, Double y, Double w, Double h)
6488
return _gdi_.GraphicsContext_DrawEllipse(*args, **kwargs)
6490
def DrawRoundedRectangle(*args, **kwargs):
6492
DrawRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
6494
Draws a rounded rectangle
6496
return _gdi_.GraphicsContext_DrawRoundedRectangle(*args, **kwargs)
6498
def ShouldOffset(*args, **kwargs):
6500
ShouldOffset(self) -> bool
6502
helper to determine if a 0.5 offset should be applied for the drawing operation
6504
return _gdi_.GraphicsContext_ShouldOffset(*args, **kwargs)
6506
def EnableOffset(*args, **kwargs):
6507
"""EnableOffset(self, bool enable=True)"""
6508
return _gdi_.GraphicsContext_EnableOffset(*args, **kwargs)
6510
def DisableOffset(*args, **kwargs):
6511
"""DisableOffset(self)"""
6512
return _gdi_.GraphicsContext_DisableOffset(*args, **kwargs)
6514
def OffsetEnabled(*args, **kwargs):
6515
"""OffsetEnabled(self) -> bool"""
6516
return _gdi_.GraphicsContext_OffsetEnabled(*args, **kwargs)
6518
_gdi_.GraphicsContext_swigregister(GraphicsContext)
6520
def GraphicsContext_Create(*args):
6522
Create(WindowDC dc) -> GraphicsContext
6523
Create(MemoryDC dc) -> GraphicsContext
6524
Create(Window window) -> GraphicsContext
6525
Create(PrinterDC dc) -> GraphicsContext
6526
GraphicsContext_Create(Image ?) -> GraphicsContext
6528
Creates a wx.GraphicsContext either from a window or a DC.
6530
val = _gdi_.GraphicsContext_Create(*args)
6531
val.__dc = args[0] # save a ref so the dc will not be deleted before self
6534
def GraphicsContext_CreateMeasuringContext(*args):
6536
GraphicsContext_CreateMeasuringContext() -> GraphicsContext
6538
Create a lightwieght context that can be used for measuring text only.
6540
return _gdi_.GraphicsContext_CreateMeasuringContext(*args)
6542
def GraphicsContext_CreateFromNative(*args, **kwargs):
6544
GraphicsContext_CreateFromNative(void context) -> GraphicsContext
6546
Creates a wx.GraphicsContext from a native context. This native
6547
context must be eg a CGContextRef for Core Graphics, a Graphics
6548
pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
6549
wxPython we still need a way to make this value usable.
6551
return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs)
6553
def GraphicsContext_CreateFromNativeWindow(*args, **kwargs):
6555
GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext
6557
Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
6558
we still need a way to make this value usable.
6560
return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs)
6562
class GraphicsRenderer(_core.Object):
6563
"""Proxy of C++ GraphicsRenderer class"""
6564
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6565
def __init__(self): raise AttributeError, "No constructor defined"
6566
__repr__ = _swig_repr
6567
__swig_destroy__ = _gdi_.delete_GraphicsRenderer
6568
__del__ = lambda self : None;
6569
def GetDefaultRenderer(*args, **kwargs):
6570
"""GetDefaultRenderer() -> GraphicsRenderer"""
6571
return _gdi_.GraphicsRenderer_GetDefaultRenderer(*args, **kwargs)
6573
GetDefaultRenderer = staticmethod(GetDefaultRenderer)
6574
def GetCairoRenderer(*args, **kwargs):
6575
"""GetCairoRenderer() -> GraphicsRenderer"""
6576
return _gdi_.GraphicsRenderer_GetCairoRenderer(*args, **kwargs)
6578
GetCairoRenderer = staticmethod(GetCairoRenderer)
6579
def CreateContext(*args):
6581
CreateContext(self, WindowDC dc) -> GraphicsContext
6582
CreateContext(self, MemoryDC dc) -> GraphicsContext
6583
CreateContext(self, PrinterDC dc) -> GraphicsContext
6584
CreateContext(self, Window window) -> GraphicsContext
6586
return _gdi_.GraphicsRenderer_CreateContext(*args)
6588
def CreateContextFromImage(*args, **kwargs):
6589
"""CreateContextFromImage(self, Image image) -> GraphicsContext"""
6590
return _gdi_.GraphicsRenderer_CreateContextFromImage(*args, **kwargs)
6592
def CreateMeasuringContext(*args, **kwargs):
6593
"""CreateMeasuringContext(self) -> GraphicsContext"""
6594
return _gdi_.GraphicsRenderer_CreateMeasuringContext(*args, **kwargs)
6596
def CreateContextFromNativeContext(*args, **kwargs):
6597
"""CreateContextFromNativeContext(self, void context) -> GraphicsContext"""
6598
return _gdi_.GraphicsRenderer_CreateContextFromNativeContext(*args, **kwargs)
6600
def CreateContextFromNativeWindow(*args, **kwargs):
6601
"""CreateContextFromNativeWindow(self, void window) -> GraphicsContext"""
6602
return _gdi_.GraphicsRenderer_CreateContextFromNativeWindow(*args, **kwargs)
6604
def CreatePath(*args, **kwargs):
6605
"""CreatePath(self) -> GraphicsPath"""
6606
return _gdi_.GraphicsRenderer_CreatePath(*args, **kwargs)
6608
def CreateMatrix(*args, **kwargs):
6610
CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
6611
Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
6613
return _gdi_.GraphicsRenderer_CreateMatrix(*args, **kwargs)
6615
def CreatePen(*args, **kwargs):
6616
"""CreatePen(self, Pen pen) -> GraphicsPen"""
6617
return _gdi_.GraphicsRenderer_CreatePen(*args, **kwargs)
6619
def CreateBrush(*args, **kwargs):
6620
"""CreateBrush(self, Brush brush) -> GraphicsBrush"""
6621
return _gdi_.GraphicsRenderer_CreateBrush(*args, **kwargs)
6623
def CreateLinearGradientBrush(*args, **kwargs):
6624
"""CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, GraphicsGradientStops stops) -> GraphicsBrush"""
6625
return _gdi_.GraphicsRenderer_CreateLinearGradientBrush(*args, **kwargs)
6627
def CreateRadialGradientBrush(*args, **kwargs):
6629
CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
6630
GraphicsGradientStops stops) -> GraphicsBrush
6632
return _gdi_.GraphicsRenderer_CreateRadialGradientBrush(*args, **kwargs)
6634
def CreateFont(*args):
6636
CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont
6637
CreateFont(self, double sizeInPixels, String facename, int flags=FONTFLAG_DEFAULT,
6638
Colour col=*wxBLACK) -> GraphicsFont
6640
return _gdi_.GraphicsRenderer_CreateFont(*args)
6642
def CreateBitmap(*args, **kwargs):
6643
"""CreateBitmap(self, Bitmap bitmap) -> GraphicsBitmap"""
6644
return _gdi_.GraphicsRenderer_CreateBitmap(*args, **kwargs)
6646
def CreateBitmapFromImage(*args, **kwargs):
6647
"""CreateBitmapFromImage(self, Image image) -> GraphicsBitmap"""
6648
return _gdi_.GraphicsRenderer_CreateBitmapFromImage(*args, **kwargs)
6650
def CreateSubBitmap(*args, **kwargs):
6652
CreateSubBitmap(self, GraphicsBitmap bitmap, Double x, Double y, Double w,
6653
Double h) -> GraphicsBitmap
6655
return _gdi_.GraphicsRenderer_CreateSubBitmap(*args, **kwargs)
6657
_gdi_.GraphicsRenderer_swigregister(GraphicsRenderer)
6659
def GraphicsRenderer_GetDefaultRenderer(*args):
6660
"""GraphicsRenderer_GetDefaultRenderer() -> GraphicsRenderer"""
6661
return _gdi_.GraphicsRenderer_GetDefaultRenderer(*args)
6663
def GraphicsRenderer_GetCairoRenderer(*args):
6664
"""GraphicsRenderer_GetCairoRenderer() -> GraphicsRenderer"""
6665
return _gdi_.GraphicsRenderer_GetCairoRenderer(*args)
6668
"""Proxy of C++ GCDC class"""
6669
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6670
__repr__ = _swig_repr
6671
def __init__(self, *args):
6673
__init__(self, WindowDC dc) -> GCDC
6674
__init__(self, MemoryDC dc) -> GCDC
6675
__init__(self, PrinterDC dc) -> GCDC
6676
__init__(self, Window window) -> GCDC
6677
__init__(self, GraphicsContext ctx) -> GCDC
6679
_gdi_.GCDC_swiginit(self,_gdi_.new_GCDC(*args))
6680
self.__dc = args[0] # save a ref so the other dc will not be deleted before self
6682
__swig_destroy__ = _gdi_.delete_GCDC
6683
__del__ = lambda self : None;
6684
def GetGraphicsContext(*args, **kwargs):
6685
"""GetGraphicsContext(self) -> GraphicsContext"""
6686
return _gdi_.GCDC_GetGraphicsContext(*args, **kwargs)
6688
def SetGraphicsContext(*args, **kwargs):
6689
"""SetGraphicsContext(self, GraphicsContext ctx)"""
6690
return _gdi_.GCDC_SetGraphicsContext(*args, **kwargs)
6692
GraphicsContext = property(GetGraphicsContext,SetGraphicsContext)
6693
_gdi_.GCDC_swigregister(GCDC)
6695
class Overlay(object):
6696
"""Proxy of C++ Overlay class"""
6697
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6698
__repr__ = _swig_repr
6699
def __init__(self, *args, **kwargs):
6700
"""__init__(self) -> Overlay"""
6701
_gdi_.Overlay_swiginit(self,_gdi_.new_Overlay(*args, **kwargs))
6702
__swig_destroy__ = _gdi_.delete_Overlay
6703
__del__ = lambda self : None;
6704
def Reset(*args, **kwargs):
6706
return _gdi_.Overlay_Reset(*args, **kwargs)
6708
_gdi_.Overlay_swigregister(Overlay)
6710
class DCOverlay(object):
6711
"""Proxy of C++ DCOverlay class"""
6712
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6713
__repr__ = _swig_repr
6714
def __init__(self, *args):
6716
__init__(self, Overlay overlay, DC dc, int x, int y, int width, int height) -> DCOverlay
6717
__init__(self, Overlay overlay, DC dc) -> DCOverlay
6719
_gdi_.DCOverlay_swiginit(self,_gdi_.new_DCOverlay(*args))
6720
self.__dc = args[1] # save a ref so the dc will not be deleted before self
6722
__swig_destroy__ = _gdi_.delete_DCOverlay
6723
__del__ = lambda self : None;
6724
def Clear(*args, **kwargs):
6726
return _gdi_.DCOverlay_Clear(*args, **kwargs)
6728
_gdi_.DCOverlay_swigregister(DCOverlay)
6730
#---------------------------------------------------------------------------
6732
IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
6733
IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
6734
IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
6735
IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
6736
IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
6737
IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
6738
IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
6739
class ImageList(_core.Object):
6740
"""Proxy of C++ ImageList class"""
6741
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6742
__repr__ = _swig_repr
6743
def __init__(self, *args, **kwargs):
6744
"""__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
6745
_gdi_.ImageList_swiginit(self,_gdi_.new_ImageList(*args, **kwargs))
6746
__swig_destroy__ = _gdi_.delete_ImageList
6747
__del__ = lambda self : None;
6748
def Add(*args, **kwargs):
6749
"""Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
6750
return _gdi_.ImageList_Add(*args, **kwargs)
6752
def AddWithColourMask(*args, **kwargs):
6753
"""AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
6754
return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
6756
def AddIcon(*args, **kwargs):
6757
"""AddIcon(self, Icon icon) -> int"""
6758
return _gdi_.ImageList_AddIcon(*args, **kwargs)
6760
def GetBitmap(*args, **kwargs):
6761
"""GetBitmap(self, int index) -> Bitmap"""
6762
return _gdi_.ImageList_GetBitmap(*args, **kwargs)
6764
def GetIcon(*args, **kwargs):
6765
"""GetIcon(self, int index) -> Icon"""
6766
return _gdi_.ImageList_GetIcon(*args, **kwargs)
6768
def Replace(*args, **kwargs):
6769
"""Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
6770
return _gdi_.ImageList_Replace(*args, **kwargs)
6772
def Draw(*args, **kwargs):
6774
Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
6775
bool solidBackground=False) -> bool
6777
return _gdi_.ImageList_Draw(*args, **kwargs)
6779
def GetImageCount(*args, **kwargs):
6780
"""GetImageCount(self) -> int"""
6781
return _gdi_.ImageList_GetImageCount(*args, **kwargs)
6783
def Remove(*args, **kwargs):
6784
"""Remove(self, int index) -> bool"""
6785
return _gdi_.ImageList_Remove(*args, **kwargs)
6787
def RemoveAll(*args, **kwargs):
6788
"""RemoveAll(self) -> bool"""
6789
return _gdi_.ImageList_RemoveAll(*args, **kwargs)
6791
def GetSize(*args, **kwargs):
6792
"""GetSize(index) -> (width,height)"""
6793
return _gdi_.ImageList_GetSize(*args, **kwargs)
6795
ImageCount = property(GetImageCount,doc="See `GetImageCount`")
6796
Size = property(GetSize,doc="See `GetSize`")
6797
_gdi_.ImageList_swigregister(ImageList)
6799
#---------------------------------------------------------------------------
6801
class StockGDI(object):
6802
"""Proxy of C++ StockGDI class"""
6803
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6804
__repr__ = _swig_repr
6805
BRUSH_BLACK = _gdi_.StockGDI_BRUSH_BLACK
6806
BRUSH_BLUE = _gdi_.StockGDI_BRUSH_BLUE
6807
BRUSH_CYAN = _gdi_.StockGDI_BRUSH_CYAN
6808
BRUSH_GREEN = _gdi_.StockGDI_BRUSH_GREEN
6809
BRUSH_YELLOW = _gdi_.StockGDI_BRUSH_YELLOW
6810
BRUSH_GREY = _gdi_.StockGDI_BRUSH_GREY
6811
BRUSH_LIGHTGREY = _gdi_.StockGDI_BRUSH_LIGHTGREY
6812
BRUSH_MEDIUMGREY = _gdi_.StockGDI_BRUSH_MEDIUMGREY
6813
BRUSH_RED = _gdi_.StockGDI_BRUSH_RED
6814
BRUSH_TRANSPARENT = _gdi_.StockGDI_BRUSH_TRANSPARENT
6815
BRUSH_WHITE = _gdi_.StockGDI_BRUSH_WHITE
6816
COLOUR_BLACK = _gdi_.StockGDI_COLOUR_BLACK
6817
COLOUR_BLUE = _gdi_.StockGDI_COLOUR_BLUE
6818
COLOUR_CYAN = _gdi_.StockGDI_COLOUR_CYAN
6819
COLOUR_GREEN = _gdi_.StockGDI_COLOUR_GREEN
6820
COLOUR_YELLOW = _gdi_.StockGDI_COLOUR_YELLOW
6821
COLOUR_LIGHTGREY = _gdi_.StockGDI_COLOUR_LIGHTGREY
6822
COLOUR_RED = _gdi_.StockGDI_COLOUR_RED
6823
COLOUR_WHITE = _gdi_.StockGDI_COLOUR_WHITE
6824
CURSOR_CROSS = _gdi_.StockGDI_CURSOR_CROSS
6825
CURSOR_HOURGLASS = _gdi_.StockGDI_CURSOR_HOURGLASS
6826
CURSOR_STANDARD = _gdi_.StockGDI_CURSOR_STANDARD
6827
FONT_ITALIC = _gdi_.StockGDI_FONT_ITALIC
6828
FONT_NORMAL = _gdi_.StockGDI_FONT_NORMAL
6829
FONT_SMALL = _gdi_.StockGDI_FONT_SMALL
6830
FONT_SWISS = _gdi_.StockGDI_FONT_SWISS
6831
PEN_BLACK = _gdi_.StockGDI_PEN_BLACK
6832
PEN_BLACKDASHED = _gdi_.StockGDI_PEN_BLACKDASHED
6833
PEN_BLUE = _gdi_.StockGDI_PEN_BLUE
6834
PEN_CYAN = _gdi_.StockGDI_PEN_CYAN
6835
PEN_GREEN = _gdi_.StockGDI_PEN_GREEN
6836
PEN_YELLOW = _gdi_.StockGDI_PEN_YELLOW
6837
PEN_GREY = _gdi_.StockGDI_PEN_GREY
6838
PEN_LIGHTGREY = _gdi_.StockGDI_PEN_LIGHTGREY
6839
PEN_MEDIUMGREY = _gdi_.StockGDI_PEN_MEDIUMGREY
6840
PEN_RED = _gdi_.StockGDI_PEN_RED
6841
PEN_TRANSPARENT = _gdi_.StockGDI_PEN_TRANSPARENT
6842
PEN_WHITE = _gdi_.StockGDI_PEN_WHITE
6843
ITEMCOUNT = _gdi_.StockGDI_ITEMCOUNT
6844
def __init__(self, *args, **kwargs):
6845
"""__init__(self) -> StockGDI"""
6846
_gdi_.StockGDI_swiginit(self,_gdi_.new_StockGDI(*args, **kwargs))
6847
__swig_destroy__ = _gdi_.delete_StockGDI
6848
__del__ = lambda self : None;
6849
def DeleteAll(*args, **kwargs):
6851
return _gdi_.StockGDI_DeleteAll(*args, **kwargs)
6853
DeleteAll = staticmethod(DeleteAll)
6854
def instance(*args, **kwargs):
6855
"""instance() -> StockGDI"""
6856
return _gdi_.StockGDI_instance(*args, **kwargs)
6858
instance = staticmethod(instance)
6859
def GetBrush(*args, **kwargs):
6860
"""GetBrush(int item) -> Brush"""
6861
return _gdi_.StockGDI_GetBrush(*args, **kwargs)
6863
GetBrush = staticmethod(GetBrush)
6864
def GetColour(*args, **kwargs):
6865
"""GetColour(int item) -> Colour"""
6866
return _gdi_.StockGDI_GetColour(*args, **kwargs)
6868
GetColour = staticmethod(GetColour)
6869
def GetCursor(*args, **kwargs):
6870
"""GetCursor(int item) -> Cursor"""
6871
return _gdi_.StockGDI_GetCursor(*args, **kwargs)
6873
GetCursor = staticmethod(GetCursor)
6874
def GetPen(*args, **kwargs):
6875
"""GetPen(int item) -> Pen"""
6876
return _gdi_.StockGDI_GetPen(*args, **kwargs)
6878
GetPen = staticmethod(GetPen)
6879
def GetFont(*args, **kwargs):
6880
"""GetFont(self, int item) -> Font"""
6881
return _gdi_.StockGDI_GetFont(*args, **kwargs)
6883
def _initStockObjects():
6885
wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this
6886
wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this
6887
wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this
6888
wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this
6890
wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this
6891
wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this
6892
wx.BLUE_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLUE).this
6893
wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this
6894
wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this
6895
wx.YELLOW_PEN.this = StockGDI.GetPen(StockGDI.PEN_YELLOW).this
6896
wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this
6897
wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this
6898
wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this
6899
wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this
6900
wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this
6901
wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this
6903
wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this
6904
wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this
6905
wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this
6906
wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this
6907
wx.YELLOW_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_YELLOW).this
6908
wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this
6909
wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this
6910
wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this
6911
wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this
6912
wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this
6913
wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this
6915
wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this
6916
wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this
6917
wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this
6918
wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this
6919
wx.YELLOW.this = StockGDI.GetColour(StockGDI.COLOUR_YELLOW).this
6920
wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this
6921
wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this
6922
wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this
6924
wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this
6925
wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this
6926
wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this
6928
wx.TheFontList.this = _wxPyInitTheFontList().this
6929
wx.ThePenList.this = _wxPyInitThePenList().this
6930
wx.TheBrushList.this = _wxPyInitTheBrushList().this
6931
wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this
6933
_initStockObjects = staticmethod(_initStockObjects)
6935
_gdi_.StockGDI_swigregister(StockGDI)
6937
def StockGDI_DeleteAll(*args):
6938
"""StockGDI_DeleteAll()"""
6939
return _gdi_.StockGDI_DeleteAll(*args)
6941
def StockGDI_instance(*args):
6942
"""StockGDI_instance() -> StockGDI"""
6943
return _gdi_.StockGDI_instance(*args)
6945
def StockGDI_GetBrush(*args, **kwargs):
6946
"""StockGDI_GetBrush(int item) -> Brush"""
6947
return _gdi_.StockGDI_GetBrush(*args, **kwargs)
6949
def StockGDI_GetColour(*args, **kwargs):
6950
"""StockGDI_GetColour(int item) -> Colour"""
6951
return _gdi_.StockGDI_GetColour(*args, **kwargs)
6953
def StockGDI_GetCursor(*args, **kwargs):
6954
"""StockGDI_GetCursor(int item) -> Cursor"""
6955
return _gdi_.StockGDI_GetCursor(*args, **kwargs)
6957
def StockGDI_GetPen(*args, **kwargs):
6958
"""StockGDI_GetPen(int item) -> Pen"""
6959
return _gdi_.StockGDI_GetPen(*args, **kwargs)
6961
# Create an uninitialized instance for the stock objects, they will
6962
# be initialized later when the wx.App object is created.
6963
ITALIC_FONT = Font.__new__(Font)
6964
NORMAL_FONT = Font.__new__(Font)
6965
SMALL_FONT = Font.__new__(Font)
6966
SWISS_FONT = Font.__new__(Font)
6968
BLACK_DASHED_PEN = Pen.__new__(Pen)
6969
BLACK_PEN = Pen.__new__(Pen)
6970
BLUE_PEN = Pen.__new__(Pen)
6971
CYAN_PEN = Pen.__new__(Pen)
6972
GREEN_PEN = Pen.__new__(Pen)
6973
YELLOW_PEN = Pen.__new__(Pen)
6974
GREY_PEN = Pen.__new__(Pen)
6975
LIGHT_GREY_PEN = Pen.__new__(Pen)
6976
MEDIUM_GREY_PEN = Pen.__new__(Pen)
6977
RED_PEN = Pen.__new__(Pen)
6978
TRANSPARENT_PEN = Pen.__new__(Pen)
6979
WHITE_PEN = Pen.__new__(Pen)
6981
BLACK_BRUSH = Brush.__new__(Brush)
6982
BLUE_BRUSH = Brush.__new__(Brush)
6983
CYAN_BRUSH = Brush.__new__(Brush)
6984
GREEN_BRUSH = Brush.__new__(Brush)
6985
YELLOW_BRUSH = Brush.__new__(Brush)
6986
GREY_BRUSH = Brush.__new__(Brush)
6987
LIGHT_GREY_BRUSH = Brush.__new__(Brush)
6988
MEDIUM_GREY_BRUSH = Brush.__new__(Brush)
6989
RED_BRUSH = Brush.__new__(Brush)
6990
TRANSPARENT_BRUSH = Brush.__new__(Brush)
6991
WHITE_BRUSH = Brush.__new__(Brush)
6993
BLACK = Colour.__new__(Colour)
6994
BLUE = Colour.__new__(Colour)
6995
CYAN = Colour.__new__(Colour)
6996
GREEN = Colour.__new__(Colour)
6997
YELLOW = Colour.__new__(Colour)
6998
LIGHT_GREY = Colour.__new__(Colour)
6999
RED = Colour.__new__(Colour)
7000
WHITE = Colour.__new__(Colour)
7002
CROSS_CURSOR = Cursor.__new__(Cursor)
7003
HOURGLASS_CURSOR = Cursor.__new__(Cursor)
7004
STANDARD_CURSOR = Cursor.__new__(Cursor)
7006
TransparentColour = Colour(0,0,0,ALPHA_TRANSPARENT)
7008
class GDIObjListBase(object):
7009
"""Proxy of C++ GDIObjListBase class"""
7010
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7011
__repr__ = _swig_repr
7012
def __init__(self, *args, **kwargs):
7013
"""__init__(self) -> GDIObjListBase"""
7014
_gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs))
7015
__swig_destroy__ = _gdi_.delete_GDIObjListBase
7016
__del__ = lambda self : None;
7017
_gdi_.GDIObjListBase_swigregister(GDIObjListBase)
7018
NullBitmap = cvar.NullBitmap
7019
NullIcon = cvar.NullIcon
7020
NullCursor = cvar.NullCursor
7021
NullPen = cvar.NullPen
7022
NullBrush = cvar.NullBrush
7023
NullPalette = cvar.NullPalette
7024
NullFont = cvar.NullFont
7025
NullColour = cvar.NullColour
7026
NullIconBundle = cvar.NullIconBundle
7028
class PenList(GDIObjListBase):
7029
"""Proxy of C++ PenList class"""
7030
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7031
def __init__(self): raise AttributeError, "No constructor defined"
7032
__repr__ = _swig_repr
7033
def FindOrCreatePen(*args, **kwargs):
7034
"""FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
7035
return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
7037
_gdi_.PenList_swigregister(PenList)
7039
class BrushList(GDIObjListBase):
7040
"""Proxy of C++ BrushList class"""
7041
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7042
def __init__(self): raise AttributeError, "No constructor defined"
7043
__repr__ = _swig_repr
7044
def FindOrCreateBrush(*args, **kwargs):
7045
"""FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
7046
return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
7048
_gdi_.BrushList_swigregister(BrushList)
7050
class FontList(GDIObjListBase):
7051
"""Proxy of C++ FontList class"""
7052
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7053
def __init__(self): raise AttributeError, "No constructor defined"
7054
__repr__ = _swig_repr
7055
def FindOrCreateFont(*args, **kwargs):
7057
FindOrCreateFont(self, int point_size, int family, int style, int weight,
7058
bool underline=False, String facename=EmptyString,
7059
int encoding=FONTENCODING_DEFAULT) -> Font
7061
return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
7063
_gdi_.FontList_swigregister(FontList)
7065
class ColourDatabase(object):
7066
"""Proxy of C++ ColourDatabase class"""
7067
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7068
__repr__ = _swig_repr
7069
def __init__(self, *args, **kwargs):
7070
"""__init__(self) -> ColourDatabase"""
7071
_gdi_.ColourDatabase_swiginit(self,_gdi_.new_ColourDatabase(*args, **kwargs))
7072
__swig_destroy__ = _gdi_.delete_ColourDatabase
7073
__del__ = lambda self : None;
7074
def Find(*args, **kwargs):
7075
"""Find(self, String name) -> Colour"""
7076
return _gdi_.ColourDatabase_Find(*args, **kwargs)
7078
def FindName(*args, **kwargs):
7079
"""FindName(self, Colour colour) -> String"""
7080
return _gdi_.ColourDatabase_FindName(*args, **kwargs)
7083
def AddColour(*args, **kwargs):
7084
"""AddColour(self, String name, Colour colour)"""
7085
return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
7087
def Append(*args, **kwargs):
7088
"""Append(self, String name, int red, int green, int blue)"""
7089
return _gdi_.ColourDatabase_Append(*args, **kwargs)
7091
_gdi_.ColourDatabase_swigregister(ColourDatabase)
7093
#---------------------------------------------------------------------------
7096
def _wxPyInitTheFontList(*args):
7097
"""_wxPyInitTheFontList() -> FontList"""
7098
return _gdi_._wxPyInitTheFontList(*args)
7100
def _wxPyInitThePenList(*args):
7101
"""_wxPyInitThePenList() -> PenList"""
7102
return _gdi_._wxPyInitThePenList(*args)
7104
def _wxPyInitTheBrushList(*args):
7105
"""_wxPyInitTheBrushList() -> BrushList"""
7106
return _gdi_._wxPyInitTheBrushList(*args)
7108
def _wxPyInitTheColourDatabase(*args):
7109
"""_wxPyInitTheColourDatabase() -> ColourDatabase"""
7110
return _gdi_._wxPyInitTheColourDatabase(*args)
7111
# Create an uninitialized instance for the stock objects, they will
7112
# be initialized later when the wx.App object is created.
7113
TheFontList = FontList.__new__(FontList)
7114
ThePenList = PenList.__new__(PenList)
7115
TheBrushList = BrushList.__new__(BrushList)
7116
TheColourDatabase = ColourDatabase.__new__(ColourDatabase)
7118
#---------------------------------------------------------------------------
7120
CONTROL_DISABLED = _gdi_.CONTROL_DISABLED
7121
CONTROL_FOCUSED = _gdi_.CONTROL_FOCUSED
7122
CONTROL_PRESSED = _gdi_.CONTROL_PRESSED
7123
CONTROL_SPECIAL = _gdi_.CONTROL_SPECIAL
7124
CONTROL_ISDEFAULT = _gdi_.CONTROL_ISDEFAULT
7125
CONTROL_ISSUBMENU = _gdi_.CONTROL_ISSUBMENU
7126
CONTROL_EXPANDED = _gdi_.CONTROL_EXPANDED
7127
CONTROL_SIZEGRIP = _gdi_.CONTROL_SIZEGRIP
7128
CONTROL_FLAT = _gdi_.CONTROL_FLAT
7129
CONTROL_CURRENT = _gdi_.CONTROL_CURRENT
7130
CONTROL_SELECTED = _gdi_.CONTROL_SELECTED
7131
CONTROL_CHECKED = _gdi_.CONTROL_CHECKED
7132
CONTROL_CHECKABLE = _gdi_.CONTROL_CHECKABLE
7133
CONTROL_UNDETERMINED = _gdi_.CONTROL_UNDETERMINED
7134
CONTROL_FLAGS_MASK = _gdi_.CONTROL_FLAGS_MASK
7135
CONTROL_DIRTY = _gdi_.CONTROL_DIRTY
7136
TITLEBAR_BUTTON_CLOSE = _gdi_.TITLEBAR_BUTTON_CLOSE
7137
TITLEBAR_BUTTON_MAXIMIZE = _gdi_.TITLEBAR_BUTTON_MAXIMIZE
7138
TITLEBAR_BUTTON_ICONIZE = _gdi_.TITLEBAR_BUTTON_ICONIZE
7139
TITLEBAR_BUTTON_RESTORE = _gdi_.TITLEBAR_BUTTON_RESTORE
7140
TITLEBAR_BUTTON_HELP = _gdi_.TITLEBAR_BUTTON_HELP
7141
class SplitterRenderParams(object):
7143
This is just a simple struct used as a return value of
7144
`wx.RendererNative.GetSplitterParams` and contains some platform
7145
specific metrics about splitters.
7147
* widthSash: the width of the splitter sash.
7148
* border: the width of the border of the splitter window.
7149
* isHotSensitive: ``True`` if the splitter changes its
7150
appearance when the mouse is over it.
7154
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7155
__repr__ = _swig_repr
7156
def __init__(self, *args, **kwargs):
7158
__init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
7160
This is just a simple struct used as a return value of
7161
`wx.RendererNative.GetSplitterParams` and contains some platform
7162
specific metrics about splitters.
7164
* widthSash: the width of the splitter sash.
7165
* border: the width of the border of the splitter window.
7166
* isHotSensitive: ``True`` if the splitter changes its
7167
appearance when the mouse is over it.
7171
_gdi_.SplitterRenderParams_swiginit(self,_gdi_.new_SplitterRenderParams(*args, **kwargs))
7172
__swig_destroy__ = _gdi_.delete_SplitterRenderParams
7173
__del__ = lambda self : None;
7174
widthSash = property(_gdi_.SplitterRenderParams_widthSash_get)
7175
border = property(_gdi_.SplitterRenderParams_border_get)
7176
isHotSensitive = property(_gdi_.SplitterRenderParams_isHotSensitive_get)
7177
_gdi_.SplitterRenderParams_swigregister(SplitterRenderParams)
7179
class HeaderButtonParams(object):
7180
"""Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`"""
7181
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7182
__repr__ = _swig_repr
7183
def __init__(self, *args, **kwargs):
7185
__init__(self) -> HeaderButtonParams
7187
Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`
7189
_gdi_.HeaderButtonParams_swiginit(self,_gdi_.new_HeaderButtonParams(*args, **kwargs))
7190
__swig_destroy__ = _gdi_.delete_HeaderButtonParams
7191
__del__ = lambda self : None;
7192
m_arrowColour = property(_gdi_.HeaderButtonParams_m_arrowColour_get, _gdi_.HeaderButtonParams_m_arrowColour_set)
7193
m_selectionColour = property(_gdi_.HeaderButtonParams_m_selectionColour_get, _gdi_.HeaderButtonParams_m_selectionColour_set)
7194
m_labelText = property(_gdi_.HeaderButtonParams_m_labelText_get, _gdi_.HeaderButtonParams_m_labelText_set)
7195
m_labelFont = property(_gdi_.HeaderButtonParams_m_labelFont_get, _gdi_.HeaderButtonParams_m_labelFont_set)
7196
m_labelColour = property(_gdi_.HeaderButtonParams_m_labelColour_get, _gdi_.HeaderButtonParams_m_labelColour_set)
7197
m_labelBitmap = property(_gdi_.HeaderButtonParams_m_labelBitmap_get, _gdi_.HeaderButtonParams_m_labelBitmap_set)
7198
m_labelAlignment = property(_gdi_.HeaderButtonParams_m_labelAlignment_get, _gdi_.HeaderButtonParams_m_labelAlignment_set)
7199
_gdi_.HeaderButtonParams_swigregister(HeaderButtonParams)
7201
HDR_SORT_ICON_NONE = _gdi_.HDR_SORT_ICON_NONE
7202
HDR_SORT_ICON_UP = _gdi_.HDR_SORT_ICON_UP
7203
HDR_SORT_ICON_DOWN = _gdi_.HDR_SORT_ICON_DOWN
7204
class RendererVersion(object):
7206
This simple struct represents the `wx.RendererNative` interface
7207
version and is only used as the return value of
7208
`wx.RendererNative.GetVersion`.
7210
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7211
__repr__ = _swig_repr
7212
def __init__(self, *args, **kwargs):
7214
__init__(self, int version_, int age_) -> RendererVersion
7216
This simple struct represents the `wx.RendererNative` interface
7217
version and is only used as the return value of
7218
`wx.RendererNative.GetVersion`.
7220
_gdi_.RendererVersion_swiginit(self,_gdi_.new_RendererVersion(*args, **kwargs))
7221
__swig_destroy__ = _gdi_.delete_RendererVersion
7222
__del__ = lambda self : None;
7223
Current_Version = _gdi_.RendererVersion_Current_Version
7224
Current_Age = _gdi_.RendererVersion_Current_Age
7225
def IsCompatible(*args, **kwargs):
7226
"""IsCompatible(RendererVersion ver) -> bool"""
7227
return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
7229
IsCompatible = staticmethod(IsCompatible)
7230
version = property(_gdi_.RendererVersion_version_get)
7231
age = property(_gdi_.RendererVersion_age_get)
7232
_gdi_.RendererVersion_swigregister(RendererVersion)
7234
def RendererVersion_IsCompatible(*args, **kwargs):
7235
"""RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
7236
return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
7238
class RendererNative(object):
7240
One of the design principles of wxWidgets is to use the native
7241
widgets on every platform in order to be as close as possible to
7242
the native look and feel on every platform. However there are
7243
still cases when some generic widgets are needed for various
7244
reasons, but it can sometimes take a lot of messy work to make
7245
them conform to the native LnF.
7247
The wx.RendererNative class is a collection of functions that have
7248
platform-specific implementations for drawing certain parts of
7249
genereic controls in ways that are as close to the native look as
7252
Note that each drawing function restores the `wx.DC` attributes if it
7253
changes them, so it is safe to assume that the same pen, brush and
7254
colours that were active before the call to this function are still in
7258
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7259
def __init__(self): raise AttributeError, "No constructor defined"
7260
__repr__ = _swig_repr
7261
def DrawHeaderButton(*args, **kwargs):
7263
DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
7264
HeaderButtonParams params=None) -> int
7266
Draw a header control button (such as what is used by `wx.ListCtrl` in report
7267
mode.) The optimal size of the label (text and icons) is returned.
7269
return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs)
7271
def DrawHeaderButtonContents(*args, **kwargs):
7273
DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
7274
HeaderButtonParams params=None) -> int
7276
Draw the contents of a header control button, (label, sort
7277
arrows, etc.) Normally this is only called by `DrawHeaderButton`.
7279
return _gdi_.RendererNative_DrawHeaderButtonContents(*args, **kwargs)
7281
def GetHeaderButtonHeight(*args, **kwargs):
7283
GetHeaderButtonHeight(self, Window win) -> int
7285
Returns the default height of a header button, either a fixed platform
7286
height if available, or a generic height based on the window's font.
7288
return _gdi_.RendererNative_GetHeaderButtonHeight(*args, **kwargs)
7290
def GetHeaderButtonMargin(*args, **kwargs):
7291
"""GetHeaderButtonMargin(self, Window win) -> int"""
7292
return _gdi_.RendererNative_GetHeaderButtonMargin(*args, **kwargs)
7294
def DrawTreeItemButton(*args, **kwargs):
7296
DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
7298
Draw the expanded/collapsed icon for a tree control item.
7300
return _gdi_.RendererNative_DrawTreeItemButton(*args, **kwargs)
7302
def DrawSplitterBorder(*args, **kwargs):
7304
DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
7306
Draw the border for a sash window: this border must be such that the
7307
sash drawn by `DrawSplitterSash` blends into it well.
7309
return _gdi_.RendererNative_DrawSplitterBorder(*args, **kwargs)
7311
def DrawSplitterSash(*args, **kwargs):
7313
DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
7316
Draw a sash. The orient parameter defines whether the sash should be
7317
vertical or horizontal and how the position should be interpreted.
7319
return _gdi_.RendererNative_DrawSplitterSash(*args, **kwargs)
7321
def DrawComboBoxDropButton(*args, **kwargs):
7323
DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
7325
Draw a button like the one used by `wx.ComboBox` to show a drop down
7326
window. The usual appearance is a downwards pointing arrow.
7328
The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
7329
``wx.CONTROL_CURRENT`` bits set.
7331
return _gdi_.RendererNative_DrawComboBoxDropButton(*args, **kwargs)
7333
def DrawDropArrow(*args, **kwargs):
7335
DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
7337
Draw a drop down arrow that is suitable for use outside a combo
7338
box. Arrow will have a transparent background.
7340
``rect`` is not entirely filled by the arrow. Instead, you should use
7341
bounding rectangle of a drop down button which arrow matches the size
7342
you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
7343
``wx.CONTROL_CURRENT`` bit set.
7345
return _gdi_.RendererNative_DrawDropArrow(*args, **kwargs)
7347
def DrawCheckBox(*args, **kwargs):
7349
DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
7351
Draw a check button. Flags may use wx.CONTROL_CHECKED,
7352
wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
7354
return _gdi_.RendererNative_DrawCheckBox(*args, **kwargs)
7356
def GetCheckBoxSize(*args, **kwargs):
7357
"""GetCheckBoxSize(self, Window win) -> Size"""
7358
return _gdi_.RendererNative_GetCheckBoxSize(*args, **kwargs)
7360
def DrawPushButton(*args, **kwargs):
7362
DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
7364
Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
7365
wx.CONTROL_ISDEFAULT
7367
return _gdi_.RendererNative_DrawPushButton(*args, **kwargs)
7369
def DrawItemSelectionRect(*args, **kwargs):
7371
DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
7373
Draw rectangle indicating that an item in e.g. a list control has been
7376
The flags parameter may be:
7378
==================== ============================================
7379
wx.CONTROL_SELECTED item is selected, e.g. draw background
7380
wx.CONTROL_CURRENT item is the current item, e.g. dotted border
7381
wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
7382
background vs. grey otherwise
7383
==================== ============================================
7386
return _gdi_.RendererNative_DrawItemSelectionRect(*args, **kwargs)
7388
def DrawFocusRect(*args, **kwargs):
7390
DrawFocusRect(self, Window win, DC dc, Rect rect, int flags=0)
7392
Draw the focus rectangle around the label contained in the given rect.
7393
Only wxCONTROL_SELECTED makes sense in flags here
7395
return _gdi_.RendererNative_DrawFocusRect(*args, **kwargs)
7397
def GetSplitterParams(*args, **kwargs):
7399
GetSplitterParams(self, Window win) -> SplitterRenderParams
7401
Get the splitter parameters, see `wx.SplitterRenderParams`.
7403
return _gdi_.RendererNative_GetSplitterParams(*args, **kwargs)
7405
def DrawChoice(*args, **kwargs):
7407
DrawChoice(self, Window win, DC dc, Rect rect, int flags=0)
7409
Draw a native wxChoice
7411
return _gdi_.RendererNative_DrawChoice(*args, **kwargs)
7413
def DrawComboBox(*args, **kwargs):
7415
DrawComboBox(self, Window win, DC dc, Rect rect, int flags=0)
7417
Draw a native wxComboBox
7419
return _gdi_.RendererNative_DrawComboBox(*args, **kwargs)
7421
def DrawTextCtrl(*args, **kwargs):
7423
DrawTextCtrl(self, Window win, DC dc, Rect rect, int flags=0)
7425
Draw a native wxTextCtrl
7427
return _gdi_.RendererNative_DrawTextCtrl(*args, **kwargs)
7429
def DrawRadioBitmap(*args, **kwargs):
7431
DrawRadioBitmap(self, Window win, DC dc, Rect rect, int flags=0)
7433
Draw a native wxRadioButton (just the button image, not the text)
7435
return _gdi_.RendererNative_DrawRadioBitmap(*args, **kwargs)
7437
DrawRadioButton = wx.deprecated(DrawRadioBitmap,
7438
'DrawRadioButton is deprecated, use `DrawRadioBitmap` instead.')
7440
def DrawTitleBarBitmap(*args, **kwargs):
7442
DrawTitleBarBitmap(self, Window win, DC dc, Rect rect, int button, int flags=0)
7444
Draw one of the standard title bar buttons.
7446
This is currently implemented only for MSW and OS X (for the close
7447
button only) because there is no way to render standard title bar
7448
buttons under the other platforms, the best can be done is to use
7449
normal (only) images which wxArtProvider provides for wxART_HELP and
7450
wxART_CLOSE (but not any other title bar buttons)
7452
return _gdi_.RendererNative_DrawTitleBarBitmap(*args, **kwargs)
7454
def Get(*args, **kwargs):
7456
Get() -> RendererNative
7458
Return the currently used renderer
7460
return _gdi_.RendererNative_Get(*args, **kwargs)
7462
Get = staticmethod(Get)
7463
def GetGeneric(*args, **kwargs):
7465
GetGeneric() -> RendererNative
7467
Return the generic implementation of the renderer. Under some
7468
platforms, this is the default renderer implementation, others have
7469
platform-specific default renderer which can be retrieved by calling
7470
`wx.RendererNative.GetDefault`.
7472
return _gdi_.RendererNative_GetGeneric(*args, **kwargs)
7474
GetGeneric = staticmethod(GetGeneric)
7475
def GetDefault(*args, **kwargs):
7477
GetDefault() -> RendererNative
7479
Return the default (native) implementation for this platform -- this
7480
is also the one used by default but this may be changed by calling
7481
`wx.RendererNative.Set` in which case the return value of this method
7482
may be different from the return value of `wx.RendererNative.Get`.
7484
return _gdi_.RendererNative_GetDefault(*args, **kwargs)
7486
GetDefault = staticmethod(GetDefault)
7487
def Set(*args, **kwargs):
7489
Set(RendererNative renderer) -> RendererNative
7491
Set the renderer to use, passing None reverts to using the default
7492
renderer. Returns the previous renderer used with Set or None.
7494
return _gdi_.RendererNative_Set(*args, **kwargs)
7496
Set = staticmethod(Set)
7497
def GetVersion(*args, **kwargs):
7499
GetVersion(self) -> RendererVersion
7501
Returns the version of the renderer. Will be used for ensuring
7502
compatibility of dynamically loaded renderers.
7504
return _gdi_.RendererNative_GetVersion(*args, **kwargs)
7506
SplitterParams = property(GetSplitterParams,doc="See `GetSplitterParams`")
7507
Version = property(GetVersion,doc="See `GetVersion`")
7508
_gdi_.RendererNative_swigregister(RendererNative)
7510
def RendererNative_Get(*args):
7512
RendererNative_Get() -> RendererNative
7514
Return the currently used renderer
7516
return _gdi_.RendererNative_Get(*args)
7518
def RendererNative_GetGeneric(*args):
7520
RendererNative_GetGeneric() -> RendererNative
7522
Return the generic implementation of the renderer. Under some
7523
platforms, this is the default renderer implementation, others have
7524
platform-specific default renderer which can be retrieved by calling
7525
`wx.RendererNative.GetDefault`.
7527
return _gdi_.RendererNative_GetGeneric(*args)
7529
def RendererNative_GetDefault(*args):
7531
RendererNative_GetDefault() -> RendererNative
7533
Return the default (native) implementation for this platform -- this
7534
is also the one used by default but this may be changed by calling
7535
`wx.RendererNative.Set` in which case the return value of this method
7536
may be different from the return value of `wx.RendererNative.Get`.
7538
return _gdi_.RendererNative_GetDefault(*args)
7540
def RendererNative_Set(*args, **kwargs):
7542
RendererNative_Set(RendererNative renderer) -> RendererNative
7544
Set the renderer to use, passing None reverts to using the default
7545
renderer. Returns the previous renderer used with Set or None.
7547
return _gdi_.RendererNative_Set(*args, **kwargs)
7549
#---------------------------------------------------------------------------
7551
class PseudoDC(_core.Object):
7553
A PseudoDC is an object that can be used as if it were a `wx.DC`. All
7554
commands issued to the PseudoDC are stored in a list. You can then
7555
play these commands back to a real DC object using the DrawToDC
7556
method. Commands in the command list are indexed by ID. You can use
7557
this to clear the operations associated with a single ID and then
7558
re-draw the object associated with that ID.
7560
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7561
__repr__ = _swig_repr
7562
def __init__(self, *args, **kwargs):
7564
__init__(self) -> PseudoDC
7566
Constructs a new Pseudo device context for recording dc operations
7568
_gdi_.PseudoDC_swiginit(self,_gdi_.new_PseudoDC(*args, **kwargs))
7569
def BeginDrawing(*args, **kwargs):
7573
Allows for optimization of drawing code on platforms that need it. On
7574
other platforms this is just an empty function and is harmless. To
7575
take advantage of this postential optimization simply enclose each
7576
group of calls to the drawing primitives within calls to
7577
`BeginDrawing` and `EndDrawing`.
7579
return _gdi_.PseudoDC_BeginDrawing(*args, **kwargs)
7581
def EndDrawing(*args, **kwargs):
7585
Ends the group of drawing primitives started with `BeginDrawing`, and
7586
invokes whatever optimization is available for this DC type on the
7589
return _gdi_.PseudoDC_EndDrawing(*args, **kwargs)
7591
__swig_destroy__ = _gdi_.delete_PseudoDC
7592
__del__ = lambda self : None;
7593
def RemoveAll(*args, **kwargs):
7597
Removes all objects and operations from the recorded list.
7599
return _gdi_.PseudoDC_RemoveAll(*args, **kwargs)
7601
def GetLen(*args, **kwargs):
7605
Returns the number of operations in the recorded list.
7607
return _gdi_.PseudoDC_GetLen(*args, **kwargs)
7609
def SetId(*args, **kwargs):
7613
Sets the id to be associated with subsequent operations.
7615
return _gdi_.PseudoDC_SetId(*args, **kwargs)
7617
def ClearId(*args, **kwargs):
7619
ClearId(self, int id)
7621
Removes all operations associated with id so the object can be redrawn.
7623
return _gdi_.PseudoDC_ClearId(*args, **kwargs)
7625
def RemoveId(*args, **kwargs):
7627
RemoveId(self, int id)
7629
Remove the object node (and all operations) associated with an id.
7631
return _gdi_.PseudoDC_RemoveId(*args, **kwargs)
7633
def TranslateId(*args, **kwargs):
7635
TranslateId(self, int id, int dx, int dy)
7637
Translate the operations of id by dx,dy.
7639
return _gdi_.PseudoDC_TranslateId(*args, **kwargs)
7641
def SetIdGreyedOut(*args, **kwargs):
7643
SetIdGreyedOut(self, int id, bool greyout=True)
7645
Set whether an object is drawn greyed out or not.
7647
return _gdi_.PseudoDC_SetIdGreyedOut(*args, **kwargs)
7649
def GetIdGreyedOut(*args, **kwargs):
7651
GetIdGreyedOut(self, int id) -> bool
7653
Get whether an object is drawn greyed out or not.
7655
return _gdi_.PseudoDC_GetIdGreyedOut(*args, **kwargs)
7657
def FindObjects(*args, **kwargs):
7659
FindObjects(self, int x, int y, int radius=1, Colour bg=*wxWHITE) -> PyObject
7661
Returns a list of all the id's that draw a pixel with color
7662
not equal to bg within radius of (x,y).
7663
Returns an empty list if nothing is found. The list is in
7664
reverse drawing order so list[0] is the top id.
7666
return _gdi_.PseudoDC_FindObjects(*args, **kwargs)
7668
def FindObjectsByBBox(*args, **kwargs):
7670
FindObjectsByBBox(self, int x, int y) -> PyObject
7672
Returns a list of all the id's whose bounding boxes include (x,y).
7673
Returns an empty list if nothing is found. The list is in
7674
reverse drawing order so list[0] is the top id.
7676
return _gdi_.PseudoDC_FindObjectsByBBox(*args, **kwargs)
7678
def DrawIdToDC(*args, **kwargs):
7680
DrawIdToDC(self, int id, DC dc)
7682
Draw recorded operations of id to dc.
7684
return _gdi_.PseudoDC_DrawIdToDC(*args, **kwargs)
7686
def SetIdBounds(*args, **kwargs):
7688
SetIdBounds(self, int id, Rect rect)
7690
Set the bounding rect of a given object. This will create
7691
an object node if one doesn't exist.
7693
return _gdi_.PseudoDC_SetIdBounds(*args, **kwargs)
7695
def GetIdBounds(*args, **kwargs):
7697
GetIdBounds(self, int id) -> Rect
7699
Returns the bounding rectangle previouly set with SetIdBounds. If
7700
no bounds have been set, it returns wx.Rect(0,0,0,0).
7702
return _gdi_.PseudoDC_GetIdBounds(*args, **kwargs)
7704
def DrawToDCClipped(*args, **kwargs):
7706
DrawToDCClipped(self, DC dc, Rect rect)
7708
Draws the recorded operations to dc unless the operation is known to
7711
return _gdi_.PseudoDC_DrawToDCClipped(*args, **kwargs)
7713
def DrawToDCClippedRgn(*args, **kwargs):
7715
DrawToDCClippedRgn(self, DC dc, Region region)
7717
Draws the recorded operations to dc unless the operation is known to
7720
return _gdi_.PseudoDC_DrawToDCClippedRgn(*args, **kwargs)
7722
def DrawToDC(*args, **kwargs):
7724
DrawToDC(self, DC dc)
7726
Draws the recorded operations to dc.
7728
return _gdi_.PseudoDC_DrawToDC(*args, **kwargs)
7730
def FloodFill(*args, **kwargs):
7732
FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
7734
Flood fills the device context starting from the given point, using
7735
the current brush colour, and using a style:
7737
- **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
7738
the given colour is encountered.
7740
- **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
7743
Returns False if the operation failed.
7745
Note: The present implementation for non-Windows platforms may fail to
7746
find colour borders if the pixels do not match the colour
7747
exactly. However the function will still return true.
7749
return _gdi_.PseudoDC_FloodFill(*args, **kwargs)
7751
def FloodFillPoint(*args, **kwargs):
7753
FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
7755
Flood fills the device context starting from the given point, using
7756
the current brush colour, and using a style:
7758
- **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
7759
the given colour is encountered.
7761
- **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
7764
Returns False if the operation failed.
7766
Note: The present implementation for non-Windows platforms may fail to
7767
find colour borders if the pixels do not match the colour
7768
exactly. However the function will still return true.
7770
return _gdi_.PseudoDC_FloodFillPoint(*args, **kwargs)
7772
def DrawLine(*args, **kwargs):
7774
DrawLine(self, int x1, int y1, int x2, int y2)
7776
Draws a line from the first point to the second. The current pen is
7777
used for drawing the line. Note that the second point is *not* part of
7778
the line and is not drawn by this function (this is consistent with
7779
the behaviour of many other toolkits).
7781
return _gdi_.PseudoDC_DrawLine(*args, **kwargs)
7783
def DrawLinePoint(*args, **kwargs):
7785
DrawLinePoint(self, Point pt1, Point pt2)
7787
Draws a line from the first point to the second. The current pen is
7788
used for drawing the line. Note that the second point is *not* part of
7789
the line and is not drawn by this function (this is consistent with
7790
the behaviour of many other toolkits).
7792
return _gdi_.PseudoDC_DrawLinePoint(*args, **kwargs)
7794
def CrossHair(*args, **kwargs):
7796
CrossHair(self, int x, int y)
7798
Displays a cross hair using the current pen. This is a vertical and
7799
horizontal line the height and width of the window, centred on the
7802
return _gdi_.PseudoDC_CrossHair(*args, **kwargs)
7804
def CrossHairPoint(*args, **kwargs):
7806
CrossHairPoint(self, Point pt)
7808
Displays a cross hair using the current pen. This is a vertical and
7809
horizontal line the height and width of the window, centred on the
7812
return _gdi_.PseudoDC_CrossHairPoint(*args, **kwargs)
7814
def DrawArc(*args, **kwargs):
7816
DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
7818
Draws an arc of a circle, centred on the *center* point (xc, yc), from
7819
the first point to the second. The current pen is used for the outline
7820
and the current brush for filling the shape.
7822
The arc is drawn in an anticlockwise direction from the start point to
7825
return _gdi_.PseudoDC_DrawArc(*args, **kwargs)
7827
def DrawArcPoint(*args, **kwargs):
7829
DrawArcPoint(self, Point pt1, Point pt2, Point center)
7831
Draws an arc of a circle, centred on the *center* point (xc, yc), from
7832
the first point to the second. The current pen is used for the outline
7833
and the current brush for filling the shape.
7835
The arc is drawn in an anticlockwise direction from the start point to
7838
return _gdi_.PseudoDC_DrawArcPoint(*args, **kwargs)
7840
def DrawCheckMark(*args, **kwargs):
7842
DrawCheckMark(self, int x, int y, int width, int height)
7844
Draws a check mark inside the given rectangle.
7846
return _gdi_.PseudoDC_DrawCheckMark(*args, **kwargs)
7848
def DrawCheckMarkRect(*args, **kwargs):
7850
DrawCheckMarkRect(self, Rect rect)
7852
Draws a check mark inside the given rectangle.
7854
return _gdi_.PseudoDC_DrawCheckMarkRect(*args, **kwargs)
7856
def DrawEllipticArc(*args, **kwargs):
7858
DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
7860
Draws an arc of an ellipse, with the given rectangle defining the
7861
bounds of the ellipse. The current pen is used for drawing the arc and
7862
the current brush is used for drawing the pie.
7864
The *start* and *end* parameters specify the start and end of the arc
7865
relative to the three-o'clock position from the center of the
7866
rectangle. Angles are specified in degrees (360 is a complete
7867
circle). Positive values mean counter-clockwise motion. If start is
7868
equal to end, a complete ellipse will be drawn.
7870
return _gdi_.PseudoDC_DrawEllipticArc(*args, **kwargs)
7872
def DrawEllipticArcPointSize(*args, **kwargs):
7874
DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
7876
Draws an arc of an ellipse, with the given rectangle defining the
7877
bounds of the ellipse. The current pen is used for drawing the arc and
7878
the current brush is used for drawing the pie.
7880
The *start* and *end* parameters specify the start and end of the arc
7881
relative to the three-o'clock position from the center of the
7882
rectangle. Angles are specified in degrees (360 is a complete
7883
circle). Positive values mean counter-clockwise motion. If start is
7884
equal to end, a complete ellipse will be drawn.
7886
return _gdi_.PseudoDC_DrawEllipticArcPointSize(*args, **kwargs)
7888
def DrawPoint(*args, **kwargs):
7890
DrawPoint(self, int x, int y)
7892
Draws a point using the current pen.
7894
return _gdi_.PseudoDC_DrawPoint(*args, **kwargs)
7896
def DrawPointPoint(*args, **kwargs):
7898
DrawPointPoint(self, Point pt)
7900
Draws a point using the current pen.
7902
return _gdi_.PseudoDC_DrawPointPoint(*args, **kwargs)
7904
def DrawRectangle(*args, **kwargs):
7906
DrawRectangle(self, int x, int y, int width, int height)
7908
Draws a rectangle with the given top left corner, and with the given
7909
size. The current pen is used for the outline and the current brush
7910
for filling the shape.
7912
return _gdi_.PseudoDC_DrawRectangle(*args, **kwargs)
7914
def DrawRectangleRect(*args, **kwargs):
7916
DrawRectangleRect(self, Rect rect)
7918
Draws a rectangle with the given top left corner, and with the given
7919
size. The current pen is used for the outline and the current brush
7920
for filling the shape.
7922
return _gdi_.PseudoDC_DrawRectangleRect(*args, **kwargs)
7924
def DrawRectanglePointSize(*args, **kwargs):
7926
DrawRectanglePointSize(self, Point pt, Size sz)
7928
Draws a rectangle with the given top left corner, and with the given
7929
size. The current pen is used for the outline and the current brush
7930
for filling the shape.
7932
return _gdi_.PseudoDC_DrawRectanglePointSize(*args, **kwargs)
7934
def DrawRoundedRectangle(*args, **kwargs):
7936
DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
7938
Draws a rectangle with the given top left corner, and with the given
7939
size. The corners are quarter-circles using the given radius. The
7940
current pen is used for the outline and the current brush for filling
7943
If radius is positive, the value is assumed to be the radius of the
7944
rounded corner. If radius is negative, the absolute value is assumed
7945
to be the proportion of the smallest dimension of the rectangle. This
7946
means that the corner can be a sensible size relative to the size of
7947
the rectangle, and also avoids the strange effects X produces when the
7948
corners are too big for the rectangle.
7950
return _gdi_.PseudoDC_DrawRoundedRectangle(*args, **kwargs)
7952
def DrawRoundedRectangleRect(*args, **kwargs):
7954
DrawRoundedRectangleRect(self, Rect r, double radius)
7956
Draws a rectangle with the given top left corner, and with the given
7957
size. The corners are quarter-circles using the given radius. The
7958
current pen is used for the outline and the current brush for filling
7961
If radius is positive, the value is assumed to be the radius of the
7962
rounded corner. If radius is negative, the absolute value is assumed
7963
to be the proportion of the smallest dimension of the rectangle. This
7964
means that the corner can be a sensible size relative to the size of
7965
the rectangle, and also avoids the strange effects X produces when the
7966
corners are too big for the rectangle.
7968
return _gdi_.PseudoDC_DrawRoundedRectangleRect(*args, **kwargs)
7970
def DrawRoundedRectanglePointSize(*args, **kwargs):
7972
DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
7974
Draws a rectangle with the given top left corner, and with the given
7975
size. The corners are quarter-circles using the given radius. The
7976
current pen is used for the outline and the current brush for filling
7979
If radius is positive, the value is assumed to be the radius of the
7980
rounded corner. If radius is negative, the absolute value is assumed
7981
to be the proportion of the smallest dimension of the rectangle. This
7982
means that the corner can be a sensible size relative to the size of
7983
the rectangle, and also avoids the strange effects X produces when the
7984
corners are too big for the rectangle.
7986
return _gdi_.PseudoDC_DrawRoundedRectanglePointSize(*args, **kwargs)
7988
def DrawCircle(*args, **kwargs):
7990
DrawCircle(self, int x, int y, int radius)
7992
Draws a circle with the given center point and radius. The current
7993
pen is used for the outline and the current brush for filling the
7996
return _gdi_.PseudoDC_DrawCircle(*args, **kwargs)
7998
def DrawCirclePoint(*args, **kwargs):
8000
DrawCirclePoint(self, Point pt, int radius)
8002
Draws a circle with the given center point and radius. The current
8003
pen is used for the outline and the current brush for filling the
8006
return _gdi_.PseudoDC_DrawCirclePoint(*args, **kwargs)
8008
def DrawEllipse(*args, **kwargs):
8010
DrawEllipse(self, int x, int y, int width, int height)
8012
Draws an ellipse contained in the specified rectangle. The current pen
8013
is used for the outline and the current brush for filling the shape.
8015
return _gdi_.PseudoDC_DrawEllipse(*args, **kwargs)
8017
def DrawEllipseRect(*args, **kwargs):
8019
DrawEllipseRect(self, Rect rect)
8021
Draws an ellipse contained in the specified rectangle. The current pen
8022
is used for the outline and the current brush for filling the shape.
8024
return _gdi_.PseudoDC_DrawEllipseRect(*args, **kwargs)
8026
def DrawEllipsePointSize(*args, **kwargs):
8028
DrawEllipsePointSize(self, Point pt, Size sz)
8030
Draws an ellipse contained in the specified rectangle. The current pen
8031
is used for the outline and the current brush for filling the shape.
8033
return _gdi_.PseudoDC_DrawEllipsePointSize(*args, **kwargs)
8035
def DrawIcon(*args, **kwargs):
8037
DrawIcon(self, Icon icon, int x, int y)
8039
Draw an icon on the display (does nothing if the device context is
8040
PostScript). This can be the simplest way of drawing bitmaps on a
8043
return _gdi_.PseudoDC_DrawIcon(*args, **kwargs)
8045
def DrawIconPoint(*args, **kwargs):
8047
DrawIconPoint(self, Icon icon, Point pt)
8049
Draw an icon on the display (does nothing if the device context is
8050
PostScript). This can be the simplest way of drawing bitmaps on a
8053
return _gdi_.PseudoDC_DrawIconPoint(*args, **kwargs)
8055
def DrawBitmap(*args, **kwargs):
8057
DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
8059
Draw a bitmap on the device context at the specified point. If
8060
*transparent* is true and the bitmap has a transparency mask, (or
8061
alpha channel on the platforms that support it) then the bitmap will
8062
be drawn transparently.
8064
return _gdi_.PseudoDC_DrawBitmap(*args, **kwargs)
8066
def DrawBitmapPoint(*args, **kwargs):
8068
DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
8070
Draw a bitmap on the device context at the specified point. If
8071
*transparent* is true and the bitmap has a transparency mask, (or
8072
alpha channel on the platforms that support it) then the bitmap will
8073
be drawn transparently.
8075
return _gdi_.PseudoDC_DrawBitmapPoint(*args, **kwargs)
8077
def DrawText(*args, **kwargs):
8079
DrawText(self, String text, int x, int y)
8081
Draws a text string at the specified point, using the current text
8082
font, and the current text foreground and background colours.
8084
The coordinates refer to the top-left corner of the rectangle bounding
8085
the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
8086
a text string, which can be used to position the text more precisely,
8087
(you will need to use a real DC with GetTextExtent as wx.PseudoDC does
8090
**NOTE**: under wxGTK the current logical function is used by this
8091
function but it is ignored by wxMSW. Thus, you should avoid using
8092
logical functions with this function in portable programs.
8094
return _gdi_.PseudoDC_DrawText(*args, **kwargs)
8096
def DrawTextPoint(*args, **kwargs):
8098
DrawTextPoint(self, String text, Point pt)
8100
Draws a text string at the specified point, using the current text
8101
font, and the current text foreground and background colours.
8103
The coordinates refer to the top-left corner of the rectangle bounding
8104
the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
8105
a text string, which can be used to position the text more precisely,
8106
(you will need to use a real DC with GetTextExtent as wx.PseudoDC does
8109
**NOTE**: under wxGTK the current logical function is used by this
8110
function but it is ignored by wxMSW. Thus, you should avoid using
8111
logical functions with this function in portable programs.
8113
return _gdi_.PseudoDC_DrawTextPoint(*args, **kwargs)
8115
def DrawRotatedText(*args, **kwargs):
8117
DrawRotatedText(self, String text, int x, int y, double angle)
8119
Draws the text rotated by *angle* degrees, if supported by the platform.
8121
**NOTE**: Under Win9x only TrueType fonts can be drawn by this
8122
function. In particular, a font different from ``wx.NORMAL_FONT``
8123
should be used as the it is not normally a TrueType
8124
font. ``wx.SWISS_FONT`` is an example of a font which is.
8126
return _gdi_.PseudoDC_DrawRotatedText(*args, **kwargs)
8128
def DrawRotatedTextPoint(*args, **kwargs):
8130
DrawRotatedTextPoint(self, String text, Point pt, double angle)
8132
Draws the text rotated by *angle* degrees, if supported by the platform.
8134
**NOTE**: Under Win9x only TrueType fonts can be drawn by this
8135
function. In particular, a font different from ``wx.NORMAL_FONT``
8136
should be used as the it is not normally a TrueType
8137
font. ``wx.SWISS_FONT`` is an example of a font which is.
8139
return _gdi_.PseudoDC_DrawRotatedTextPoint(*args, **kwargs)
8141
def DrawLines(*args, **kwargs):
8143
DrawLines(self, List points, int xoffset=0, int yoffset=0)
8145
Draws lines using a sequence of `wx.Point` objects, adding the
8146
optional offset coordinate. The current pen is used for drawing the
8149
return _gdi_.PseudoDC_DrawLines(*args, **kwargs)
8151
def DrawPolygon(*args, **kwargs):
8153
DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
8154
wxPolygonFillMode fillStyle=ODDEVEN_RULE)
8156
Draws a filled polygon using a sequence of `wx.Point` objects, adding
8157
the optional offset coordinate. The last argument specifies the fill
8158
rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
8160
The current pen is used for drawing the outline, and the current brush
8161
for filling the shape. Using a transparent brush suppresses
8162
filling. Note that wxWidgets automatically closes the first and last
8165
return _gdi_.PseudoDC_DrawPolygon(*args, **kwargs)
8167
def DrawLabel(*args, **kwargs):
8169
DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
8172
Draw *text* within the specified rectangle, abiding by the alignment
8173
flags. Will additionally emphasize the character at *indexAccel* if
8176
return _gdi_.PseudoDC_DrawLabel(*args, **kwargs)
8178
def DrawImageLabel(*args, **kwargs):
8180
DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
8183
Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
8184
drawing it) within the specified rectangle, abiding by the alignment
8185
flags. Will additionally emphasize the character at *indexAccel* if
8188
return _gdi_.PseudoDC_DrawImageLabel(*args, **kwargs)
8190
def DrawSpline(*args, **kwargs):
8192
DrawSpline(self, List points)
8194
Draws a spline between all given control points, (a list of `wx.Point`
8195
objects) using the current pen. The spline is drawn using a series of
8196
lines, using an algorithm taken from the X drawing program 'XFIG'.
8198
return _gdi_.PseudoDC_DrawSpline(*args, **kwargs)
8200
def Clear(*args, **kwargs):
8204
Clears the device context using the current background brush.
8206
return _gdi_.PseudoDC_Clear(*args, **kwargs)
8208
def SetFont(*args, **kwargs):
8210
SetFont(self, Font font)
8212
Sets the current font for the DC. It must be a valid font, in
8213
particular you should not pass ``wx.NullFont`` to this method.
8215
return _gdi_.PseudoDC_SetFont(*args, **kwargs)
8217
def SetPen(*args, **kwargs):
8219
SetPen(self, Pen pen)
8221
Sets the current pen for the DC.
8223
If the argument is ``wx.NullPen``, the current pen is selected out of the
8224
device context, and the original pen restored.
8226
return _gdi_.PseudoDC_SetPen(*args, **kwargs)
8228
def SetBrush(*args, **kwargs):
8230
SetBrush(self, Brush brush)
8232
Sets the current brush for the DC.
8234
If the argument is ``wx.NullBrush``, the current brush is selected out
8235
of the device context, and the original brush restored, allowing the
8236
current brush to be destroyed safely.
8238
return _gdi_.PseudoDC_SetBrush(*args, **kwargs)
8240
def SetBackground(*args, **kwargs):
8242
SetBackground(self, Brush brush)
8244
Sets the current background brush for the DC.
8246
return _gdi_.PseudoDC_SetBackground(*args, **kwargs)
8248
def SetBackgroundMode(*args, **kwargs):
8250
SetBackgroundMode(self, int mode)
8252
*mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
8253
determines whether text will be drawn with a background colour or
8256
return _gdi_.PseudoDC_SetBackgroundMode(*args, **kwargs)
8258
def SetPalette(*args, **kwargs):
8260
SetPalette(self, Palette palette)
8262
If this is a window DC or memory DC, assigns the given palette to the
8263
window or bitmap associated with the DC. If the argument is
8264
``wx.NullPalette``, the current palette is selected out of the device
8265
context, and the original palette restored.
8267
return _gdi_.PseudoDC_SetPalette(*args, **kwargs)
8269
def SetTextForeground(*args, **kwargs):
8271
SetTextForeground(self, Colour colour)
8273
Sets the current text foreground colour for the DC.
8275
return _gdi_.PseudoDC_SetTextForeground(*args, **kwargs)
8277
def SetTextBackground(*args, **kwargs):
8279
SetTextBackground(self, Colour colour)
8281
Sets the current text background colour for the DC.
8283
return _gdi_.PseudoDC_SetTextBackground(*args, **kwargs)
8285
def SetLogicalFunction(*args, **kwargs):
8287
SetLogicalFunction(self, int function)
8289
Sets the current logical function for the device context. This
8290
determines how a source pixel (from a pen or brush colour, combines
8291
with a destination pixel in the current device context.
8293
The possible values and their meaning in terms of source and
8294
destination pixel values are as follows:
8296
================ ==========================
8298
wx.AND_INVERT (NOT src) AND dst
8299
wx.AND_REVERSE src AND (NOT dst)
8302
wx.EQUIV (NOT src) XOR dst
8304
wx.NAND (NOT src) OR (NOT dst)
8305
wx.NOR (NOT src) AND (NOT dst)
8308
wx.OR_INVERT (NOT src) OR dst
8309
wx.OR_REVERSE src OR (NOT dst)
8311
wx.SRC_INVERT NOT src
8313
================ ==========================
8315
The default is wx.COPY, which simply draws with the current
8316
colour. The others combine the current colour and the background using
8317
a logical operation. wx.INVERT is commonly used for drawing rubber
8318
bands or moving outlines, since drawing twice reverts to the original
8322
return _gdi_.PseudoDC_SetLogicalFunction(*args, **kwargs)
8324
IdBounds = property(GetIdBounds,SetIdBounds,doc="See `GetIdBounds` and `SetIdBounds`")
8325
Len = property(GetLen,doc="See `GetLen`")
8326
_gdi_.PseudoDC_swigregister(PseudoDC)