diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2010-12-12 08:40:34 +0000 |
| commit | aadfea4113abc6863d7ab03d21b973802c41c503 (patch) | |
| tree | 3f890c0c112433fd850d59558208addf1baa85da /src/lpe-tool-context.cpp | |
| parent | Pot and Dutch translation update (diff) | |
| parent | A simple layout document as to what, why and how is cppification. (diff) | |
| download | inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.tar.gz inkscape-aadfea4113abc6863d7ab03d21b973802c41c503.zip | |
Merge and cleanup of GSoC C++-ification project.
(bzr r9945.1.1)
Diffstat (limited to 'src/lpe-tool-context.cpp')
| -rw-r--r-- | src/lpe-tool-context.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index 8aa350d86..f25949296 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -4,6 +4,7 @@ * Authors: * Maximilian Albert <maximilian.albert@gmail.com> * Lauris Kaplinski <lauris@kaplinski.com> + * Abhishek Sharma * * Copyright (C) 1998 The Free Software Foundation * Copyright (C) 1999-2005 authors @@ -392,8 +393,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); @@ -472,7 +473,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<Geom::D2<Geom::SBasis> > pwd2 = paths_to_pw(curve->get_pathvector()); canvas_text = (SPCanvasText *) sp_canvastext_new(tmpgrp, lc->desktop, Geom::Point(0,0), ""); if (!show) @@ -514,7 +515,7 @@ lpetool_update_measuring_items(SPLPEToolContext *lc) std::map<SPPath *, SPCanvasItem*>::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<Geom::D2<Geom::SBasis> > pwd2 = Geom::paths_to_pw(curve->get_pathvector()); SPUnitId unitid = static_cast<SPUnitId>(prefs->getInt("/tools/lpetool/unitid", SP_UNIT_PX)); SPUnit unit = sp_unit_get_by_id(unitid); |
