Hello svg developers, I have a problem with a pattern that has to have relative coordinates. At first, I used patternContentUnits = "objectBoundingBox" which seem to work well all modern browsers. However, I use Batik Rasterizer to allow users to convert SVGs to PDF and/or PNG and Batik Rasterizer didn't seem to support patternContentUnits = "objectBoundingBox for SVG to PDF conversion. <pattern xmlns="http://www.w3.org/2000/svg" <http://www.w3.org/2000/svg> id="Pattern2" x="0" y="0" width="1" height="1" patternContentUnits="objectBoundingBox"> <rect x="0.1" y="0" width="0.33" height="1" style="fill:rgb(39,80,215)"/> <rect x="0.49" y="0" width="0.47" height="1" style="fill:rgb(11,198,221)"/> </pattern>
As an alternative, I found a internet post in which they used viewBox="0 0 1 1" preserveAspectRatio="none" instead of patternContentUnits = "objectBoundingBox". This solution works well in Chrome, IE9 and Batik Rasterizer. However, it is -not- working in Firefox (14). <pattern xmlns="http://www.w3.org/2000/svg" <http://www.w3.org/2000/svg> id="Pattern1" x="0" y="0" width="1" height="1" viewBox="0 0 1 1" preserveAspectRatio="none"> <rect x="0.1" y="0" width="0.33" height="1" style="fill:rgb(39,80,215)"/> <rect x="0.49" y="0" width="0.47" height="1" style="fill:rgb(11,198,221)"/> </pattern> I have put a small example online here: http://mgcv.cmbi.ru.nl/example.svg <http://mgcv.cmbi.ru.nl/example.svg> (So the first works in Chrome, IE9 and Batik Rasterizer but not in FF14. And the second works well in Chrome, IE9 and FF14 but not in Batik Rasterizer PDF conversion) Does anybody have a suggestion? It seems to me that it should be possible to get the viewbox solution working in firefox? Thanks in advance! Cheers, Lex Radboud University Nijmegen, The Netherlands. [Non-text portions of this message have been removed] ------------------------------------ ----- To unsubscribe send a message to: [email protected] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

