Class: Wx::AffineMatrix2D

Inherits:
AffineMatrix2DBase show all
Defined in:
lib/wx/doc/gen/affine_matrix2d.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

A 3x2 matrix representing an affine 2D transformation.

Category: Miscellaneous

Requires:

  • USE_GEOMETRY

Instance Method Summary collapse

Methods inherited from AffineMatrix2DBase

#is_equal, #mirror, #transform_distance, #transform_point

Constructor Details

#initializeWx::AffineMatrix2D

Default constructor.

The matrix elements are initialize to the identity matrix.



139
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 139

def initialize; end

Instance Method Details

#==(t) ⇒ Boolean

Check that this matrix is identical with t.

Parameters:

Returns:

  • (Boolean)


133
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 133

def ==(t) end

#concat(t) ⇒ void

This method returns an undefined value.

Concatenate this matrix with another one.

The parameter matrix is the multiplicand.

//           | t.m_11  t.m_12  0 |   | m_11  m_12   0 |
  // matrix' = | t.m_21  t.m_22  0 | x | m_21  m_22   0 |
  //           | t.m_tx  t.m_ty  1 |   | m_tx  m_ty   1 |

Parameters:



162
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 162

def concat(t) end

#getArray(Wx::Matrix2D,Wx::Point2DDouble)

Get the component values of the matrix.

Returns:



143
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 143

def get; end

#invertBoolean

Invert this matrix.

If the matrix is not invertible, i.e. if its determinant is 0, returns false and doesn’t modify it.

//           | m_11  m_12  0 |
  // Invert    | m_21  m_22  0 |
  //           | m_tx  m_ty  1 |

Returns:

  • (Boolean)


174
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 174

def invert; end

#is_identityBoolean Also known as: identity?

Check if this is the identity matrix.

Returns:

  • (Boolean)


178
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 178

def is_identity; end

#rotate(cRadians) ⇒ void

This method returns an undefined value.

Add clockwise rotation to this matrix.

//           | cos    sin   0 |   | m_11  m_12   0 |
  // matrix' = | -sin   cos   0 | x | m_21  m_22   0 |
  //           |  0      0    1 |   | m_tx  m_ty   1 |

Parameters:

  • cRadians (Float)

    Rotation angle in radians, clockwise.



214
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 214

def rotate(cRadians) end

#scale(xScale, yScale) ⇒ void

This method returns an undefined value.

Add scaling to this matrix.

//           | xScale   0      0 |   | m_11  m_12   0 |
  // matrix' = |   0    yScale   0 | x | m_21  m_22   0 |
  //           |   0      0      1 |   | m_tx  m_ty   1 |

Parameters:

  • xScale (Float)

    Scaling in x direction.

  • yScale (Float)

    Scaling in y direction.



203
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 203

def scale(xScale, yScale) end

#set(mat2D, tr) ⇒ void

This method returns an undefined value.

Set all elements of this matrix.

Parameters:

  • mat2D (Wx::Matrix2D)

    The rotational components of the matrix (upper 2 x 2).

  • tr (Wx::Point2DDouble)

    The translational components of the matrix.



149
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 149

def set(mat2D, tr) end

#translate(dx, dy) ⇒ void

This method returns an undefined value.

Add the translation to this matrix.

//           |  1   0   0 |   | m_11  m_12   0 |
  // matrix' = |  0   1   0 | x | m_21  m_22   0 |
  //           | dx  dy   1 |   | m_tx  m_ty   1 |

Parameters:

  • dx (Float)

    The translation in x direction.

  • dy (Float)

    The translation in y direction.



191
# File 'lib/wx/doc/gen/affine_matrix2d.rb', line 191

def translate(dx, dy) end