int sy = -1;\r
int ex = -1;\r
int groupIndex = -1;\r
+ int visWidth = (endRes - startRes +1) * av.charWidth;\r
\r
if ((group == null) && (av.alignment.getGroups().size() > 0))\r
{\r
groupIndex = 0;\r
}\r
\r
+\r
if (group != null)\r
{\r
do\r
ex = (((group.getEndRes() + 1) - group.getStartRes()) * av.charWidth) -\r
1;\r
\r
- if(sx+ex<0 || sx>imgWidth)\r
+ if(sx+ex<0 || sx>visWidth)\r
{\r
continue;\r
}\r
{\r
if (inGroup)\r
{\r
- if (sx >= 0 && sx < imgWidth)\r
+ if (sx >= 0 && sx < visWidth)\r
g.drawLine(sx, oldY, sx, sy);\r
\r
- if (sx + ex < imgWidth)\r
+ if (sx + ex < visWidth)\r
g.drawLine(sx + ex, oldY, sx + ex, sy);\r
\r
if (sx < 0)\r
sx = 0;\r
}\r
\r
- if (sx + ex > imgWidth)\r
- ex = imgWidth;\r
+ if (sx + ex > visWidth)\r
+ ex = visWidth;\r
\r
else if (sx + ex >= (endRes - startRes + 1) * av.charWidth)\r
ex = (endRes - startRes + 1) * av.charWidth;\r
if (inGroup)\r
{\r
sy = offset + ( (i - startSeq) * av.charHeight);\r
- if (sx >= 0 && sx < imgWidth)\r
+ if (sx >= 0 && sx < visWidth)\r
g.drawLine(sx, oldY, sx, sy);\r
\r
- if (sx + ex < imgWidth)\r
+ if (sx + ex < visWidth)\r
g.drawLine(sx + ex, oldY, sx + ex, sy);\r
\r
if (sx < 0)\r
sx = 0;\r
}\r
\r
- if (sx + ex > imgWidth)\r
- ex = imgWidth;\r
+ if (sx + ex > visWidth)\r
+ ex = visWidth;\r
else if (sx + ex >= (endRes - startRes + 1) * av.charWidth)\r
ex = (endRes - startRes + 1) * av.charWidth;\r
\r
\r
groupIndex++;\r
\r
+ g.setStroke(new BasicStroke());\r
+\r
if (groupIndex >= av.alignment.getGroups().size())\r
{\r
break;\r
\r
group = (SequenceGroup) av.alignment.getGroups().elementAt(groupIndex);\r
\r
- g.setStroke(new BasicStroke());\r
+\r
}\r
while (groupIndex < av.alignment.getGroups().size());\r
\r