From: hansonr Date: Thu, 10 Oct 2019 12:41:27 +0000 (+0200) Subject: JAL-3444 translucent overview X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1648150f514f5286051abdc1787009e1ec374154;p=jalview.git JAL-3444 translucent overview - was missing 2nd isJS block - JS was setting pixel background to white instead of defaultColour prior to transparent color painting --- diff --git a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java index ee40d83..836bc4a 100644 --- a/src/jalview/renderer/seqfeatures/FeatureColourFinder.java +++ b/src/jalview/renderer/seqfeatures/FeatureColourFinder.java @@ -98,11 +98,17 @@ public class FeatureColourFinder */ if (featureRenderer.getTransparency() != 1f) { - g = goff; - if (defaultColour != null) + Color c = (defaultColour == null ? Color.white : defaultColour); + if (Platform.isJS()) { - offscreenImage.setRGB(0, 0, defaultColour.getRGB()); + g = goff; + // Clear the HTML5 canvas color. + // otherwise we get a smearing. + // For whatever reason, this is necessary BH 2019.10.01. + g.setColor(c); + g.fillRect(0, 0, 1, 1); } + offscreenImage.setRGB(0, 0, c.getRGB()); } Color c = featureRenderer.findFeatureColour(seq, column + 1, g);