You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just putting this here if anyone else need it.
If you are trying to use canvas.drawSvg from PictureRecorder/createPicture, then you'll notice canvas.drawSvg doesn't take x and y values.
Here's a workaround for this
canvas.save();
canvas.translate(x,y);
canvas.drawSvg(svg, SVG_ICON_SIZE, SVG_ICON_SIZE);
canvas.restore();
// further drawing commands
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Just putting this here if anyone else need it.
If you are trying to use
canvas.drawSvgfrom PictureRecorder/createPicture, then you'll noticecanvas.drawSvgdoesn't takex and yvalues.Here's a workaround for this
Beta Was this translation helpful? Give feedback.
All reactions