Olivier Lefevre wrote:
No, you wouldn't. It makes no difference. No one is asking *you* to
create a raster.


Misunderstanding.
Yes. You are misunderstanding. The printer "raster" path is at the same
resolution as the pdl path
Both will be different than the screen resolution which you are
hardcoding to.

-phil.

 Let us say I have a line plot with a thousand points,
many tick etc. I have a to convert their coordinates from whatever "data
space" they come from to actual pixel positions on the device (the
screen). Now because it's a lot of computation I save these positions.
If suddenly I am requested to paint the plot onto a device with a different
size/resolution I cannot simply use the state backing what is on the
screen, for obvious reasons. One possibility is to simply apply a scaling
factor in the Graphics2D object to the saved positions but that is exactly
the strategy that fails with raster images. Thus either I must create a
second, invisible copy of the widget with the appropriate backing state
and paint _that_ to the printer or else I must keep around a second version
of paintComponent that does not use the saved pre-computed positions but
computes them on the fly. Is it clear now?

The bottom line is that being unable to simply scale the drawing and
having to paint it at its "real" size/resolution does put a burden
on the developer.

-- O.L.



===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to