From 9c0ce1d7424886f90f0f25035c9e3f87ba719d16 Mon Sep 17 00:00:00 2001 From: Benjamin Woodruff Date: Sun, 18 Mar 2018 14:41:46 -0700 Subject: [PATCH] Fix DynamicCharAtlas with transparency There were two bugs: - We need to clear the background of _tmpCtx instead of just drawing on top if the background color is transparent. - We should set the background to fully transparent if it's partially transparent, to avoid drawing the transparent background twice. --- demo/index.html | 3 +++ demo/main.js | 12 ++++++++--- src/renderer/Renderer.ts | 1 + src/renderer/atlas/DynamicCharAtlas.ts | 28 ++++++++++++++++++++++++-- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/demo/index.html b/demo/index.html index e4db4118..29b6fcf0 100644 --- a/demo/index.html +++ b/demo/index.html @@ -26,6 +26,9 @@

+

+ +