mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 08:08:04 +02:00
Add _cairo_matrix_is_translation
This commit is contained in:
parent
57fba8d9b6
commit
ca79307bdf
2 changed files with 10 additions and 0 deletions
|
|
@ -548,6 +548,13 @@ _cairo_matrix_is_identity (const cairo_matrix_t *matrix)
|
|||
matrix->x0 == 0.0 && matrix->y0 == 0.0);
|
||||
}
|
||||
|
||||
cairo_bool_t
|
||||
_cairo_matrix_is_translation (const cairo_matrix_t *matrix)
|
||||
{
|
||||
return (matrix->xx == 1.0 && matrix->yx == 0.0 &&
|
||||
matrix->xy == 0.0 && matrix->yy == 1.0);
|
||||
}
|
||||
|
||||
cairo_bool_t
|
||||
_cairo_matrix_is_integer_translation(const cairo_matrix_t *m,
|
||||
int *itx, int *ity)
|
||||
|
|
|
|||
|
|
@ -2197,6 +2197,9 @@ _cairo_matrix_compute_scale_factors (const cairo_matrix_t *matrix,
|
|||
cairo_private cairo_bool_t
|
||||
_cairo_matrix_is_identity (const cairo_matrix_t *matrix);
|
||||
|
||||
cairo_private cairo_bool_t
|
||||
_cairo_matrix_is_translation (const cairo_matrix_t *matrix);
|
||||
|
||||
cairo_private cairo_bool_t
|
||||
_cairo_matrix_is_integer_translation(const cairo_matrix_t *matrix,
|
||||
int *itx, int *ity);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue