We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0d7ba6 commit d60e240Copy full SHA for d60e240
1 file changed
extensions/TheShovel/CanvasEffects.js
@@ -503,7 +503,12 @@
503
updateStyle();
504
}
505
renderscale({ X, Y }) {
506
- Scratch.vm.renderer.resize(X, Y);
+ // The function normally expects a stage size and therefore scales by DPI.
507
+ // However, this block is meant for a fixed pixel size
508
+ // (usually used in conjunction with the pixelated resize rendering mode).
509
+ // Therefore, scale it back according to the devicePixelRatio.
510
+ const pixelRatio = window.devicePixelRatio || 1;
511
+ Scratch.vm.renderer.resize(X / pixelRatio, Y / pixelRatio);
512
513
setBorder(args) {
514
borderWidth = Scratch.Cast.toNumber(args.WIDTH);
0 commit comments