svgreader.cxx: XML_RECT question

Marco Cecchetti mrcekets at
Fri Apr 27 15:35:26 PDT 2012

On Fri, 27 Apr 2012 23:03:41 +0200, Christina Roßmanith  
<ChrRossmanith at> wrote:

> Hi,
> there are two "case XML_RECT" blocks in svgreader.cxx in two different  
> visitors. The ShapeWritingVisitor scales rx and ry with width and  
> height, the ShapeRenderingVisitor does not apply any scaling. I guess  
> both visitors should treat rx and ry the same way?

Looking at basegfx::tools::createPolygonFromRect implementation
(in basegfx/source/polygon/b2dpoligontools.cxx) the routine expects
radii (rx, ry) in the [0,1] range and if not they are cropped
to 0 or 1. So the scaled input should be the correct one.
However I think it is better if you perform some visual test.

-- Marco

Using Opera's revolutionary e-mail client:

More information about the LibreOffice mailing list