diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-04-05 13:37:33 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-04-05 13:37:33 +0000 |
| commit | cfe48de7f071e2e07a1f2f2ace3456f7b410e93b (patch) | |
| tree | 281d760873c84db3a67518ab19e61bb213f1eab7 /src/sp-spiral.cpp | |
| parent | Combined some classes. (diff) | |
| download | inkscape-cfe48de7f071e2e07a1f2f2ace3456f7b410e93b.tar.gz inkscape-cfe48de7f071e2e07a1f2f2ace3456f7b410e93b.zip | |
Merged Shape and subclasses. Cleaned up a bit.
(bzr r11608.1.76)
Diffstat (limited to 'src/sp-spiral.cpp')
| -rw-r--r-- | src/sp-spiral.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index 644f32430..e041e4f7d 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -39,9 +39,7 @@ namespace { bool spiralRegistered = SPFactory::instance().registerObject("spiral", createSpiral); } -SPSpiral::SPSpiral() : SPShape(), CShape(this) { - delete this->cshape; - this->cshape = this; +SPSpiral::SPSpiral() : SPShape() { this->clpeitem = this; this->citem = this; this->cobject = this; @@ -59,7 +57,7 @@ SPSpiral::~SPSpiral() { } void SPSpiral::build(SPDocument * document, Inkscape::XML::Node * repr) { - CShape::build(document, repr); + SPShape::build(document, repr); this->readAttr("sodipodi:cx"); this->readAttr("sodipodi:cy"); @@ -101,7 +99,7 @@ Inkscape::XML::Node* SPSpiral::write(Inkscape::XML::Document *xml_doc, Inkscape: repr->setAttribute("d", d); g_free(d); - CShape::write(xml_doc, repr, flags | SP_SHAPE_WRITE_PATH); + SPShape::write(xml_doc, repr, flags | SP_SHAPE_WRITE_PATH); return repr; } @@ -199,7 +197,7 @@ void SPSpiral::set(unsigned int key, gchar const* value) { break; default: - CShape::set(key, value); + SPShape::set(key, value); break; } } @@ -208,10 +206,10 @@ void SPSpiral::update(SPCtx *ctx, guint flags) { SPSpiral* object = this; if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) { - reinterpret_cast<SPShape *>(object)->setShape(); + reinterpret_cast<SPShape *>(object)->set_shape(); } - CShape::update(ctx, flags); + SPShape::update(ctx, flags); } void SPSpiral::update_patheffect(bool write) { @@ -427,7 +425,7 @@ void SPSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape Inkscape::SnapPreferences local_snapprefs = *snapprefs; local_snapprefs.setTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT, false); - CShape::snappoints(p, &local_snapprefs); + SPShape::snappoints(p, &local_snapprefs); if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT)) { Geom::Affine const i2dt (this->i2dt_affine ()); |
