Fix sprite offset for pixel ratio !== 1

This commit is contained in:
Andreas Hocevar
2021-08-30 21:53:46 +02:00
parent 706955dfd9
commit df493725c6
5 changed files with 44 additions and 2 deletions

View File

@@ -249,8 +249,8 @@ class CanvasImageBuilder extends CanvasBuilder {
this.image_ = image;
this.height_ = size[1];
this.opacity_ = imageStyle.getOpacity();
this.originX_ = origin[0];
this.originY_ = origin[1];
this.originX_ = origin[0] * this.imagePixelRatio_;
this.originY_ = origin[1] * this.imagePixelRatio_;
this.rotateWithView_ = imageStyle.getRotateWithView();
this.rotation_ = imageStyle.getRotation();
this.scale_ = imageStyle.getScaleArray();