[Kde-games-devel] KSVGRenderer::render seems to ignore image size

Mauricio Piacentini piacentini at kde.org
Thu Jan 31 12:01:37 CET 2008


Andreas Pakulat wrote:
> Sorry, but I think I don't follow. Whats "canvas size" and I assume the
> "rect" is the one given to render()? If so that rect should be equal to
> the QImage I render on, as I don't give a QRectF() to render().

In this case, Aaron is referring to the SVG document size. What I 
mentioned in my message is that I have seen in the past are cases where 
this is not respected by QtSvg for some Inkscape documents. Or, in other 
words, parsing fails so that a rect bigger than all the elements is 
considered as the full SVG doc rect. Explicitally making the element 
into a group and given it an id ensures you can specify the element to 
be rendered.

> I'm not sure I have a proper element id for the backside here. It looks
> like there's only one element labelled "layer1" in all the backside
> svg's, so maybe I can use that one.

Should work.

Regards,
Mauricio Piacentini


More information about the kde-games-devel mailing list