diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2019-03-22 13:54:29 +0000 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2019-04-29 02:26:31 +0200 |
commit | cf9deb7cf555382de3f56f56ad75bc9dfd38390c (patch) | |
tree | e498e35681520d1763fe890ba208bae2fd184be2 /gsk/gsktransform.c | |
parent | 40beb69487624113a92cef8d1ed9ad3aaebc859b (diff) | |
download | gtk+-cf9deb7cf555382de3f56f56ad75bc9dfd38390c.tar.gz |
Use getters for translation and scaling components
Instead of accessing the matrix cells directly.
Diffstat (limited to 'gsk/gsktransform.c')
-rw-r--r-- | gsk/gsktransform.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c index e67f7ce83c..40917be44c 100644 --- a/gsk/gsktransform.c +++ b/gsk/gsktransform.c @@ -310,15 +310,15 @@ gsk_matrix_transform_apply_affine (GskTransform *transform, break; case GSK_TRANSFORM_CATEGORY_2D_AFFINE: - *out_dx += *out_scale_x * graphene_matrix_get_value (&self->matrix, 3, 0); - *out_dy += *out_scale_y * graphene_matrix_get_value (&self->matrix, 3, 1); - *out_scale_x *= graphene_matrix_get_value (&self->matrix, 0, 0); - *out_scale_y *= graphene_matrix_get_value (&self->matrix, 1, 1); + *out_dx += *out_scale_x * graphene_matrix_get_x_translation (&self->matrix); + *out_dy += *out_scale_y * graphene_matrix_get_y_translation (&self->matrix); + *out_scale_x *= graphene_matrix_get_x_scale (&self->matrix); + *out_scale_y *= graphene_matrix_get_y_scale (&self->matrix); break; case GSK_TRANSFORM_CATEGORY_2D_TRANSLATE: - *out_dx += *out_scale_x * graphene_matrix_get_value (&self->matrix, 3, 0); - *out_dy += *out_scale_y * graphene_matrix_get_value (&self->matrix, 3, 1); + *out_dx += *out_scale_x * graphene_matrix_get_x_translation (&self->matrix); + *out_dy += *out_scale_y * graphene_matrix_get_y_translation (&self->matrix); break; case GSK_TRANSFORM_CATEGORY_IDENTITY: @@ -345,8 +345,8 @@ gsk_matrix_transform_apply_translate (GskTransform *transform, break; case GSK_TRANSFORM_CATEGORY_2D_TRANSLATE: - *out_dx += graphene_matrix_get_value (&self->matrix, 3, 0); - *out_dy += graphene_matrix_get_value (&self->matrix, 3, 1); + *out_dx += graphene_matrix_get_x_translation (&self->matrix); + *out_dy += graphene_matrix_get_y_translation (&self->matrix); break; case GSK_TRANSFORM_CATEGORY_IDENTITY: |