Answered
This topic has been closed for replies.
Yes to some extent, I calculate canvas width and height by multiplying with devicePixelRatio
var pRatio = window.devicePixelRatio || 1;
function handleMouseMove(evt) {
if (oldX) {
drawingCanvas.graphics.beginStroke(color)
.setStrokeStyle(size, "round")
.moveTo(oldX, oldY)
.lineTo(evt.stageX / pRatio, evt.stageY / pRatio);
stage.update();
}
oldX = evt.stageX / pRatio;
oldY = evt.stageY / pRatio;
}Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
