Question about ownership of KoShape

Dmitry Kazakov dimula73 at gmail.com
Thu Nov 17 15:18:10 UTC 2016


Hi, all!

As some of you may already know, at the moment I'm working on adding
support of SVG to Krita. Obviously enough I use Flake as a internal
representation/rendering engine. And, yes, I base my work on SvgParser
class started by Jan Hambrecht in 2011.

Right now my main question is: who owns all the shapes in the document? As
far as I could understand, group shapes do not own them. So the question
seems to be a bit tough for me...

My guess is that the shapes are owned by KoShapeManager... If so, how
KoShapePainter should work? It has in internal shape manager that will
delete all the shapes after each painting. How can it be solved?

And the most interesting part:

SVG standard supports <defs>/<use> paradigm [1]. Which allows one shape to
have multiple instances in different parts of the document. How can it be
solved within KoFlake? Copy-constructors are not allowed in KoShape, the
management is not reference counted. How can I solve the thing?

[1] - https://www.w3.org/TR/SVG/struct.html#UseElement

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20161117/ed0e5ca9/attachment.html>


More information about the kimageshop mailing list