Bug 27970 - BUFFERED_IMAGE Hint Msg for some Graphics2D's
Summary: BUFFERED_IMAGE Hint Msg for some Graphics2D's
Status: NEW
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG Viewer (show other bugs)
Version: 1.5
Hardware: PC All
: P4 minor
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-26 03:30 UTC by read wang
Modified: 2010-10-05 11:46 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description read wang 2004-03-26 03:30:02 UTC
We found an unclear problem. That is the system would print "Graphics2D from 
BufferedImage lacks BUFFERED_IMAGE hint" when we put the SVG entity on the 
graph canvas from the library of entity.
We did not set any output in our programs. We just invoked the paint 
(Graphice2D g2d) method that situated in the 
org.apache.batik.gvt.AbstractGraphicsNode.java class.
Thank for you solve this problem as soon as possible or tell us how to shield 
the output.
Thank you again!

reference:
class	:  	org.apache.batik.gvt.AbstractGraphicsNode.java;
method	: 	public void paint(Graphics2D g2d);
row     :  	457.
"Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint"
Comment 1 Thomas Deweese 2005-03-22 12:16:03 UTC
Reassigning all open bugs to the development list.
Sorry for the mass mailing.
Comment 2 Thomas Deweese 2006-03-09 11:05:28 UTC
This is caused when a Graphics2D from a buffered image is passed
into the 'paint' methods of the GVT tree.  It exists because in
JDK 1.2 & 1.3 (haven't tested 1.4 or 1.5) essentially all 
BufferedImages returned the same GraphicsDevice.  This was
problematic as the ColorModel was often off a bit and the
bounds of the destination couldn't be calculated (meaning that
we couldn't restrict drawing to just the needed region).

In place of this we added a hint that references the BufferedImage
that the Graphics comes from to the Graphics2D so we can find out
where it really came from.

I will add a property: "org.apache.batik.warn_destination"
if this is set to 'false' then this warning will be disabled.

Also when I get around to it I may check if this is needed
in JDK's 1.4 & 1.5 or if they report the GraphicsDevice properly.
Comment 3 Helder Magalhães 2010-10-05 11:46:07 UTC
(In reply to comment #2)
> I will add a property: "org.apache.batik.warn_destination"
> if this is set to 'false' then this warning will be disabled.
> 
> Also when I get around to it I may check if this is needed
> in JDK's 1.4 & 1.5 or if they report the GraphicsDevice properly.

Thomas, is this still true as of today? Do you believe you can revisit this again, given our minimum Java version was raised to 1.4? ;-)

(I'm also decreasing priority/importance given this is mostly an annoyance and the warning may not be an issue anymore.)