From 7027900f4993dcd00745a4db045ed1c0e3255f8a Mon Sep 17 00:00:00 2001 From: Justin Meyer Date: Sun, 7 Apr 2019 18:49:29 -0500 Subject: [PATCH] fix: context scale for high resolution displays with foreignobjectrendering (#1782) --- src/renderer/ForeignObjectRenderer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/ForeignObjectRenderer.js b/src/renderer/ForeignObjectRenderer.js index f58dd36..2683010 100644 --- a/src/renderer/ForeignObjectRenderer.js +++ b/src/renderer/ForeignObjectRenderer.js @@ -16,6 +16,7 @@ export default class ForeignObjectRenderer { this.canvas.height = Math.floor(options.height) * options.scale; this.canvas.style.width = `${options.width}px`; this.canvas.style.height = `${options.height}px`; + this.ctx.scale(options.scale, options.scale); options.logger.log( `ForeignObject renderer initialized (${options.width}x${options.height} at ${options.x},${options.y}) with scale ${options.scale}`