*/
protected abstract void resetAlignmentDims();
- protected void setBoxPosition(int startRes, int endRes, int startSeq,
- int endSeq)
+ protected void setBoxPosition(int startRes, int startSeq, int vpwidth,
+ int vpheight)
{
resetAlignmentDims();
boxY = Math.round((float) startSeq * sequencesHeight / alheight);
// boxWidth is the width in residues translated to pixels
- // since the box includes both the start and end residues, add 1 to the
- // difference
- boxWidth = Math
- .round((float) (endRes - startRes + 1) * width / alwidth);
+ boxWidth = Math.round((float) vpwidth * width / alwidth);
+
// boxHeight is the height in sequences translated to pixels
- boxHeight = Math.round((float) (endSeq - startSeq + 1)
- * sequencesHeight / alheight);
+ boxHeight = Math.round((float) vpheight * sequencesHeight / alheight);
}
}
\ No newline at end of file