- if ((width > 0) && (height > 0)) {
- return image.getSubimage(0, 0, width, height + 6);
+ if (buffer != null) {
+ for (int i = 0; (i < buffer.length()) && (abort == false); i++) {
+ consume(buffer.charAt(i));
+ }
+ buffer = null;
+ }
+ if (abort == true) {
+ return null;
+ }
+
+ if ((width > 0) && (height > 0) && (image != null)) {
+ /*
+ System.err.println(String.format("%d %d %d %d", width, y + 1,
+ rasterWidth, rasterHeight));
+ */
+
+ if ((rasterWidth > width) || (rasterHeight > y + 1)) {
+ resizeImage(Math.max(width, rasterWidth),
+ Math.max(y + 1, rasterHeight));
+ }
+ return image.getSubimage(0, 0, width, y + 1);