From: gmungoc Date: Thu, 3 Oct 2019 12:39:28 +0000 (+0100) Subject: JAL-3444 transparent colour for alignment in JS X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0d7a6ba0b6862fa666712d49a4f8d5e45fe4ff85;p=jalview.git JAL-3444 transparent colour for alignment in JS --- 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; }