wxRuby Documentation Home

Wx::GraphicsMatrix

A GraphicsMatrix is a native representation of an affine matrix. The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via a CreateMatrix call on the graphics context or the renderer instance.

Derived from

GraphicsObject

Methods

GraphicsMatrix#concat

concat(%(arg-type)GraphicsMatrix% t)

Concatenates the matrix passed with the current matrix.

concat(%(arg-type)GraphicsMatrix% t)

GraphicsMatrix#get

void get(%(arg-type)Double% a=NULL, Double b=NULL, Double c=NULL, Double d=NULL, Double tx=NULL, Double ty=NULL)

Returns the component values of the matrix via the argument pointers.

GraphicsMatrix#get_native_matrix

get_native_matrix()

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.

GraphicsMatrix#invert

invert()

Inverts the matrix.

GraphicsMatrix#is_equal

Boolean is_equal(%(arg-type)GraphicsMatrix% t)

Returns true if the elements of the transformation matrix are equal.

GraphicsMatrix#is_identity

Boolean is_identity()

Return true if this is the identity matrix.

GraphicsMatrix#rotate

rotate(%(arg-type)Double% angle)

Rotates this matrix (radians).

GraphicsMatrix#scale

scale(%(arg-type)Double% xScale, Double yScale)

Scales this matrix.

GraphicsMatrix#translate

translate(%(arg-type)Double% dx, Double dy)

Translates this matrix.

GraphicsMatrix#set

set(%(arg-type)Double% a = 1.0, Double b = 0.0, Double c = 0.0, Double d = 1.0, Double tx = 0.0, Double ty = 0.0)

Sets the matrix to the respective values (default values are the identity matrix)

GraphicsMatrix#transform_point

transform_point(%(arg-type)Double% x, Double y)

Applies this matrix to a point.

GraphicsMatrix#transform_distance

transform_distance(%(arg-type)Double% dx, Double dy)

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

[This page automatically generated from the Textile source at 2023-06-03 08:07:28 +0000]