You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2005/06/01 17:10:24 UTC

DO NOT REPLY [Bug 23709] - Height of SVG rect tag negative when rendering SVG

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=23709>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=23709





------- Additional Comments From johnfleenor76@yahoo.com  2005-06-01 17:10 -------
I have the same problem with placing backgrounds on cells.

In the org.apache.fop.render.AbstractRenderer:123  There is a negative h.  
if (props.backColor.alpha() == 0) {
            this.addFilledRect(x, y, w, -h, props.backColor);
}

I just for svg out put I placed a Math.abs(h) in 
org.apache.fop.render.svg.SVGRenderer:195.

protected void addRect(int x, int y, int w, int h, float r, float g,
                           float b, float fr, float fg, float fb) {
        Element rect = SVGUtilities.createRect(svgDocument, x / 1000f, 
pageHeight - (y / 1000f), w / 1000f, Math.abs(h) / 1000f);
        rect.setAttributeNS(null, "style", "stroke:rgb(" + ((int)(255 * r)) 
+ "," + ((int)(255 * g)) + "," + ((int)(255 * b)) + ");fill:rgb(" + ((int)(255 
* fr)) + "," + ((int)(255 * fg)) + "," + ((int)(255 * fb)) + ")");
        currentPageG.appendChild(rect);
}

I have not investagated what imapact changing the -h in the abstract renderer 
would have on other implemenations of addRect.

John Fleenor

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.