The t_jmatrix is one way to represent a transformation.
More...
|
void | jgraphics_matrix_init (t_jmatrix *x, double xx, double yx, double xy, double yy, double x0, double y0) |
| Set a t_jmatrix to an affine transformation. More...
|
|
void | jgraphics_matrix_init_identity (t_jmatrix *x) |
| Modify a matrix to be an identity transform. More...
|
|
void | jgraphics_matrix_init_translate (t_jmatrix *x, double tx, double ty) |
| Initialize a t_jmatrix to translate (offset) a point. More...
|
|
void | jgraphics_matrix_init_scale (t_jmatrix *x, double sx, double sy) |
| Initialize a t_jmatrix to scale (offset) a point. More...
|
|
void | jgraphics_matrix_init_rotate (t_jmatrix *x, double radians) |
| Initialize a t_jmatrix to rotate (offset) a point. More...
|
|
void | jgraphics_matrix_translate (t_jmatrix *x, double tx, double ty) |
| Apply a translation to an existing matrix. More...
|
|
void | jgraphics_matrix_scale (t_jmatrix *x, double sx, double sy) |
| Apply a scaling to an existing matrix. More...
|
|
void | jgraphics_matrix_rotate (t_jmatrix *x, double radians) |
| Apply a rotation to an existing matrix. More...
|
|
void | jgraphics_matrix_invert (t_jmatrix *x) |
| Invert an existing matrix. More...
|
|
void | jgraphics_matrix_multiply (t_jmatrix *result, const t_jmatrix *a, const t_jmatrix *b) |
| Multiply two matrices: resulting matrix has effect of first applying a and then applying b. More...
|
|
void | jgraphics_matrix_transform_point (const t_jmatrix *matrix, double *x, double *y) |
| Transform a point using a t_jmatrix transormation. More...
|
|
The t_jmatrix is one way to represent a transformation.
You can use the t_jmatrix in the call to jgraphics_transform(), jgraphics_setmatrix(), and jgraphics_pattern_set_matrix for specifying transformations.
◆ jgraphics_matrix_init()
void jgraphics_matrix_init |
( |
t_jmatrix * |
x, |
|
|
double |
xx, |
|
|
double |
yx, |
|
|
double |
xy, |
|
|
double |
yy, |
|
|
double |
x0, |
|
|
double |
y0 |
|
) |
| |
Set a t_jmatrix to an affine transformation.
- Parameters
-
◆ jgraphics_matrix_init_identity()
void jgraphics_matrix_init_identity |
( |
t_jmatrix * |
x | ) |
|
Modify a matrix to be an identity transform.
- Parameters
-
◆ jgraphics_matrix_init_rotate()
void jgraphics_matrix_init_rotate |
( |
t_jmatrix * |
x, |
|
|
double |
radians |
|
) |
| |
Initialize a t_jmatrix to rotate (offset) a point.
- Parameters
-
x | The t_jmatrix. |
radians | The angle or rotation in radians. |
◆ jgraphics_matrix_init_scale()
void jgraphics_matrix_init_scale |
( |
t_jmatrix * |
x, |
|
|
double |
sx, |
|
|
double |
sy |
|
) |
| |
Initialize a t_jmatrix to scale (offset) a point.
- Parameters
-
x | The t_jmatrix. |
sx | The horizontal scale factor. |
sy | The vertical scale factor. |
◆ jgraphics_matrix_init_translate()
void jgraphics_matrix_init_translate |
( |
t_jmatrix * |
x, |
|
|
double |
tx, |
|
|
double |
ty |
|
) |
| |
Initialize a t_jmatrix to translate (offset) a point.
- Parameters
-
x | The t_jmatrix. |
tx | The amount of x-axis translation. |
ty | The amount of y-axis translation. |
◆ jgraphics_matrix_invert()
void jgraphics_matrix_invert |
( |
t_jmatrix * |
x | ) |
|
Invert an existing matrix.
- Parameters
-
◆ jgraphics_matrix_multiply()
Multiply two matrices: resulting matrix has effect of first applying a and then applying b.
- Parameters
-
result | The resulting product t_jmatrix. |
a | The first operand. |
b | The second operand. |
◆ jgraphics_matrix_rotate()
void jgraphics_matrix_rotate |
( |
t_jmatrix * |
x, |
|
|
double |
radians |
|
) |
| |
Apply a rotation to an existing matrix.
- Parameters
-
x | The t_jmatrix. |
radians | The angle or rotation in radians. |
◆ jgraphics_matrix_scale()
void jgraphics_matrix_scale |
( |
t_jmatrix * |
x, |
|
|
double |
sx, |
|
|
double |
sy |
|
) |
| |
Apply a scaling to an existing matrix.
- Parameters
-
x | The t_jmatrix. |
sx | The horizontal scale factor. |
sy | The vertical scale factor. |
◆ jgraphics_matrix_transform_point()
void jgraphics_matrix_transform_point |
( |
const t_jmatrix * |
matrix, |
|
|
double * |
x, |
|
|
double * |
y |
|
) |
| |
Transform a point using a t_jmatrix transormation.
- Parameters
-
matrix | The t_jmatrix. |
x | The address of the variable holding the x coordinate. |
y | The address of the variable holding the y coordinate. |
◆ jgraphics_matrix_translate()
void jgraphics_matrix_translate |
( |
t_jmatrix * |
x, |
|
|
double |
tx, |
|
|
double |
ty |
|
) |
| |
Apply a translation to an existing matrix.
- Parameters
-
x | The t_jmatrix. |
tx | The amount of x-axis translation. |
ty | The amount of y-axis translation. |