-
Bug
-
Resolution: Fixed
-
P3
-
1.2.2
The code that 'peeks' at all print rendering to see if it needs to be handled as
a raster does not (and never has) checked to see if there is a translucent Color :
eg
Color c = new Color(0,0,0,64);
or Paint, eg :
Paint p = new GradientPaint(0f, 0f, Color.green, 10f, 10f, Color.red, true);
used : eg
AttributedString as = new AttributedString("Sample Text");
as.addAttribute(TextAttribute.FOREGROUND, p);
graphics.drawString(as.getIterator(), 20, 50);
In the case of a translucent colour, then the translucency is lost.
In the case of a Paint: an exception is thrown, eg :
at sun.print.PathGraphics.fill(PathGraphics.java:929)
at sun.print.PathGraphics.drawGlyphVector(PathGraphics.java:614)
at sun.font.ExtendedTextSourceLabel.handleDraw(ExtendedTextSourceLabel.java:131)
at sun.font.Decoration$DecorationImpl.drawTextAndEmbellishments(Decoration.java:235)
at sun.font.Decoration$DecorationImpl.drawTextAndDecorations(Decoration.java:300)
at sun.font.ExtendedTextSourceLabel.draw(ExtendedTextSourceLabel.java:135)
at java.awt.font.TextLine.draw(TextLine.java:550)
at java.awt.font.TextLayout.draw(TextLayout.java:2699)
at sun.print.PathGraphics.drawString(PathGraphics.java:590)
at sun.print.PathGraphics.drawString(PathGraphics.java:580)
at PAS.paint(PAS.java:85)
at PAS.print(PAS.java:64)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1811)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1334)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1196)
at PAS.main(PAS.java:43)
a raster does not (and never has) checked to see if there is a translucent Color :
eg
Color c = new Color(0,0,0,64);
or Paint, eg :
Paint p = new GradientPaint(0f, 0f, Color.green, 10f, 10f, Color.red, true);
used : eg
AttributedString as = new AttributedString("Sample Text");
as.addAttribute(TextAttribute.FOREGROUND, p);
graphics.drawString(as.getIterator(), 20, 50);
In the case of a translucent colour, then the translucency is lost.
In the case of a Paint: an exception is thrown, eg :
at sun.print.PathGraphics.fill(PathGraphics.java:929)
at sun.print.PathGraphics.drawGlyphVector(PathGraphics.java:614)
at sun.font.ExtendedTextSourceLabel.handleDraw(ExtendedTextSourceLabel.java:131)
at sun.font.Decoration$DecorationImpl.drawTextAndEmbellishments(Decoration.java:235)
at sun.font.Decoration$DecorationImpl.drawTextAndDecorations(Decoration.java:300)
at sun.font.ExtendedTextSourceLabel.draw(ExtendedTextSourceLabel.java:135)
at java.awt.font.TextLine.draw(TextLine.java:550)
at java.awt.font.TextLayout.draw(TextLayout.java:2699)
at sun.print.PathGraphics.drawString(PathGraphics.java:590)
at sun.print.PathGraphics.drawString(PathGraphics.java:580)
at PAS.paint(PAS.java:85)
at PAS.print(PAS.java:64)
at sun.print.RasterPrinterJob.printPage(RasterPrinterJob.java:1811)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1334)
at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1196)
at PAS.main(PAS.java:43)