Commit b401952a authored by eseidel's avatar eseidel

Bug #: 6157

Submitted by: rob buis
Reviewed by: eseidel
        WebCore+SVG has some problems with rounded rectangles
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6157

        * ksvg2/svg/SVGRectElementImpl.cpp:
        (SVGRectElementImpl::toPathData): fixed round rect calculations


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eee032ed
2005-12-29 Rob Buis <rwlbuis@xs4all.nl>
Reviewed by eseidel.
WebCore+SVG has some problems with rounded rectangles
http://bugzilla.opendarwin.org/show_bug.cgi?id=6157
* ksvg2/svg/SVGRectElementImpl.cpp:
(SVGRectElementImpl::toPathData): fixed round rect calculations
2005-12-29 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by eseidel, ggaren, darin.
......
......@@ -105,9 +105,12 @@ KCanvasPath* SVGRectElementImpl::toPathData() const
float _x = x()->baseVal()->value(), _y = y()->baseVal()->value();
float _width = width()->baseVal()->value(), _height = height()->baseVal()->value();
if(hasAttribute(KDOM::DOMString("rx").impl()) || hasAttribute(KDOM::DOMString("ry").impl()))
bool hasRx = hasAttribute(KDOM::DOMString("rx").impl());
bool hasRy = hasAttribute(KDOM::DOMString("ry").impl());
if(hasRx || hasRy)
{
float _rx = rx()->baseVal()->value(), _ry = rx()->baseVal()->value();
float _rx = hasRx ? rx()->baseVal()->value() : ry()->baseVal()->value();
float _ry = hasRy ? ry()->baseVal()->value() : rx()->baseVal()->value();
return KCanvasCreator::self()->createRoundedRectangle(_x, _y, _width, _height, _rx, _ry);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment