int yAsSeq = Math.round((float) y * alheight / sequencesHeight);
// get viewport height in sequences
- int vpheight = props.getEndSeq() - props.getStartSeq();
+ int vpheight = props.getEndSeq() - props.getStartSeq() + 1;
// get where y should be when accounting for hidden rows
// if y is in a hidden row region, shift up - but we still need absolute
// went past the end of the alignment, adjust backwards
endSeq = alheight;
// recalc yAsSeq backwards from endSeq
- yAsSeq = endSeq - vpheight;
+ yAsSeq = endSeq - vpheight + 1;
}
// convert absolute positions back to visible alignment positions for
boxWidth = Math
.round((float) (endRes - startRes + 1) * width / alwidth);
// boxHeight is the height in sequences translated to pixels
- boxHeight = Math.round((float) (endSeq - startSeq) * sequencesHeight
+ boxHeight = Math.round((float) (endSeq - startSeq + 1)
+ * sequencesHeight
/ alheight);
}