From 55ab1d6dc5b9b6ae410f5e7709e5560988e60ecf Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 26 Nov 2015 14:41:44 +0000 Subject: [PATCH] JAL-1978 quick hack to prototype msa grid by shrinking coloured box background for each residue --- src/jalview/gui/SequenceRenderer.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 258a229..c3d3d29 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -57,6 +57,8 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer boolean forOverview = false; + boolean v_inset = true, h_inset = true; + /** * Creates a new SequenceRenderer object. * @@ -228,7 +230,7 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer .getCharHeight(); Color tempColour = null; - + int linset = (h_inset ? 1 : 0), vinset = (v_inset ? 1 : 0); while (i <= end) { resBoxColour = Color.white; @@ -249,12 +251,12 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer } - if (resBoxColour != tempColour) + if (true) // resBoxColour != tempColour) { if (tempColour != null) { - graphics.fillRect(avWidth * (curStart - start), y1, curWidth, - avHeight); + graphics.fillRect(avWidth * (curStart - start), y1, curWidth + - linset, avHeight - vinset); } graphics.setColor(resBoxColour); @@ -271,7 +273,8 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer i++; } - graphics.fillRect(avWidth * (curStart - start), y1, curWidth, avHeight); + graphics.fillRect(avWidth * (curStart - start), y1, curWidth - linset, + avHeight - vinset); } -- 1.7.10.2