소스 검색

Fix screenshots coming out wrong on mobile

The device pixel ratio wasn't being respected
master
Fen Dweller 4 년 전
부모
커밋
f0b81a88d1
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. +2
    -0
      macrovision.js

+ 2
- 0
macrovision.js 파일 보기

@@ -1758,6 +1758,7 @@ function testClick(event) {
testCtx.resetTransform();



testCtx.translate(actualW/2, actualH/2);
testCtx.rotate(angle);
testCtx.translate(-actualW/2, -actualH/2);
@@ -4683,6 +4684,7 @@ function renderToCanvas() {
ctx.save();
ctx.resetTransform();
ctx.scale(window.devicePixelRatio, window.devicePixelRatio)
ctx.translate(x, y);
ctx.rotate(entity.rotation);
ctx.drawImage(img, -xSize/2, -ySize/2, xSize, ySize);


불러오는 중...
취소
저장