sr.renderGaps( false );\r
sr.forOverview = true;\r
fr = new FeatureRenderer(av);\r
- fr.drawText = false;\r
fr.overview = true;\r
\r
\r
fr.sequenceFeatures = ap.seqPanel.seqCanvas.getFeatureRenderer().sequenceFeatures;\r
}\r
\r
-\r
resizing = true;\r
\r
if ( (getSize().width > 0) && (getSize().height > 0))\r
int alwidth = av.alignment.getWidth();\r
int alheight = av.alignment.getHeight();\r
\r
+ if (av.showSequenceFeatures)\r
+ {\r
+ fr.renderOrder = ap.seqPanel.seqCanvas.getFeatureRenderer().renderOrder;\r
+ fr.featureGroups = ap.seqPanel.seqCanvas.getFeatureRenderer().featureGroups;\r
+ fr.featureColours = ap.seqPanel.seqCanvas.getFeatureRenderer().featureColours;\r
+ fr.sequenceFeatures = ap.seqPanel.seqCanvas.getFeatureRenderer().sequenceFeatures;\r
+ }\r
+\r
if (getSize().width > 0 && getSize().height > 0)\r
{\r
width = getSize().width;\r
float sampleCol = (float) alwidth / (float) width;\r
float sampleRow = (float) alheight / (float) sequencesHeight;\r
\r
- int lastcol=-1, lastrow=0;\r
+ int lastcol=0, lastseq=0;\r
+ int xstart=0, ystart=0;\r
Color color = Color.yellow;\r
- int row, col;\r
+ int col, sameRow = 0, sameCol = 0;\r
jalview.datamodel.SequenceI sequence;\r
- for (row = 0; row < sequencesHeight; row++)\r
+\r
+ for (int row = 0; row <= sequencesHeight; row++)\r
{\r
- sequence = av.getAlignment().getSequenceAt(lastrow);\r
+ if((int)(row*sampleRow)==lastseq)\r
+ {\r
+ sameRow ++;\r
+ continue;\r
+ }\r
+\r
+ sequence = av.getAlignment().getSequenceAt(lastseq);\r
+\r
for (col = 0; col < width; col++)\r
{\r
- if((int)(col*sampleCol) == lastcol && (int)(row*sampleRow)==lastrow)\r
+ if((int)(col*sampleCol) == lastcol)\r
{\r
- mg.drawLine(col, row, col, row);\r
+ sameCol ++;\r
continue;\r
}\r
\r
- lastrow = (int)(row*sampleRow);\r
lastcol = (int)(col*sampleCol);\r
\r
- if(av.alignment.getSequenceAt(lastrow).getLength()>lastcol)\r
+ if(sequence.getLength()>lastcol)\r
{\r
-\r
color = sr.findSequenceColour(sequence, lastcol);\r
\r
if (av.showSequenceFeatures)\r
color = color.white;\r
\r
mg.setColor(color);\r
- mg.drawLine(col,row,col,row);\r
+ if (sameCol == 1 && sameRow == 1)\r
+ mg.drawLine(xstart, ystart, xstart, ystart);\r
+ else\r
+ mg.fillRect(xstart, ystart, sameCol, sameRow);\r
\r
+ xstart = col;\r
+ sameCol = 1;\r
}\r
+\r
+\r
+ lastseq = (int)(row*sampleRow);\r
+ ystart = row;\r
+ sameRow = 1;\r
}\r
\r
if (av.conservation != null)\r