summaryrefslogtreecommitdiff
path: root/gsk/gsktransform.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-03-22 13:54:29 +0000
committerBenjamin Otte <otte@redhat.com>2019-04-29 02:26:31 +0200
commitcf9deb7cf555382de3f56f56ad75bc9dfd38390c (patch)
treee498e35681520d1763fe890ba208bae2fd184be2 /gsk/gsktransform.c
parent40beb69487624113a92cef8d1ed9ad3aaebc859b (diff)
downloadgtk+-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.c16
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: