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/lpe-tool-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lpe-tool-context.cpp') diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index 438258cb3..8eafa1711 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -392,8 +392,8 @@ lpetool_context_switch_mode(SPLPEToolContext *lc, Inkscape::LivePathEffect::Effe void lpetool_get_limiting_bbox_corners(SPDocument *document, Geom::Point &A, Geom::Point &B) { - Geom::Coord w = sp_document_width(document); - Geom::Coord h = sp_document_height(document); + Geom::Coord w = document->getWidth(); + Geom::Coord h = document->getHeight(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); double ulx = prefs->getDouble("/tools/lpetool/bbox_upperleftx", 0); -- 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/lpe-tool-context.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lpe-tool-context.cpp') diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index 8eafa1711..1459cb460 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -472,7 +472,7 @@ lpetool_create_measuring_items(SPLPEToolContext *lc, Inkscape::Selection *select for (GSList const *i = selection->itemList(); i != NULL; i = i->next) { if (SP_IS_PATH(i->data)) { path = SP_PATH(i->data); - curve = sp_shape_get_curve(SP_SHAPE(path)); + curve = SP_SHAPE(path)->getCurve(); Geom::Piecewise > pwd2 = paths_to_pw(curve->get_pathvector()); canvas_text = (SPCanvasText *) sp_canvastext_new(tmpgrp, lc->desktop, Geom::Point(0,0), ""); if (!show) @@ -514,7 +514,7 @@ lpetool_update_measuring_items(SPLPEToolContext *lc) std::map::iterator i; for (i = lc->measuring_items->begin(); i != lc->measuring_items->end(); ++i) { path = i->first; - curve = sp_shape_get_curve(SP_SHAPE(path)); + curve = SP_SHAPE(path)->getCurve(); Geom::Piecewise > pwd2 = Geom::paths_to_pw(curve->get_pathvector()); SPUnitId unitid = static_cast(prefs->getInt("/tools/lpetool/unitid", SP_UNIT_PX)); SPUnit unit = sp_unit_get_by_id(unitid); -- cgit v1.2.3