370 |
// "middle of pixel" coordinates and light up complete pixels. |
// "middle of pixel" coordinates and light up complete pixels. |
371 |
private boolean shiftDrawCalls = false; |
private boolean shiftDrawCalls = false; |
372 |
|
|
373 |
private final double shifted(double coord, boolean doShift) |
private double shifted(double coord, boolean doShift) |
374 |
{ |
{ |
375 |
if (doShift) |
if (doShift) |
376 |
return Math.floor(coord) + 0.5; |
return Math.floor(coord) + 0.5; |
378 |
return coord; |
return coord; |
379 |
} |
} |
380 |
|
|
381 |
private final void walkPath(PathIterator p, boolean doShift) |
private void walkPath(PathIterator p, boolean doShift) |
382 |
{ |
{ |
383 |
double x = 0; |
double x = 0; |
384 |
double y = 0; |
double y = 0; |
428 |
} |
} |
429 |
} |
} |
430 |
|
|
431 |
private final Map getDefaultHints() |
private Map getDefaultHints() |
432 |
{ |
{ |
433 |
HashMap defaultHints = new HashMap(); |
HashMap defaultHints = new HashMap(); |
434 |
|
|
450 |
return defaultHints; |
return defaultHints; |
451 |
} |
} |
452 |
|
|
453 |
public static final int[] findSimpleIntegerArray (ColorModel cm, Raster raster) |
public static int[] findSimpleIntegerArray (ColorModel cm, Raster raster) |
454 |
{ |
{ |
455 |
if (cm == null || raster == null) |
if (cm == null || raster == null) |
456 |
return null; |
return null; |
489 |
return db.getData(); |
return db.getData(); |
490 |
} |
} |
491 |
|
|
492 |
private final void updateBufferedImage() |
private void updateBufferedImage() |
493 |
{ |
{ |
494 |
if (bimage != null && pixelConversionRequired) |
if (bimage != null && pixelConversionRequired) |
495 |
{ |
{ |
501 |
} |
} |
502 |
} |
} |
503 |
|
|
504 |
private final boolean drawImage(Image img, AffineTransform xform, |
private boolean drawImage(Image img, AffineTransform xform, |
505 |
Color bgcolor, ImageObserver obs) |
Color bgcolor, ImageObserver obs) |
506 |
{ |
{ |
507 |
if (img == null) |
if (img == null) |
508 |
return false; |
return false; |
931 |
return bg; |
return bg; |
932 |
} |
} |
933 |
|
|
934 |
private final void doPolygon(int[] xPoints, int[] yPoints, int nPoints, |
private void doPolygon(int[] xPoints, int[] yPoints, int nPoints, |
935 |
boolean close, boolean fill) |
boolean close, boolean fill) |
936 |
{ |
{ |
937 |
if (nPoints < 1) |
if (nPoints < 1) |
938 |
return; |
return; |
985 |
doPolygon(xPoints, yPoints, nPoints, false, false); |
doPolygon(xPoints, yPoints, nPoints, false, false); |
986 |
} |
} |
987 |
|
|
988 |
private final boolean drawRaster(ColorModel cm, Raster r, |
private boolean drawRaster(ColorModel cm, Raster r, |
989 |
AffineTransform imageToUser, Color bgcolor) |
AffineTransform imageToUser, Color bgcolor) |
990 |
{ |
{ |
991 |
if (r == null) |
if (r == null) |
992 |
return false; |
return false; |