Mono.Cairo 1.0.5000.0 2.0.0.0 System.Object System.ICloneable

Defines the Matrix object for transformations and translations.

2D affine transform matrices are 3x3 of the form:

`[ xx yx tx ] [ xy yy ty ] [ 0 0 1 ]`

As you can see, the bottom row is always [0 0 1]. The Cairo.Matrix implementation deals with the top 6 values only.

`Cairo.Graphics g; Matrix matrix; // Assume we initialize the Graphics obj here... // Get the CTM (Current Transformation Matrix) Matrix m = g.Matrix; // Make some changes m.Translate (translateX, translateY) m.Scale (scaleX, scaleY); // set the CTM to the modified matrix g.Matrix = m; // do some drawing operations here... // Perhaps we now want to compute a few device-to-user point translations... // If we use Graphics. // first, get the CTM. m = g.Matrix; // invert it Cairo.Status cs = m.Invert(); if (cs == Cairo.Status.Success) { // TIP: Transform as many points as you like... m.TransformPoint (ref point1X, ref point1Y); m.TransformPoint (ref point2x, ref point2Y); // ... }`
- Constructor
  Create a new Matrix, initialized to the identity.
  1.0.5000.0
  2.0.0.0
- Constructor
  xx component of the affine transformation.
  yx component of the affine transformation.
  xy component of the affine transformation.
  yy component of the affine transformation.
  x0 component of the affine transformation.
  y0 component of the affine transformation.
  Create a new matrix, initialized with the specified values.
  1.0.5000.0
  2.0.0.0
- Method
  System.Object Returns a clone of the matrix The clone matrix as a 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Boolean `` The matrix to test the equality with Tests the equality of this matrix and another one True if the two matrices are equal, otherwise false
- Method
  1.0.5000.0
  2.0.0.0
  System.Int32 Returns a hash representing the matrix A hash as an representing the matrix
- Method
  System.Void `` `` `` `` `` `` xx component of the affine transformation yx component of the affine transformation xy component of the affine transformation yy component of the affine transformation X translation component of the affine transformation Y translation component of the affine transformation Sets the matrix to be the affine transformation given by xx, yx, xy, yy, x0, y0. The transformation is given by:
  x_new = xx * x + xy * y + x0;
  y_new = yx * x + yy * y + y0;
  1.0.5000.0
  2.0.0.0
- Method
  System.Void Initializes the matrix to the identity. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` Angle of rotation, in radians. The direction of rotation is defined such that positive angles rotate in the direction from the positive X axis toward the positive Y axis. With the default axis orientation of cairo, positive angles rotate in a clockwise direction. Initialize the matrix to a transformation that rotates by the specified radians value. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` scale factor in the X dimension. scale factor in the Y dimension. Initializes the matrix to a transformation that scales by sx and sy in the X and Y dimensions, respectively. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` amount to translate in the X direction. amount to translate in the Y direction. Initializes matrix to a transformation that translates by tx and ty in the X and Y dimensions, respectively. None. 1.0.5000.0 2.0.0.0
- Method
  Cairo.Status Changes matrix to be the inverse of its original value. Not all transformation matrices have inverses; if the matrix collapses points together (it is degenerate), then it has no inverse and this function will fail. If the matrix has an inverse, modifies the matrix to be the inverse matrix and returns .Success. Otherwise, return .InvalidMatrix if the matrix is invalid. None. 1.0.5000.0 2.0.0.0
- Method
  System.Boolean Determine if a given matrix is the Identity. Returns true if this matrix is equivalent to the identity. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` The affine transformation matrix to multiply by. Multiplies this Matrix by b. The effect is to apply b's transformation to this matrix, or in other words, to transform this matrix by b. 1.0.5000.0 2.0.0.0
- Method
  Cairo.Matrix `` `` The matrix to be multiplied. The matrix to multiply by. Multiplies the affine transformations in a and b together and returns the result in result. The result is an affine transformation which is equivalent to separately applying the transformations a and b in order. The result of multiplying a and b. 1.0.5000.0 2.0.0.0
- Method
  System.Boolean `` `` The first matrix to compare. The second Matrix to compare. Determines whether two matrices have the same value. Returns true if all members are equal. 1.0.5000.0 2.0.0.0
- Method
  System.Boolean `` `` The first Matrix to compare. The second Matrix to compare. Determines whether two matrices do not share the same value. Returns true if any members are not equal. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` angle of rotation, in radians. The direction of rotation is defined such that positive angles rotate in the direction from the positive X axis toward the positive Y axis. With the default axis orientation of cairo, positive angles rotate in a clockwise direction. Applies rotation by radians to the transformation in the matrix. The effect of the new transformation is to first rotate the coordinates by radians, then apply the original transformation to the coordinates. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` scale factor in the X direction scale factor in the Y direction Applies scaling by tx, ty to the transformation in the matrix. The effect of the new transformation is to first scale the coordinates by sx and sy, then apply the original transformation to the coordinates. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.String Returns the matrix as a string A string describing the matrix
- Method
  System.Void `` `` X component of a distance vector. An in/out parameter. Y component of a distance vector. An in/out parameter. Transforms the distance vector (dx,@y) by @matrix. This is similar to cairo_matrix_transform() except that the translation components of the transformation are ignored. The calculation of the returned vector is as follows:
  dx2 = dx1 * a + dy1 * c;
  dy2 = dx1 * b + dy1 * d;
  Affine transformations are position invariant, so the same vector always transforms to the same vector. If (x1,y1) transforms to (x2,y2) then (x1+@x1,y1+dy1) will transform to (x1+dx2,y1+dy2) for all values of x1 and x2. None. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` X position. An in/out parameter. Y position. An in/out parameter. Transforms the point (x, y) by the matrix. None. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` amount to translate in the X direction. amount to translate in the X direction. Applies a translation by tx, ty to the transformation in matrix. The effect of the new transformation is to first translate the coordinates by @tx and ty, then apply the original transformation to the coordinates. None. 1.0.5000.0 2.0.0.0
- Field
  System.Double X0 component of the affine transformation. Represents the x-component of translation. 1.0.5000.0 2.0.0.0
- Field
  System.Double Xx component of the affine transformation. To be added. 1.0.5000.0 2.0.0.0
- Field
  System.Double Xy component of the affine transformation. To be added. 1.0.5000.0 2.0.0.0
- Field
  System.Double Y0 component of the affine transformation. Represents the y-component of translation. 1.0.5000.0 2.0.0.0
- Field
  System.Double Yx component of the affine transformation. To be added. 1.0.5000.0 2.0.0.0
- Field
  System.Double Yy component of the affine transformation. To be added. 1.0.5000.0 2.0.0.0