Thank you.
| eg | -----Original Message----- From: Thomas DeWeese [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 3:33 PM To: Batik Users Subject: Re: Batik doesn't render this properly Grinvald, Edward wrote: > Thank you for the response, but there also appears to be a loss of > color in the gradient of the _monitor_. After replacing patternContentUnits="objectBoundingBox" with viewBox="0 0 1 1" preserveAspectRatio="none" The renderings are almost indistinguishable. Also looking at the pixel values they are very close to the requested values at the edge of the monitor: #c9d4e4 the gradient ends at: #c6d1e3 > > -----Original Message----- > From: Thomas DeWeese [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 04, 2003 3:07 PM > To: Batik Users > Subject: Re: Batik doesn't render this properly > > Grinvald, Edward wrote: > > >>I have an image that renders well in ie (w/ adobe plug-in), and looks >>completely different with batik. Does anyone know what the problem is? > > > Hi Edward, > > The problem is the use of patternContentUnits="objectBoundingBox". > take the example from the specification: > > <pattern x="10" y="10" width="20" height="20"> > <rect x="5" y="5" width="10" height="10"/> </pattern> > > In this case the rectangle's top left corner is 5 pixels over/down > from the pattern tile's origin (this uses the default userSpaceOnUse > for patternContentUnits). > > But when you say "objectBoundingBox" this says that the coordinate > system (within the pattern tile) is established using the objects > bounding box. So in this case 0,0 is mapped to the coordinates of the > object's upper left corner, _not_ to the tile's upper left corner. > In your case the objects upper left corner is not 0,0 so the pattern > contents appear 'shifted' in Batik. Adobe appears to ignore this > translation and only apply the scaling portion of the transform. > > The 'fix' for this is to use viewBox="0 0 1 1" > preserveAspectRatio="none" which says map the coordinate space 0,0 -> > 1,1 to what ever space x,y w,h define. Which appears to be what you > want. > > >>Edward Grinvald >>*Software Engineer, BrightStor** >>*Computer Associates International (<***http://www.ca.com* >><http://www.ca.com/>*>)** >>*One Computer Associates Plaza * >>*Islandia* *, NY 11749 * >>*voice: (631) 342 6350* >>[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >> >> >> >> >>---------------------------------------------------------------------- >>-- >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]