• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

URGENT: Textured filled geometric shapes are not printed when the shapes are large

Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a strange problem. I have a frame where I paint a filled rectangle. Now if I print it, it prints fine(the printing may need several pages if the rectangle is large).
But if I use TexturePaint to fill the rectangle with texture(tiled image), the printing is fine for small rectangle, but hangs when the rectangle is large.
When I clicked on the printer icon that appears in the taskbar in Windows to display the printing status dialog, I found that the temporary file created in the buffer for printing is huge(can be upto 10MB!!) if I use texture and the size is much smaller if I don't use texture (just fill the rectangle by color). So I guess because of the huge size of the buffer file, the printing is not possible(the file did not go to the printer).
Can anybody tell me what is the problem and how to solve it.
Actually my program will fill several geometric shapes which may span several pages.
here is a sample code. Just copy and save it in a file "testframe.java" and run it. You must have a printer to check it out. Then click on the printer icon to see the file size. Ofcourse the problem may be something else .

I think the problem might be because when I use an image(I used 48x48 pixel image which is small), to texturepaint, the image object is copied several times for tiling, thereby requiring large memory. Let me know is there any solution to it.If now is there any other way to texture paint/fill or tile any large shape(my shapes can be irregular too, like area of intersection between two irregular polygons) and print them.
Thanks in advance
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic