X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FFeatureRenderer.java;h=7f8d89d0ec620e648632aa0cc7f77f33957f77fe;hb=37a5dfc3c72a42689e90ad8a0e118e8855d9868b;hp=66a9bc247f631c8b26ecdb7105ba04828b261bf9;hpb=a83836da9bad8f9cee149cf7dc443bf2a8c7648b;p=jalview.git diff --git a/src/jalview/appletgui/FeatureRenderer.java b/src/jalview/appletgui/FeatureRenderer.java index 66a9bc2..7f8d89d 100755 --- a/src/jalview/appletgui/FeatureRenderer.java +++ b/src/jalview/appletgui/FeatureRenderer.java @@ -78,6 +78,7 @@ public class FeatureRenderer renderOrder = fr.renderOrder; featureGroups = fr.featureGroups; featureColours = fr.featureColours; + transparency = fr.transparency; } @@ -99,7 +100,7 @@ public class FeatureRenderer currentColour = null; - drawSequence(null, lastSequence, lastSequence.findPosition(i), -1,-1, -1, -1); + drawSequence(null, lastSequence, lastSequence.findPosition(i), -1,-1); if(currentColour==null) return initialCol; @@ -136,7 +137,7 @@ public class FeatureRenderer currentColour = null; - drawSequence(null, lastSequence, lastSequence.findPosition(column), -1,-1, -1, -1); + drawSequence(null, lastSequence, lastSequence.findPosition(column), -1,-1); if(currentColour==null) return initialCol; @@ -166,7 +167,7 @@ public class FeatureRenderer int sfSize, sfindex, spos, epos; public void drawSequence(Graphics g, SequenceI seq, - int start, int end, int y1, int width, int height) + int start, int end, int y1) { if ( seq.getSequenceFeatures() == null || seq.getSequenceFeatures().length==0) @@ -246,13 +247,13 @@ public class FeatureRenderer seq.findIndex(sequenceFeatures[sfindex].begin) - 1, new Color( ( (Integer) av.featuresDisplayed.get( sequenceFeatures[sfindex].type)).intValue()), - start, end, y1, width, height); + start, end, y1); renderFeature(g, seq, seq.findIndex(sequenceFeatures[sfindex].end) - 1, seq.findIndex(sequenceFeatures[sfindex].end) - 1, new Color( ( (Integer) av.featuresDisplayed.get( sequenceFeatures[sfindex].type)).intValue()), - start, end, y1, width, height); + start, end, y1); } else @@ -260,7 +261,7 @@ public class FeatureRenderer seq.findIndex(sequenceFeatures[sfindex].begin) - 1, seq.findIndex(sequenceFeatures[sfindex].end) - 1, getColour(sequenceFeatures[sfindex].type), - start, end, y1, width, height); + start, end, y1); } } @@ -275,7 +276,7 @@ public class FeatureRenderer char s; int i; void renderFeature(Graphics g, SequenceI seq, - int fstart, int fend, Color featureColour, int start, int end, int y1, int width, int height) + int fstart, int fend, Color featureColour, int start, int end, int y1) { if (((fstart <= end) && (fend >= start))) @@ -301,16 +302,16 @@ public class FeatureRenderer g.setColor(featureColour); - g.fillRect( (i - start) * width, y1, width, height); + g.fillRect( (i - start) * av.charWidth, y1, av.charWidth, av.charHeight); if(!av.validCharWidth) continue; g.setColor(Color.white); - charOffset = (width - fm.charWidth(s)) / 2; + charOffset = (av.charWidth - fm.charWidth(s)) / 2; g.drawString(String.valueOf(s), - charOffset + (width * (i - start)), - (y1 + height) - height / 5); //pady = height / 5; + charOffset + (av.charWidth * (i - start)), + (y1 + av.charHeight) - av.charHeight / 5); //pady = height / 5; } }