From 150ac8ed3274e060e3349b5c0901ec8c7c7e3d4e Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Sat, 17 Jul 2010 12:48:31 +0530 Subject: More in XML privatisation with new create3DBox function and other supplements to efficiently hide information. (bzr r9546.1.8) --- src/box3d-side.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/box3d-side.cpp') diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp index 9059e9705..d6f1f6b42 100644 --- a/src/box3d-side.cpp +++ b/src/box3d-side.cpp @@ -185,6 +185,18 @@ box3d_side_update (SPObject *object, SPCtx *ctx, guint flags) if (((SPObjectClass *) parent_class)->update) ((SPObjectClass *) parent_class)->update (object, ctx, flags); } + +/* Create a new Box3DSide and append it to the parent box */ +Box3DSide * Box3DSide::createBox3DSide(SPBox3D *box) +{ + Box3DSide *box3d_side = 0; + Inkscape::XML::Document *xml_doc = box->document->rdoc; + Inkscape::XML::Node *repr_side = xml_doc->createElement("svg:path"); + repr_side->setAttribute("sodipodi:type", "inkscape:box3dside"); + box3d_side = (Box3DSide *)box->appendChildRepr(repr_side); + return box3d_side; +} + /* * Function which return the type attribute for Box3D. * Acts as a replacement for directly accessing the XML Tree directly. -- cgit v1.2.3