xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Optimizer Digulla <digu...@hepe.com>
Subject Re: question about your SVG Viewbox patch for FOP
Date Thu, 01 Mar 2001 14:55:28 GMT
On Thu, Feb 22, 2001 at 10:10:03AM +0100, Jeroen de Zwart wrote:

> Dear Aaron "Optimizer" Digulla,
> 
> Thanks for writing this very usefull code for providing the viewBox
> attribute,
> 
> But with me it's not working. The code in PDFRenderer.java:
> 
> 590    SVGSVGElement svg = area.getSVGDocument().getRootElement();
> 591    int w = (int)(svg.getWidth().getBaseVal().getValue() * 1000);
> 592    int h = (int)(svg.getHeight().getBaseVal().getValue() * 1000);
> 
> finds values for w and h but
> 
> 597    if (svg.getViewBox () != null) {
> 
> is always null so nothing happens! please tell me what is wrong.
> 
> this is the fo i use with the latest (16feb) FOP 0.17 DEV:
> 
> <svg:svg width="100mm" height="50mm" viewBox="0 0 1500 1000">
> <svg:rect x="0" y="0" width="1500" height="1000" style="fill:yellow" />
> <svg:path style="fill:red" d="M 750,100 L 250,900 L 1250,900 z"/>
> </svg:svg>

It seems that not all of my patch made it into the CVS version.
Here is the missing part (the viewBox attribute was not parsed
and stored -> svg.getViewBox() would always return null).

-- 
==============================================
Sowatec AG,       CH-8330 Pfäffikon (ZH)
Witzbergstr. 7,   http://www.sowatec.com
Tel: +41-(0)1-952 55 55
Fax: +41-(0)1-952 55 66
----------------------------------------------
Aaron "Optimizer" Digulla, digulla@sowatec.com
==============================================

Mime
View raw message