From 0d7a6ba0b6862fa666712d49a4f8d5e45fe4ff85 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 3 Oct 2019 13:39:28 +0100 Subject: [PATCH] JAL-3444 transparent colour for alignment in JS --- src/jalview/renderer/seqfeatures/FeatureColourFinder.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java index b92d57b..ee40d83 100644 --- a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java +++ b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java @@ -28,7 +28,6 @@ import jalview.viewmodel.seqfeatures.FeatureRendererModel; import java.awt.Color; import java.awt.Graphics; -import java.awt.Graphics2D; import java.awt.image.BufferedImage; /** @@ -114,8 +113,17 @@ public class FeatureColourFinder if (g != null) { + if (Platform.isJS()) + { + /* + * for JavaScript the pixel itself + * is a resource that needs to be recreated in getRGB(0,0) + */ + offscreenImage.flush(); + } c = new Color(offscreenImage.getRGB(0, 0)); } + return c; } -- 1.7.10.2