xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::native::matrix Class Referencefinal
Inheritance diagram for xtd::drawing::native::matrix:
xtd::static_object

Definition

Contains matrix native API.

Namespace
xtd::drawing::native
Library
xtd.drawing.native
Warning
Internal use only

Protected Static Methods

static intptr create (float m11, float m12, float m21, float m22, float dx, float dy)
 Create a matrix with the specified elements.
 
static void destroy (intptr handle)
 Destroys the matrix.
 
static std::vector< float > elenents (intptr handle)
 Gets an array of floating-point values that represents the elements of the matrix.
 
static bool is_identity (intptr handle)
 Gets a value indicating whether the matrix is the identity matrix.
 
static bool is_invertible (intptr handle)
 Gets a value indicating whether the matrix is invertible.
 
static void invert (intptr handle)
 Inverts the matrix, if it is invertible.
 
static float offset_x (intptr handle)
 Gets the x translation value (the dx value, or the element in the third row and first column) of the matrix.
 
static float offset_y (intptr handle)
 Gets the y translation value (the dx value, or the element in the third row and first column) of the matrix.
 
static void multiply (intptr handle, intptr matrix, int32 order)
 Multiplies this xtd::drawing::drawing_2d::matrix by the matrix specified in the matrix parameter, and in the order specified in the order parameter.
 
static void reset (intptr handle)
 Resets the matrix to have the elements of the identity matrix.
 
static void rotate (intptr handle, float angle, int32 order)
 repend to the matrix a clockwise rotation, around the origin and by the specified angle.
 
static void rotate_at (intptr handle, float angle, float x, float y, int32 order)
 Applies a clockwise rotation to the matrix around the point specified in the point parameter, and by prepending the rotation.
 
static void scale (intptr handle, float scale_x, float scale_y, int32 order)
 Applies the specified scale vector (scale_x and scale_y) to this xtd::drawing::drawing_2d::matrix using the specified order.
 
static void shear (intptr handle, float scale_x, float scale_y, int32 order)
 Applies the specified shear vector to the matrix in the specified order.
 
static void transform_point (intptr handle, int32 &x, int32 &y)
 Applies the geometric transform represented by the matrix to a specified array of points.
 
static void transform_point (intptr handle, float &x, float &y)
 Applies the geometric transform represented by the matrix to a specified array of points.
 
static void transform_vectors (intptr handle, std::vector< xtd::collections::generic::key_value_pair< int32, int32 > > &points)
 Applies only the scale and rotate components of the matrix to the specified array of points.
 
static void transform_vectors (intptr handle, std::vector< xtd::collections::generic::key_value_pair< float, float > > &points)
 Applies only the scale and rotate components of the matrix to the specified array of points.
 
static void translate (intptr handle, float offset_x, float offset_y, int32 order)
 Applies the specified translation vector (offset_x and offset_y) to the matrix in the specified order.
 
static void vector_transform_points (intptr handle, std::vector< xtd::collections::generic::key_value_pair< int32, int32 > > &points)
 Multiplies each vector in an array by the matrix. The translation elements of this matrix (third row) are ignored.
 

Member Function Documentation

◆ create()

static intptr xtd::drawing::native::matrix::create ( float  m11,
float  m12,
float  m21,
float  m22,
float  dx,
float  dy 
)
staticprotected

Create a matrix with the specified elements.

Parameters
m11The value in the first row and first column of the matrix.
m12The value in the first row and second column of the matrix.
m21The value in the second row and first column of the matrix.
m22The value in the second row and second column of the matrix.
dxThe value in the third row and first column of the matrix.
dyThe value in the third row and second column of the matrix.
Returns
The created matrix handle.
Warning
Internal use only

◆ destroy()

static void xtd::drawing::native::matrix::destroy ( intptr  handle)
staticprotected

Destroys the matrix.

Parameters
handleThe matrix handle to destroy.
Warning
Internal use only

◆ elenents()

static std::vector< float > xtd::drawing::native::matrix::elenents ( intptr  handle)
staticprotected

Gets an array of floating-point values that represents the elements of the matrix.

Parameters
handleThe matrix handle.
Returns
An array of floating-point values that represents the elements of the matrix.
Warning
Internal use only

◆ is_identity()

static bool xtd::drawing::native::matrix::is_identity ( intptr  handle)
staticprotected

Gets a value indicating whether the matrix is the identity matrix.

Parameters
handleThe matrix handle.
Returns
This property is true if the matrix is identity; otherwise, false.
Warning
Internal use only

◆ is_invertible()

static bool xtd::drawing::native::matrix::is_invertible ( intptr  handle)
staticprotected

Gets a value indicating whether the matrix is invertible.

Parameters
handleThe matrix handle.
Returns
This property is true if the matrix is invertible; otherwise, false.
Warning
Internal use only

◆ invert()

static void xtd::drawing::native::matrix::invert ( intptr  handle)
staticprotected

Inverts the matrix, if it is invertible.

Parameters
handleThe matrix handle.
Warning
Internal use only

◆ offset_x()

static float xtd::drawing::native::matrix::offset_x ( intptr  handle)
staticprotected

Gets the x translation value (the dx value, or the element in the third row and first column) of the matrix.

Parameters
handleThe matrix handle.
Returns
The x translation value of the matrix.
Warning
Internal use only

◆ offset_y()

static float xtd::drawing::native::matrix::offset_y ( intptr  handle)
staticprotected

Gets the y translation value (the dx value, or the element in the third row and first column) of the matrix.

Parameters
handleThe matrix handle.
Returns
The y translation value of the matrix.
Warning
Internal use only

◆ multiply()

static void xtd::drawing::native::matrix::multiply ( intptr  handle,
intptr  matrix,
int32  order 
)
staticprotected

Multiplies this xtd::drawing::drawing_2d::matrix by the matrix specified in the matrix parameter, and in the order specified in the order parameter.

Parameters
handleThe matrix handle.
matrixThe matrix handle by which the matrix is to be multiplied.
orderThe value that represents the order (see matrix_orders.h for more information).
Warning
Internal use only

◆ reset()

static void xtd::drawing::native::matrix::reset ( intptr  handle)
staticprotected

Resets the matrix to have the elements of the identity matrix.

Parameters
handleThe matrix handle.
Warning
Internal use only

◆ rotate()

static void xtd::drawing::native::matrix::rotate ( intptr  handle,
float  angle,
int32  order 
)
staticprotected

repend to the matrix a clockwise rotation, around the origin and by the specified angle.

Parameters
handleThe matrix handle.
angleThe angle of the rotation, in degrees.
orderThe value that represents the order (see matrix_orders.h for more information).
Warning
Internal use only

◆ rotate_at()

static void xtd::drawing::native::matrix::rotate_at ( intptr  handle,
float  angle,
float  x,
float  y,
int32  order 
)
staticprotected

Applies a clockwise rotation to the matrix around the point specified in the point parameter, and by prepending the rotation.

Parameters
handleThe matrix handle.
angleThe angle (extent) of the rotation, in degrees.
xThe x-coordinate of the point that represents the center of the rotation.
yThe y-coordinate of the point that represents the center of the rotation.
orderThe value that represents the order (see matrix_orders.h for more information).
Warning
Internal use only

◆ scale()

static void xtd::drawing::native::matrix::scale ( intptr  handle,
float  scale_x,
float  scale_y,
int32  order 
)
staticprotected

Applies the specified scale vector (scale_x and scale_y) to this xtd::drawing::drawing_2d::matrix using the specified order.

Parameters
handleThe matrix handle.
scale_xThe value by which to scale this xtd::drawing::drawing_2d::matrix in the x-axis direction.
scale_yThe value by which to scale this xtd::drawing::drawing_2d::matrix in the y-axis direction.
orderA value that specifies the order (append or prepend) in which the scale vector is applied to the matrix (see matrix_orders.h for more information).
Warning
Internal use only

◆ shear()

static void xtd::drawing::native::matrix::shear ( intptr  handle,
float  scale_x,
float  scale_y,
int32  order 
)
staticprotected

Applies the specified shear vector to the matrix in the specified order.

Parameters
handleThe matrix handle.
scale_xThe horizontal shear factor.
scale_yThe vertical shear factor.
orderA xvalue that specifies the order (append or prepend) in which the shear is applied (see matrix_orders.h for more information).
Warning
Internal use only

◆ transform_point() [1/2]

static void xtd::drawing::native::matrix::transform_point ( intptr  handle,
int32 x,
int32 y 
)
staticprotected

Applies the geometric transform represented by the matrix to a specified array of points.

Parameters
handleThe matrix handle.
xThe x-coordinate of the point that represents the point to transform.
yThe y-coordinate of the point that represents the point to transform.
Warning
Internal use only

◆ transform_point() [2/2]

static void xtd::drawing::native::matrix::transform_point ( intptr  handle,
float &  x,
float &  y 
)
staticprotected

Applies the geometric transform represented by the matrix to a specified array of points.

Parameters
handleThe matrix handle.
xThe x-coordinate of the point that represents the point to transform.
yThe y-coordinate of the point that represents the point to transform.
Warning
Internal use only

◆ transform_vectors() [1/2]

static void xtd::drawing::native::matrix::transform_vectors ( intptr  handle,
std::vector< xtd::collections::generic::key_value_pair< int32, int32 > > &  points 
)
staticprotected

Applies only the scale and rotate components of the matrix to the specified array of points.

Parameters
handleThe matrix handle.
xAn array of xtd::collections::generic::key_value_pair<int32, int32>t structures that represents the points to transform.
Warning
Internal use only

◆ transform_vectors() [2/2]

static void xtd::drawing::native::matrix::transform_vectors ( intptr  handle,
std::vector< xtd::collections::generic::key_value_pair< float, float > > &  points 
)
staticprotected

Applies only the scale and rotate components of the matrix to the specified array of points.

Parameters
handleThe matrix handle.
xAn array of xtd::collections::generic::key_value_pair<int32, int32>t structures that represents the points to transform.
Warning
Internal use only

◆ translate()

static void xtd::drawing::native::matrix::translate ( intptr  handle,
float  offset_x,
float  offset_y,
int32  order 
)
staticprotected

Applies the specified translation vector (offset_x and offset_y) to the matrix in the specified order.

Parameters
handleThe matrix handle.
offset_xThe x value by which to translate the matrix.
offset_yThe y value by which to translate the matrix.
orderA value that specifies the order (append or prepend) in which the translation is applied to the matrix.
Warning
Internal use only

◆ vector_transform_points()

static void xtd::drawing::native::matrix::vector_transform_points ( intptr  handle,
std::vector< xtd::collections::generic::key_value_pair< int32, int32 > > &  points 
)
staticprotected

Multiplies each vector in an array by the matrix. The translation elements of this matrix (third row) are ignored.

Parameters
handleThe matrix handle.
pointsAn array of xtd::collections::generic::key_value_pair<int32, int32> structures that represents the points to transform.
Warning
Internal use only

The documentation for this class was generated from the following file: