Skip to content

Commit e592cad

Browse files
committed
feat(ext/canvas): transformation operations
1 parent 091ccd5 commit e592cad

File tree

7 files changed

+565
-6
lines changed

7 files changed

+565
-6
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = ["the Andromeda team"]
77
edition = "2024"
88
license = "Mozilla Public License 2.0"
99
repository = "https://github.com/tryandromeda/andromeda"
10-
version = "0.1.0-draft43"
10+
version = "0.1.0-draft44"
1111

1212
[workspace.dependencies]
1313
andromeda-core = { path = "core" }

runtime/src/ext/canvas/context2d.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,9 @@ pub fn internal_canvas_save<'gc>(
11471147
stroke_style: data.stroke_style.clone(),
11481148
line_width: data.line_width,
11491149
global_alpha: data.global_alpha,
1150+
transform: data.transform,
1151+
line_dash: data.line_dash.clone(),
1152+
line_dash_offset: data.line_dash_offset,
11501153
};
11511154
data.state_stack.push(current_state);
11521155

@@ -1180,6 +1183,9 @@ pub fn internal_canvas_restore<'gc>(
11801183
data.stroke_style = saved_state.stroke_style;
11811184
data.line_width = saved_state.line_width;
11821185
data.global_alpha = saved_state.global_alpha;
1186+
data.transform = saved_state.transform;
1187+
data.line_dash = saved_state.line_dash;
1188+
data.line_dash_offset = saved_state.line_dash_offset;
11831189
}
11841190

11851191
// Add restore command to command list

0 commit comments

Comments
 (0)