+ imgWidth = (av.getRanges().getEndRes() - av.getRanges().getStartRes()
+ + 1) * av.getCharWidth();
+
+ 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;
+ }