[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Question about ownership of KoShape
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2016-11-17 15:18:10
Message-ID: CAEkBSfWLQyQXKQmbmk20rs9LB+iG-XhmfCP-K-efN-nLTHE-Ag () mail ! gmail ! com
[Download RAW message or body]

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

[Attachment #3 (text/html)]

<div dir="ltr"><div><div><div>Hi, all!<br><br></div>As some of you may already know, \
at the moment I&#39;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.<br><br></div>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...<br><br></div>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?<br><br><div><div><div>And the \
most interesting part:<br><br></div><div>SVG standard supports \
&lt;defs&gt;/&lt;use&gt; 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?<br><br>[1] - <a \
href="https://www.w3.org/TR/SVG/struct.html#UseElement">https://www.w3.org/TR/SVG/struct.html#UseElement</a><br \
clear="all"></div><div><div><br>-- <br><div class="gmail_signature">Dmitry \
Kazakov</div> </div></div></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic