wx.Size is a useful data structure used to represent the size of
something. It simply contains integer width and height
properties. In most places in wxPython where a wx.Size is
expected a (width, height) tuple can be used instead.
| Method Summary |
| Size |
__init__(self,
w,
h)
Creates a size object. |
| Size |
__add__(self,
sz)
Add sz's proprties to this and return the result. |
| |
__del__(self)
|
| bool |
__eq__(self,
other)
Test for equality of wx.Size objects. |
| |
__getitem__(self,
index)
|
| |
__len__(self)
|
| bool |
__ne__(self,
other)
Test for inequality of wx.Size objects. |
| |
__nonzero__(self)
|
| |
__reduce__(self)
|
| |
__repr__(self)
|
| |
__setitem__(self,
index,
val)
|
| |
__str__(self)
|
| Size |
__sub__(self,
sz)
Subtract sz's properties from this and return the result. |
| |
asTuple(*args,
**kwargs)
asTuple is deprecated, use Get instead |
| |
DecBy(self,
dx,
dy)
|
| |
DecTo(self,
sz)
Decrements this object so that both of its dimensions are not greater
than the corresponding dimensions of the size. |
| (width,height) |
Get()
Returns the width and height properties as a tuple. |
| int |
GetHeight(self)
|
| int |
GetWidth(self)
|
| |
IncBy(self,
dx,
dy)
|
| |
IncTo(self,
sz)
Increments this object so that both of its dimensions are not less
than the corresponding dimensions of the size. |
| bool |
IsFullySpecified(self)
Returns True if both components of the size are non-default values. |
| |
Scale(self,
xscale,
yscale)
Scales the dimensions of this object by the given factors. |
| |
Set(self,
w,
h)
Set both width and height. |
| |
SetDefaults(self,
size)
Combine this size with the other one replacing the default components
of this object (i.e. |
| |
SetHeight(self,
h)
|
| |
SetWidth(self,
w)
|