diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-01-16 17:46:27 +0100 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-01-26 08:59:21 +0100 |
commit | 423cc34cb00c698313c67a0edcbc6721ecf04f4f (patch) | |
tree | 46f5231f40db8052fc2979ab72594f1e44501136 /components/script/canvas_state.rs | |
parent | 4f355f5877878bb2f4aed2b471e82722cd43f8e1 (diff) | |
download | servo-423cc34cb00c698313c67a0edcbc6721ecf04f4f.tar.gz servo-423cc34cb00c698313c67a0edcbc6721ecf04f4f.zip |
Bump euclid to 0.22
- Also updates raqote to latest with an upgrade of font-kit to 0.11
applied on as a patch
- Update lyon_geom to the latest version
Major change:
- All matrices are now stored in row major order. This means that
parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
so `then()` is used and the order of operations changed.
Diffstat (limited to 'components/script/canvas_state.rs')
-rw-r--r-- | components/script/canvas_state.rs | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/components/script/canvas_state.rs b/components/script/canvas_state.rs index 0a6fba842e4..3dacd34ec48 100644 --- a/components/script/canvas_state.rs +++ b/components/script/canvas_state.rs @@ -1495,14 +1495,9 @@ impl CanvasState { let (sin, cos) = (angle.sin(), angle.cos()); let transform = self.state.borrow().transform; - self.state.borrow_mut().transform = transform.pre_transform(&Transform2D::row_major( - cos as f32, - sin as f32, - -sin as f32, - cos as f32, - 0.0, - 0.0, - )); + self.state.borrow_mut().transform = + Transform2D::new(cos as f32, sin as f32, -sin as f32, cos as f32, 0.0, 0.0) + .then(&transform); self.update_transform() } @@ -1530,9 +1525,9 @@ impl CanvasState { } let transform = self.state.borrow().transform; - self.state.borrow_mut().transform = transform.pre_transform(&Transform2D::row_major( - a as f32, b as f32, c as f32, d as f32, e as f32, f as f32, - )); + self.state.borrow_mut().transform = + Transform2D::new(a as f32, b as f32, c as f32, d as f32, e as f32, f as f32) + .then(&transform); self.update_transform() } @@ -1558,7 +1553,7 @@ impl CanvasState { } self.state.borrow_mut().transform = - Transform2D::row_major(a as f32, b as f32, c as f32, d as f32, e as f32, f as f32); + Transform2D::new(a as f32, b as f32, c as f32, d as f32, e as f32, f as f32); self.update_transform() } |