Skip to main content

Raster Path Printing

1 reply [Last post]
hlander123
Offline
Joined: 2005-05-12

As I understand it, under certain circumstances printing uses a raster rather than vector graphics. One of these circumstances is when the Printable uses transparent colors (Alpha less than 100%). A couple questions about this:

1) Other than Alpha Colors, what other conditions cause raster printing to occur?

2) Is there a way that I can detect that a raster is being used in the print() method of my Printable?

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
philrace
Offline
Joined: 2003-06-09

gradient paints, and translucent images (bitmask
transparency is OK) invoke it too.
Basically its things that aren't esaily (if at all)
possible with GDI printing or postscript.

There isn't an API to detect the raster path printing
so I can't offer anything that will work "forever"
but there are a couple of things that you can try
1) the graphics on the 2nd and subsequent calls to
a page is an instance of a class called
sun.print.ProcyGraphics2D (I think ..)
2) The clip on these subsequent calls covers a "band"
across some fraction of the page.

Both of these have their problems - eg we
could change the internal class name at any time.

-Phil Race, Java 2D