---------- Forwarded message ----------
From: Arshdeep Singh <moduli16@...2179......>
Date: Mon, Dec 24, 2012 at 3:02 PM
Subject: Re: [Inkscape-devel] Color of an object.
To: John Smith <john.smith7545@...36...>


Thanks John.
The XML Subsystem link directs to a blank page. So no use there. The link you provide gives one only definitions. 
I want a list of all objects currently selected. Then I want to extract their style values. 


On Sat, Dec 22, 2012 at 10:36 AM, John Smith <john.smith7545@...36...> wrote:

Take a look at link [1], there are 2 representations - an XML representation, and a GObject based representation.
"Each document has an object tree and an XML tree. Changes in the XML tree are automatically propagated to the object tree via observers"

Whilst running Inkscape you can track the XML tree representation from Edit->XML Editor.
Select a rectangle and you should see a "svg:rect" node selected in the XML Editor.
From there you should see all the rect's attributes including a style attribute (such as fill:#803300;stroke:#aa8800) for the colors.

For source code take a look at class SPObject (src/sp-object.h), and classes derived from SPObject like SPRect (src/sp-rect.h)
"SPObject is an abstract base class of all of the document nodes at the SVG document level. Each SPObject subclass implements a certain SVG element node type..... "






--
Arshdeep Singh
Third Year, Computer Engineering
Delhi Technological University
Ph: +91-9654115614



--
Arshdeep Singh
Third Year, Computer Engineering
Delhi Technological University
Ph: +91-9654115614