diff options
| author | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-07-17 07:18:31 +0000 |
|---|---|---|
| committer | Abhishek Sharma Public <spyzerdotabhishek0at-signgmaildotcom> | 2010-07-17 07:18:31 +0000 |
| commit | 150ac8ed3274e060e3349b5c0901ec8c7c7e3d4e (patch) | |
| tree | e05bd4506842f0e70e80e4327bd438d715d8dd70 /src/box3d.cpp | |
| parent | SPShape c++ified to the extent it was possible and more changes done for XML ... (diff) | |
| download | inkscape-150ac8ed3274e060e3349b5c0901ec8c7c7e3d4e.tar.gz inkscape-150ac8ed3274e060e3349b5c0901ec8c7c7e3d4e.zip | |
More in XML privatisation with new create3DBox function and other supplements to efficiently hide information.
(bzr r9546.1.8)
Diffstat (limited to 'src/box3d.cpp')
| -rw-r--r-- | src/box3d.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp index 1facf2c0c..250c1f500 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -511,6 +511,18 @@ box3d_snap (SPBox3D *box, int id, Proj::Pt3 const &pt_proj, Proj::Pt3 const &sta return box3d_get_perspective(box)->perspective_impl->tmat.preimage (result, z_coord, Proj::Z); } +/*create a SPBox3D and append it to the parent*/ + +SPBox3D * SPBox3D::createBox3D(SPItem * parent) +{ + SPBox3D *box3d = 0; + Inkscape::XML::Document *xml_doc = parent->document->rdoc; + Inkscape::XML::Node *repr = xml_doc->createElement("svg:g"); + repr->setAttribute("sodipodi:type", "inkscape:box3d"); + box3d = (SPBox3D *)parent->appendChildRepr(repr); + return box3d; +} + void box3d_set_corner (SPBox3D *box, const guint id, Geom::Point const &new_pos, const Box3D::Axis movement, bool constrained) { g_return_if_fail ((movement != Box3D::NONE) && (movement != Box3D::XYZ)); |
