Skip to content

Commit 0768ea5

Browse files
TwoAxis refactor
1 parent a2f1a11 commit 0768ea5

File tree

10 files changed

+921
-620
lines changed

10 files changed

+921
-620
lines changed

TODO.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
`set_canvas_size` should be implemented at client level
2+
3+
```rust
4+
fn set_canvas_size(&self, ctx: &Option<C>) {
5+
// Scale the drawing canvas by [dpr] to ensure sharp rendering on
6+
// high pixel density displays.
7+
if let Some(ctx) = ctx {
8+
// ctx.canvas
9+
// ..style.width = "${w}px"
10+
// ..style.height = "${h}px"
11+
// ..width = scaledW
12+
// ..height = scaledH;
13+
// ctx.set_transform(dpr, 0, 0, dpr, 0, 0);
14+
}
15+
}
16+
```

0 commit comments

Comments
 (0)