- if (imgWidth > 0)
- {
- BufferedImage newimage = new BufferedImage(imgWidth,
- ap.getAnnotationPanel().getHeight(),
- BufferedImage.TYPE_INT_ARGB);
-
- gg = (Graphics2D) newimage.getGraphics();
- gg.setFont(av.getFont());
- gg.drawImage(image, null, 0, 0);
- image = newimage;
-
- transX = (er - horizontal - sr) * av.getCharWidth();
- sr = er - horizontal - sr;
- }
+ if (horizontal > 0) // scrollbar pulled right, image to the left
+ {
+ transX = (er - sr - horizontal) * av.getCharWidth();
+ sr = er - horizontal;