C# Class Eto.Drawing.Matrix

Methods to create and manage an IMatrix
Afficher le fichier Open project: picoe/Eto

Méthodes publiques

Méthode Description
Append ( this matrix ) : void

Append the specified matrices to the matrix

Create ( ) : IMatrix

Creates a new identity matrix

Create ( float elements ) : IMatrix

Creates a new matrix with the specified elements

Create ( float xx, float yx, float xy, float yy, float x0, float y0 ) : IMatrix

Creates a new matrix with the specified components

FromRotation ( float angle ) : IMatrix

Creates a new rotation matrix

FromRotationAt ( float angle, Eto.Drawing.PointF center ) : IMatrix

Creates a new rotation matrix around a center point with the specified angle

FromRotationAt ( float angle, float centerX, float centerY ) : IMatrix

Creates a new rotation matrix around a (centerX, centerY) point with the specified angle

FromScale ( Eto.Drawing.SizeF scale ) : IMatrix

Creates a new matrix with the specified scale

FromScale ( float scaleX, float scaleY ) : IMatrix

Creates a new matrix with the specified scale factor

FromScaleAt ( Eto.Drawing.SizeF scale, Eto.Drawing.PointF center ) : IMatrix

Creates a new matrix with a scale at the specified center point

FromScaleAt ( float scaleX, float scaleY, float centerX, float centerY ) : IMatrix

Creates a new matrix with a scale at the specified point

FromSkew ( float skewX, float skewY ) : IMatrix

Creates a new matrix with a skew

FromTranslation ( Eto.Drawing.PointF offset ) : IMatrix

Creates a new matrix with a translation

FromTranslation ( Eto.Drawing.SizeF offset ) : IMatrix

Creates a new matrix with a translation

FromTranslation ( float distanceX, float distanceY ) : IMatrix

Creates a new matrix with a translation

GetScale ( this matrix ) : Eto.Drawing.PointF

Returns the scale coordinates Xx and Yy of the matrix as a PointF.

Inverse ( this matrix ) : IMatrix

Creates an inverted copy of the specified matrix.

Multiply ( IMatrix matrix ) : IMatrix

Multiply the specified matrix and matrices.

Prepend ( this matrix ) : void

Prepends the specified matrices to the matrix

RotateAt ( this matrix, float angle, Eto.Drawing.PointF center ) : void

Prepend a rotation around the specified point to the matrix

Scale ( this matrix, Eto.Drawing.SizeF scale ) : void

Prepend a scale to the matrix from the origin (0, 0)

Scale ( this matrix, float scale ) : void

Prepend a scale to the matrix from the origin (0, 0)

ScaleAt ( this matrix, Eto.Drawing.SizeF scale, Eto.Drawing.PointF center ) : void

Prepend a scale to the matrix from the specified point

ScaleAt ( this matrix, float scale, Eto.Drawing.PointF center ) : void

Prepend a scale to the matrix from the specified point

ScaleAt ( this matrix, float scale, float centerX, float centerY ) : void

Prepend a scale to the matrix from the specified point

TransformRectangle ( this matrix, Eto.Drawing.RectangleF rect ) : Eto.Drawing.RectangleF

Transforms the rectangle with the current matrix.

This returns a rectangle that encompasses the specified rect after it is translated. When rotating, this means that the new rectangle may be larger in size to encompass the translated rectangle.

TransformSize ( this matrix, Eto.Drawing.SizeF size ) : Eto.Drawing.SizeF

Transforms the size with the current matrix.

This will get the transformed size

Translate ( this matrix, Eto.Drawing.PointF offset ) : void

Prepend a translation to the matrix

Translate ( this matrix, Eto.Drawing.SizeF offset ) : void

Prepend a translation to the matrix

Method Details

Append() public static méthode

Append the specified matrices to the matrix
public static Append ( this matrix ) : void
matrix this Matrix to append to
Résultat void

Create() public static méthode

Creates a new identity matrix
public static Create ( ) : IMatrix
Résultat IMatrix

Create() public static méthode

Creates a new matrix with the specified elements
public static Create ( float elements ) : IMatrix
elements float Elements of the matrix (six components)
Résultat IMatrix

Create() public static méthode

Creates a new matrix with the specified components
public static Create ( float xx, float yx, float xy, float yy, float x0, float y0 ) : IMatrix
xx float Xx component of the matrix
yx float Yx component of the matrix
xy float Xy component of the matrix
yy float Yy component of the matrix
x0 float X0 component of the matrix
y0 float Y0 component of the matrix
Résultat IMatrix

FromRotation() public static méthode

Creates a new rotation matrix
public static FromRotation ( float angle ) : IMatrix
angle float Angle in degrees to rotate. A positive value indicates a clockwise rotation, whereas a negative value will rotate counter clockwise
Résultat IMatrix

FromRotationAt() public static méthode

Creates a new rotation matrix around a center point with the specified angle
public static FromRotationAt ( float angle, Eto.Drawing.PointF center ) : IMatrix
angle float Angle in degrees to rotate. A positive value indicates a clockwise rotation, whereas a negative value will rotate counter clockwise
center Eto.Drawing.PointF the point to rotate around
Résultat IMatrix

FromRotationAt() public static méthode

Creates a new rotation matrix around a (centerX, centerY) point with the specified angle
public static FromRotationAt ( float angle, float centerX, float centerY ) : IMatrix
angle float Angle in degrees to rotate. A positive value indicates a clockwise rotation, whereas a negative value will rotate counter clockwise
centerX float X co-ordinate of the point to rotate around
centerY float Y co-ordinate of the point to rotate around
Résultat IMatrix

FromScale() public static méthode

Creates a new matrix with the specified scale
public static FromScale ( Eto.Drawing.SizeF scale ) : IMatrix
scale Eto.Drawing.SizeF Scale size for the X and Y coordinates
Résultat IMatrix

FromScale() public static méthode

Creates a new matrix with the specified scale factor
public static FromScale ( float scaleX, float scaleY ) : IMatrix
scaleX float The amount to multiply coordinates along the x axis
scaleY float The amount to multiply coordinates along the y axis
Résultat IMatrix

FromScaleAt() public static méthode

Creates a new matrix with a scale at the specified center point
public static FromScaleAt ( Eto.Drawing.SizeF scale, Eto.Drawing.PointF center ) : IMatrix
scale Eto.Drawing.SizeF The amount to multiply coordinates by
center Eto.Drawing.PointF Point to scale from
Résultat IMatrix

FromScaleAt() public static méthode

Creates a new matrix with a scale at the specified point
public static FromScaleAt ( float scaleX, float scaleY, float centerX, float centerY ) : IMatrix
scaleX float The amount to multiply coordinates along the x axis
scaleY float The amount to multiply coordinates along the y axis
centerX float X co-ordinate of the point to scale from
centerY float Y co-ordinate of the point to scale from
Résultat IMatrix

FromSkew() public static méthode

Creates a new matrix with a skew
public static FromSkew ( float skewX, float skewY ) : IMatrix
skewX float Amount to skew along the X axis, 1.0 does not skew
skewY float Amount to skew along the Y axis, 1.0 does not skew
Résultat IMatrix

FromTranslation() public static méthode

Creates a new matrix with a translation
public static FromTranslation ( Eto.Drawing.PointF offset ) : IMatrix
offset Eto.Drawing.PointF Offset to translate by
Résultat IMatrix

FromTranslation() public static méthode

Creates a new matrix with a translation
public static FromTranslation ( Eto.Drawing.SizeF offset ) : IMatrix
offset Eto.Drawing.SizeF Offset to translate by
Résultat IMatrix

FromTranslation() public static méthode

Creates a new matrix with a translation
public static FromTranslation ( float distanceX, float distanceY ) : IMatrix
distanceX float Distance to translate along the x axis
distanceY float Distance to translate along the y axis
Résultat IMatrix

GetScale() public static méthode

Returns the scale coordinates Xx and Yy of the matrix as a PointF.
public static GetScale ( this matrix ) : Eto.Drawing.PointF
matrix this
Résultat Eto.Drawing.PointF

Inverse() public static méthode

Creates an inverted copy of the specified matrix.
public static Inverse ( this matrix ) : IMatrix
matrix this Matrix to invert.
Résultat IMatrix

Multiply() public static méthode

Multiply the specified matrix and matrices.
public static Multiply ( IMatrix matrix ) : IMatrix
matrix IMatrix Matrix to multiply with
Résultat IMatrix

Prepend() public static méthode

Prepends the specified matrices to the matrix
public static Prepend ( this matrix ) : void
matrix this Matrix to prepend to
Résultat void

RotateAt() public static méthode

Prepend a rotation around the specified point to the matrix
public static RotateAt ( this matrix, float angle, Eto.Drawing.PointF center ) : void
matrix this Matrix to rotate
angle float Angle in degrees to rotate. A positive value indicates a clockwise rotation, whereas a negative value will rotate counter clockwise
center Eto.Drawing.PointF Point to rotate around
Résultat void

Scale() public static méthode

Prepend a scale to the matrix from the origin (0, 0)
public static Scale ( this matrix, Eto.Drawing.SizeF scale ) : void
matrix this Matrix to scale
scale Eto.Drawing.SizeF The amount to multiply coordinates
Résultat void

Scale() public static méthode

Prepend a scale to the matrix from the origin (0, 0)
public static Scale ( this matrix, float scale ) : void
matrix this Matrix to scale
scale float The amount to multiply coordinates along both the x and y axis
Résultat void

ScaleAt() public static méthode

Prepend a scale to the matrix from the specified point
public static ScaleAt ( this matrix, Eto.Drawing.SizeF scale, Eto.Drawing.PointF center ) : void
matrix this Matrix to scale
scale Eto.Drawing.SizeF The amount to multiply coordinates
center Eto.Drawing.PointF Point to scale from
Résultat void

ScaleAt() public static méthode

Prepend a scale to the matrix from the specified point
public static ScaleAt ( this matrix, float scale, Eto.Drawing.PointF center ) : void
matrix this Matrix to scale
scale float The amount to multiply coordinates along both the x and y axis
center Eto.Drawing.PointF Point to scale from
Résultat void

ScaleAt() public static méthode

Prepend a scale to the matrix from the specified point
public static ScaleAt ( this matrix, float scale, float centerX, float centerY ) : void
matrix this Matrix to scale
scale float The amount to multiply coordinates along both the x and y axis
centerX float X co-ordinate of the point to scale from
centerY float Y co-ordinate of the point to scale from
Résultat void

TransformRectangle() public static méthode

Transforms the rectangle with the current matrix.
This returns a rectangle that encompasses the specified rect after it is translated. When rotating, this means that the new rectangle may be larger in size to encompass the translated rectangle.
public static TransformRectangle ( this matrix, Eto.Drawing.RectangleF rect ) : Eto.Drawing.RectangleF
matrix this Matrix to transform each point of the rectangle.
rect Eto.Drawing.RectangleF Rectangle to transform.
Résultat Eto.Drawing.RectangleF

TransformSize() public static méthode

Transforms the size with the current matrix.
This will get the transformed size
public static TransformSize ( this matrix, Eto.Drawing.SizeF size ) : Eto.Drawing.SizeF
matrix this
size Eto.Drawing.SizeF
Résultat Eto.Drawing.SizeF

Translate() public static méthode

Prepend a translation to the matrix
public static Translate ( this matrix, Eto.Drawing.PointF offset ) : void
matrix this Matrix to translate
offset Eto.Drawing.PointF The amount to offset
Résultat void

Translate() public static méthode

Prepend a translation to the matrix
public static Translate ( this matrix, Eto.Drawing.SizeF offset ) : void
matrix this Matrix to translate
offset Eto.Drawing.SizeF The amount to offset
Résultat void