From eb690a1091b33e9fe1ea190be5c1781e00c6bb3e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 8 Mar 2005 14:32:21 +0000 Subject: [PATCH] dont color gaps in sequence features --- src/jalview/gui/FeatureRenderer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index 59f446e..fc31fdf 100755 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -55,11 +55,15 @@ public class FeatureRenderer implements RendererI { for (int i = fstart; i <= fend; i++) { + char s = seq.getSequence().charAt(i); + if( jalview.util.Comparison.isGap(s) ) + continue; + g.setColor(Color.blue); g.fillRect( (i-start) * width, y1, width, height); g.setColor(Color.white); - char s = seq.getSequence().charAt(i); + FontMetrics fm = g.getFontMetrics(); int charOffset = (width - fm.charWidth(s)) / 2; int pady = height / 5; -- 1.7.10.2