3x3 matrix of floats, row-major order.
More...
#include <mypaint-matrix.h>
|
MyPaintTransform | mypaint_transform_unit () |
| 3x3 unit matrix
|
|
MyPaintTransform | mypaint_transform_rotate_cw (const MyPaintTransform transform, const float angle_radians) |
| Create a new transform by rotating the input transform clockwise.
|
|
MyPaintTransform | mypaint_transform_rotate_ccw (const MyPaintTransform transform, const float angle_radians) |
| Create a new transform by rotating the input transform counterclockwise.
|
|
MyPaintTransform | mypaint_transform_reflect (const MyPaintTransform transform, const float angle_radians) |
| Create a new transform by reflecting the input transform across a line crossing 0,0.
|
|
MyPaintTransform | mypaint_transform_translate (const MyPaintTransform transform, const float x, const float y) |
| Create a new transform by reflecting the input transform across a line crossing 0,0.
|
|
void | mypaint_transform_point (const MyPaintTransform *const transform, float x, float y, float *x_out, float *y_out) |
| Apply transformation to a (x, y) point, writing the resulting coordinates to out parameters.
|
|
3x3 matrix of floats, row-major order.
Only used in MyPaintTiledSurface2 for symmetry calculations, not required for any calls to public functions.
The containing header should probably not have been made public.
◆ mypaint_transform_point()
void mypaint_transform_point |
( |
const MyPaintTransform *const |
transform, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float * |
x_out, |
|
|
float * |
y_out |
|
) |
| |
Apply transformation to a (x, y) point, writing the resulting coordinates to out parameters.
- Parameters
-
| transform | Transform to apply |
| x | x coordinate to transform |
| y | y coordinate to transform |
[out] | x_out | pointer to x coordinate of the transformed point |
[out] | y_out | pointer to y coordinate of the transformed point |
◆ mypaint_transform_reflect()
Create a new transform by reflecting the input transform across a line crossing 0,0.
- Parameters
-
transform | input transform |
angle_radians | the angle of the line to reflect across, in radians |
- Returns
- the resulting transformation matrix
◆ mypaint_transform_rotate_ccw()
Create a new transform by rotating the input transform counterclockwise.
- Parameters
-
transform | input transform |
angle_radians | The amount of rotation to apply, in radians. |
- Returns
- the resulting transformation matrix
◆ mypaint_transform_rotate_cw()
Create a new transform by rotating the input transform clockwise.
- Parameters
-
transform | input transform |
angle_radians | The amount of rotation to apply, in radians. |
- Returns
- a 3x3 unit matrix
◆ mypaint_transform_translate()
Create a new transform by reflecting the input transform across a line crossing 0,0.
- Parameters
-
transform | Input transform |
x,y | The translation to apply |
- Returns
- the resulting transformation matrix
◆ mypaint_transform_unit()
3x3 unit matrix
1 0 0
0 1 0
0 0 1
◆ rows
float MyPaintTransform::rows[3][3] |
The documentation for this struct was generated from the following file: