C# Класс Eto.Drawing.Matrix

Methods to create and manage an IMatrix
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

Append() публичный статический Метод

Append the specified matrices to the matrix
public static Append ( this matrix ) : void
matrix this Matrix to append to
Результат void

Create() публичный статический Метод

Creates a new identity matrix
public static Create ( ) : IMatrix
Результат IMatrix

Create() публичный статический Метод

Creates a new matrix with the specified elements
public static Create ( float elements ) : IMatrix
elements float Elements of the matrix (six components)
Результат IMatrix

Create() публичный статический Метод

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
Результат IMatrix

FromRotation() публичный статический Метод

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
Результат IMatrix

FromRotationAt() публичный статический Метод

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
Результат IMatrix

FromRotationAt() публичный статический Метод

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
Результат IMatrix

FromScale() публичный статический Метод

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
Результат IMatrix

FromScale() публичный статический Метод

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
Результат IMatrix

FromScaleAt() публичный статический Метод

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
Результат IMatrix

FromScaleAt() публичный статический Метод

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
Результат IMatrix

FromSkew() публичный статический Метод

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
Результат IMatrix

FromTranslation() публичный статический Метод

Creates a new matrix with a translation
public static FromTranslation ( Eto.Drawing.PointF offset ) : IMatrix
offset Eto.Drawing.PointF Offset to translate by
Результат IMatrix

FromTranslation() публичный статический Метод

Creates a new matrix with a translation
public static FromTranslation ( Eto.Drawing.SizeF offset ) : IMatrix
offset Eto.Drawing.SizeF Offset to translate by
Результат IMatrix

FromTranslation() публичный статический Метод

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
Результат IMatrix

GetScale() публичный статический Метод

Returns the scale coordinates Xx and Yy of the matrix as a PointF.
public static GetScale ( this matrix ) : Eto.Drawing.PointF
matrix this
Результат Eto.Drawing.PointF

Inverse() публичный статический Метод

Creates an inverted copy of the specified matrix.
public static Inverse ( this matrix ) : IMatrix
matrix this Matrix to invert.
Результат IMatrix

Multiply() публичный статический Метод

Multiply the specified matrix and matrices.
public static Multiply ( IMatrix matrix ) : IMatrix
matrix IMatrix Matrix to multiply with
Результат IMatrix

Prepend() публичный статический Метод

Prepends the specified matrices to the matrix
public static Prepend ( this matrix ) : void
matrix this Matrix to prepend to
Результат void

RotateAt() публичный статический Метод

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
Результат void

Scale() публичный статический Метод

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
Результат void

Scale() публичный статический Метод

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
Результат void

ScaleAt() публичный статический Метод

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
Результат void

ScaleAt() публичный статический Метод

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
Результат void

ScaleAt() публичный статический Метод

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
Результат void

TransformRectangle() публичный статический Метод

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.
Результат Eto.Drawing.RectangleF

TransformSize() публичный статический Метод

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
Результат Eto.Drawing.SizeF

Translate() публичный статический Метод

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
Результат void

Translate() публичный статический Метод

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
Результат void