diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-01 13:28:27 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-01 13:45:20 -0400 |
commit | 319762b908d1a6896fb2a07172409e08ce147abd (patch) | |
tree | a279898e0558fabd3c9ecd0028bfd579fc89d115 /gsk | |
parent | e453a989dfc211f7c5fbf1873b7d90324e7805cc (diff) | |
download | gtk+-319762b908d1a6896fb2a07172409e08ce147abd.tar.gz |
gsk: Extract scales properly from 2D transforms
We have the code to do it properly.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gl/gskglrenderjob.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index 96637054d2..7fa6408fc2 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -466,13 +466,14 @@ extract_matrix_metadata (GskGLRenderModelview *modelview) case GSK_TRANSFORM_CATEGORY_2D: { - float xx, xy, yx, yy, dx, dy; + float skew_x, skew_y, angle, dx, dy; - gsk_transform_to_2d (modelview->transform, - &xx, &xy, &yx, &yy, &dx, &dy); - - modelview->scale_x = sqrtf (xx * xx + xy * xy); - modelview->scale_y = sqrtf (yx * yx + yy * yy); + gsk_transform_to_2d_components (modelview->transform, + &skew_x, &skew_y, + &modelview->scale_x, &modelview->scale_y, + &angle, &dx, &dy); + modelview->dx = 0; + modelview->dy = 0; } break; |