- int fullsizeWidth = av.getAlignment().getWidth() * av.getCharWidth();
- int fullsizeHeight = (av.getAlignment().getHeight() + av.getAlignment()
- .getHiddenSequences().getSize())
- * av.getCharHeight();
-
- int startRes = av.getStartRes();
- int endRes = av.getEndRes();
-
- if (av.hasHiddenColumns())
- {
- startRes = av.getColumnSelection().adjustForHiddenColumns(startRes);
- endRes = av.getColumnSelection().adjustForHiddenColumns(endRes);
- }
-
- int startSeq = av.startSeq;
- int endSeq = av.endSeq;
-
- if (av.hasHiddenRows())
- {
- startSeq = av.getAlignment().getHiddenSequences()
- .adjustForHiddenSeqs(startSeq);
-
- endSeq = av.getAlignment().getHiddenSequences()
- .adjustForHiddenSeqs(endSeq);
-
- }
-
- scalew = (float) width / (float) fullsizeWidth;
- scaleh = (float) sequencesHeight / (float) fullsizeHeight;
-
- boxX = (int) (startRes * av.getCharWidth() * scalew);
- boxY = (int) (startSeq * av.getCharHeight() * scaleh);
-
- if (av.hasHiddenColumns())
- {
- boxWidth = (int) ((endRes - startRes + 1) * av.getCharWidth() * scalew);
- }
- else
- {
- boxWidth = (int) ((endRes - startRes + 1) * av.getCharWidth() * scalew);
- }
-
- boxHeight = (int) ((endSeq - startSeq) * av.getCharHeight() * scaleh);
-