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/display/nr-filter-image.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/display') diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp index 4ad6982f3..215fc4d02 100644 --- a/src/display/nr-filter-image.cpp +++ b/src/display/nr-filter-image.cpp @@ -51,8 +51,8 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) { // prep the document sp_document_ensure_up_to_date(document); NRArena* arena = NRArena::create(); - unsigned const key = sp_item_display_key_new(1); - NRArenaItem* ai = sp_item_invoke_show(SVGElem, arena, key, SP_ITEM_SHOW_DISPLAY); + unsigned const key = SPItem::display_key_new(1); + NRArenaItem* ai = SVGElem->invoke_show(arena, key, SP_ITEM_SHOW_DISPLAY); if (!ai) { g_warning("feImage renderer: error creating NRArenaItem for SVG Element"); nr_object_unref((NRObject *) arena); @@ -100,7 +100,7 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) { { g_warning("FilterImage::render: not enough memory to create pixel buffer. Need %ld.", 4L * width * height); } - sp_item_invoke_hide(SVGElem, key); + SVGElem->invoke_hide(key); nr_object_unref((NRObject *) arena); } -- cgit v1.2.3 From 121815791be2d24cb745663520b111ee914fbc09 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Thu, 1 Jul 2010 15:36:56 +0530 Subject: C++fied SPDocument added (bzr r9546.1.2) --- src/display/nr-filter-image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/display') diff --git a/src/display/nr-filter-image.cpp b/src/display/nr-filter-image.cpp index 215fc4d02..73082f4c0 100644 --- a/src/display/nr-filter-image.cpp +++ b/src/display/nr-filter-image.cpp @@ -49,7 +49,7 @@ int FilterImage::render(FilterSlot &slot, FilterUnits const &units) { if (!SVGElem) return 0; // prep the document - sp_document_ensure_up_to_date(document); + document->ensure_up_to_date(); NRArena* arena = NRArena::create(); unsigned const key = SPItem::display_key_new(1); NRArenaItem* ai = SVGElem->invoke_show(arena, key, SP_ITEM_SHOW_DISPLAY); -- 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/display/canvas-grid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/display') diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index a79a6b610..7a21c19b8 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -255,7 +255,7 @@ CanvasGrid::writeNewGridToRepr(Inkscape::XML::Node * repr, SPDocument * doc, Gri repr->appendChild(newnode); Inkscape::GC::release(newnode); - sp_document_done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); + SPDocumentUndo::done(doc, SP_VERB_DIALOG_NAMEDVIEW, _("Create new grid")); } /* -- cgit v1.2.3