wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes Using TexturePaint causes printing problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Using TexturePaint causes printing problem" Watch "Using TexturePaint causes printing problem" New topic
Author

Using TexturePaint causes printing problem

Tanveer Rameez
Ranch Hand

Joined: Dec 11, 2000
Posts: 158
hi
When I use TexturePaint to fill an area with tiled image, the printing halts for large graphics objects.For smaller graphics object(by smaller objects I mean when I draw/fill only small regions in the Graphic object), the printing works fine.
For a simple program,I used the code:

Ofcourse the above code will work because the a small area is being filled.The above code is just to give u an idea how I ma using TexturePaint.
I used a similar code to draw large areas in the graphics object.
While trying to find the solution, I clicked on the print icon which appears in the taskbar of Windows when the print method is called. This displays the printing status dialog. IN this dialog, I found that the file size of the temporary file created for printing increases dramatically when the TexturePaint is used instead of simple setColor. For example for smalll grahics object, the file size is 30 kb when using setColor, but increases to 500 kb when usin g TexturePaint.
But I need to draw large graphs/plots on the graphics object whose printing may span 5-6 pages, with occasional filling by textures.
I found that when setColor is used the file size is 350 kb but when I use TexturePaint the file size increases to 7 Mb!!!. Then the printing never takes place. I guess this is because the file size goes beyond the printer's memory/buffer.
Can anybody give me a solution as to how do I print Textures(a small image tiled repeatedly to fill certain areas) when the graphics object is huge.PLease give me some hint. I am nearing my deadline!!!
thanks in advance.
regards
Tanveer

Nate - Edited post to shorten long line in CODE block.
[ January 09, 2002: Message edited by: Nathan Pruett ]

Author of JPhotoBrush Pro (www.jphotobrushpro.com)
 
wood burning stoves
 
subject: Using TexturePaint causes printing problem
 
Similar Threads
Retries is Java printing?
URGENT: Textured filled geometric shapes are not printed when the shapes are large
Printing an object
TexturePaint Object
Checkerboard w/ 64 squares