hi, trying to get a graphics2d from someplace other than the paint method. javadocs says that a graphics2d can only be obtained from another graphics2d or created from a component or from images such as buffered image. i am trying to stop using buffered images.

one place where i can find one of these is in the paint component method of a jpanel. but i am trying to draw into an offscreen image using an affine transform and will paint the offscreen image into the panel later. so it's sort of a chicken and egg problem.

could one make a very small jpanel and clone it's graphics context, then throw away the small jpanel and dispose of the context? sounds like an ugly hack. has anyone tried something like this?

is there some way to hook up an affine transform as an image producer?

the reason that i am trying to get away from buffered images is that most of the images will be black and white tiff line drawings. so setting the color model to int-rgb is a memory hog. but i do not know of any way to examine the image to determine what a good color model would be (it will be downloaded from an url).

thanks

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to