From 8867de5daf309e4cdd3fce177b408618490be4f3 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Tue, 29 Jun 2010 23:35:42 +0530 Subject: This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options]. (bzr r9546.1.1) --- src/spiral-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/spiral-context.cpp') diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 7ce9d4710..2eb8daf89 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -420,7 +420,7 @@ sp_spiral_drag(SPSpiralContext *sc, Geom::Point p, guint state) sc->item = (SPItem *) desktop->currentLayer()->appendChildRepr(repr); Inkscape::GC::release(repr); - sc->item->transform = sp_item_i2doc_affine(SP_ITEM(desktop->currentLayer())).inverse(); + sc->item->transform = SP_ITEM(desktop->currentLayer())->i2doc_affine().inverse(); sc->item->updateRepr(); sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5); -- cgit v1.2.3 From d25a9a072143eafa4a9823b84e977c4b85d45efe Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Fri, 2 Jul 2010 18:05:42 +0530 Subject: New Class SPDocumentUndo created which takes care of c++fying some non SPDocument based methods (bzr r9546.1.3) --- src/spiral-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/spiral-context.cpp') diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 2eb8daf89..3d1cd4b21 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -480,7 +480,7 @@ sp_spiral_finish(SPSpiralContext *sc) sp_canvas_end_forced_full_redraws(desktop->canvas); sp_desktop_selection(desktop)->set(sc->item); - sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL, + SPDocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL, _("Create spiral")); sc->item = NULL; @@ -506,7 +506,7 @@ static void sp_spiral_cancel(SPSpiralContext *sc) sp_canvas_end_forced_full_redraws(desktop->canvas); - sp_document_cancel(sp_desktop_document(desktop)); + SPDocumentUndo::cancel(sp_desktop_document(desktop)); } /* -- cgit v1.2.3 From cde0571b44ec5b108907bda85971c49f3ceb1de8 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Wed, 14 Jul 2010 23:40:35 +0530 Subject: SPShape c++ified to the extent it was possible and more changes done for XML privatisation. Major changes yet to come. (bzr r9546.1.7) --- src/spiral-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/spiral-context.cpp') diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 3d1cd4b21..13407b80b 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -474,7 +474,7 @@ sp_spiral_finish(SPSpiralContext *sc) SPDesktop *desktop = SP_EVENT_CONTEXT(sc)->desktop; - sp_shape_set_shape(SP_SHAPE(spiral)); + SP_SHAPE(spiral)->setShape(); SP_OBJECT(spiral)->updateRepr(SP_OBJECT_WRITE_EXT); sp_canvas_end_forced_full_redraws(desktop->canvas); -- cgit v1.2.3