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/star-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/star-context.cpp') diff --git a/src/star-context.cpp b/src/star-context.cpp index 63a15545f..69d711722 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -432,7 +432,7 @@ static void sp_star_drag(SPStarContext *sc, Geom::Point p, guint state) sc->item = SP_ITEM(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/star-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/star-context.cpp') diff --git a/src/star-context.cpp b/src/star-context.cpp index 69d711722..2761c573a 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -499,7 +499,7 @@ sp_star_finish (SPStarContext * 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_STAR, + SPDocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR, _("Create star")); sc->item = NULL; @@ -525,7 +525,7 @@ static void sp_star_cancel(SPStarContext *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/star-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/star-context.cpp') diff --git a/src/star-context.cpp b/src/star-context.cpp index 2761c573a..61646ceee 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -492,7 +492,7 @@ sp_star_finish (SPStarContext * sc) SPDesktop *desktop = SP_EVENT_CONTEXT(sc)->desktop; SPObject *object = SP_OBJECT(sc->item); - sp_shape_set_shape(SP_SHAPE(sc->item)); + (SP_SHAPE(sc->item))->setShape(); object->updateRepr(SP_OBJECT_WRITE_EXT); -- cgit v1.2.3