[JAVA2D] Printing resolution
All this talk of PageAttributes and printing has reminded me of a strange problem I have here. I'm using JDK1.3 under Windows 98 and printing to an Epson Stylus printer. If I print a load of vector stuff, lines circles etc. then everything gets printed at printer resolution and is fine. If, however I print a background image, the resolution of all the vectors goes down to what likes like about 100 dpi, but may be 72dpi. How can I avoid this? Jerry Jerry Huxtable http://www.jhlabs.com === 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".
Re: [JAVA2D] Use of PageAttributes with Java2D
Hi Phil: Thanks. Will print() always get called twice for each page? Is the first call to enable the Sun implementation to peek at the rendering? (I want to make sure I understand your comment below.) If my program was really drawing an image, should I scale the image assuming a 72dpi printer the first time and a 300 dpi printer the second time? I did not say you will always get called twice per page. What I said was you will must be prepared to be called multiple times. You should not assume - as you imply - that you will get called once at 72dpi and once at (eg) 300dpi. If you do that you are making implementation assumptions which are not always going to hold. On each call treat the scaling you see as the device scaling for that call. Does calling print() twice per page lead to performance problems? Only if the application does a lot of "work" in the print method, other than the rendering calls. The peek itself is very lightweight. -phil. === 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".