From: kiramt Date: Fri, 18 Aug 2017 10:44:18 +0000 (+0100) Subject: JAL-2664 Adjusted colour of hidden cols/seqs X-Git-Tag: Release_2_10_3b1~142^2~2^2~10^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3edb041e2b9593c08bfcb75d9411cb6db5362546;p=jalview.git JAL-2664 Adjusted colour of hidden cols/seqs --- diff --git a/src/jalview/renderer/OverviewRenderer.java b/src/jalview/renderer/OverviewRenderer.java index 48dcf3c..709816c 100644 --- a/src/jalview/renderer/OverviewRenderer.java +++ b/src/jalview/renderer/OverviewRenderer.java @@ -37,6 +37,9 @@ import java.awt.image.BufferedImage; public class OverviewRenderer { + // transparency of hidden cols/seqs overlay + private final float TRANSPARENCY = 0.5f; + private FeatureColourFinder finder; private jalview.api.SequenceRenderer sr; @@ -157,11 +160,16 @@ public class OverviewRenderer return color.getRGB(); } + /* + * Overlay a buffered image (mask) onto another image (image) where mask + * has some transparency so image shows through from below + */ private BufferedImage applyMask(BufferedImage mask, BufferedImage image) { Graphics2D g = (Graphics2D) image.getGraphics(); g.setComposite( - AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f)); + AlphaComposite.getInstance(AlphaComposite.SRC_OVER, + TRANSPARENCY)); g.drawImage(mask, 0, 0, image.getWidth(), image.getHeight(), null); return image; } @@ -180,7 +188,7 @@ public class OverviewRenderer int colIndex = 0; int pixelCol = 0; - Color hidden = Color.DARK_GRAY; + Color hidden = Color.DARK_GRAY.darker(); Graphics2D g2d = (Graphics2D) hiddenImage.getGraphics();