Home | Trees | Index | Help |
|
---|
Package wx :: Package lib :: Package floatcanvas :: Module FloatCanvas :: Class PointsObjectMixin |
|
ArrowLine
,
Line
,
PointSet
,
Polygon
This is a mixin class that provides some methods suitable for use with objects that have a set of (x,y) coordinate pairs.
Method Summary | |
---|---|
CalcBoundingBox(self)
| |
Move(Delta): moves the object by delta, where delta is an (dx, dy) pair. | |
Sets the coordinates of the points of the object to Points (NX2 array). |
Method Details |
---|
Move(self, Delta)Move(Delta): moves the object by delta, where delta is an (dx, dy) pair. Ideally a Numpy array of shape (2,) |
SetPoints(self, Points, copy=True)Sets the coordinates of the points of the object to Points (NX2 array). By default, a copy is made, if copy is set to False, a reference is used, iff Points is a NumPy array of Floats. This allows you to change some or all of the points without making any copies. For example: Points = Object.Points Points += (5,10) # shifts the points 5 in the x dir, and 10 in the y dir. Object.SetPoints(Points, False) # Sets the points to the same array as it was |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:54:33 2009 | http://epydoc.sf.net |