Package wx :: Class GraphicsMatrix

[frames | no frames]

## Type GraphicsMatrix

    object --+
             |
        Object --+
                 |
    GraphicsObject --+
                     |
                    GraphicsMatrix

A wx.GraphicsMatrix is a native representation of an affine matrix. The contents are specific and private to the respective renderer. The only way to get a valid instance is via a CreateMatrix call on the graphics context or the renderer instance.

Method Summary
| `__init__(self)`
| `__del__(self)`
| ``Concat`(self, t)` Concatenates the passed in matrix to the current matrix.
| ``Get`(*args, **kwargs)` Get(self) --> (a, b, c, d, tx, ty)
void | ``GetNativeMatrix`(self)` Returns the native representation of the matrix.
| ``Invert`(self)` Inverts the matrix.
bool | ``IsEqual`(self, t)` Returns `True` if the elements of the transformation matrix are equal
bool | ``IsIdentity`(self)` Returns `True` if this is the identity matrix
| ``Rotate`(self, angle)` Rotates this matrix.
| ``Scale`(self, xScale, yScale)` Scales this matrix.
| ``Set`(self, a, b, c, d, tx, ty)` Sets the matrix to the specified values (default values are the identity matrix.)
| ``TransformDistance`(*args, **kwargs)` TransformDistance(self, dx, dy) --> (dx, dy)
| ``TransformPoint`(*args, **kwargs)` TransformPoint(self, x, y) --> (x, y)
| ``Translate`(self, dx, dy)` Add a translation to this matrix.

Property Summary
| `thisown`: The membership flag

Method Details

### Concat(self, t)

Concatenates the passed in matrix to the current matrix.

  Parameters:
    `t`
    (type=GraphicsMatrix)

### Get(*args, **kwargs)

Get(self) --> (a, b, c, d, tx, ty)

Gets the component values of the matrix and returns them as a tuple.

### GetNativeMatrix(self)

Returns the native representation of the matrix. For CoreGraphics this is a CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for Cairo a cairo_matrix_t pointer. NOTE: For wxPython we still need a way to make this value usable.

  Returns:
    void

### Invert(self)

Inverts the matrix.

### IsEqual(self, t)

Returns `True` if the elements of the transformation matrix are equal

  Parameters:
    `t`
    (type=GraphicsMatrix)

  Returns:
    bool

### IsIdentity(self)

Returns `True` if this is the identity matrix

  Returns:
    bool

### Rotate(self, angle)

Rotates this matrix. The angle should be specified in radians.

  Parameters:
    `angle`
    (type=Double)

### Scale(self, xScale, yScale)

Scales this matrix.

  Parameters:
    `xScale`
    (type=Double)

    `yScale`
    (type=Double)

### Set(self, a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0)

Sets the matrix to the specified values (default values are the identity matrix.)

  Parameters:
    `a`
    (type=Double)

    `b`
    (type=Double)

    `c`
    (type=Double)

    `d`
    (type=Double)

    `tx`
    (type=Double)

    `ty`
    (type=Double)

### TransformDistance(*args, **kwargs)

TransformDistance(self, dx, dy) --> (dx, dy)

Applies this matrix to a distance (ie. performs all transforms except translations)

### TransformPoint(*args, **kwargs)

TransformPoint(self, x, y) --> (x, y)

Applies this matrix to a point, returns the resulting point values

### Translate(self, dx, dy)

Add a translation to this matrix.

  Parameters:
    `dx`
    (type=Double)

    `dy`
    (type=Double)

Property Details

### thisown

The membership flag

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:14 2007 | http://epydoc.sf.net