- boxX = (int) (startRes * av.getCharWidth() * scalew);
- boxY = (int) (startSeq * av.getCharHeight() * scaleh);
+ boxX = Math.round(posProps.convertResiduesToPixels(startRes) * scalew);
+ boxY = Math.round(posProps.convertSequencesToPixels(startSeq) * scaleh);
+
+ // boxX = (int) (startRes * av.getCharWidth() * scalew);
+ // boxY = (int) (startSeq * av.getCharHeight() * scaleh);
+
+ boxWidth = Math.round(posProps.convertResiduesToPixels(endRes
+ - startRes
+ + 1) * scalew);
+ boxHeight = Math.round(posProps.convertSequencesToPixels(endSeq
+ - startSeq)
+ * scaleh);