summaryrefslogtreecommitdiffstats
path: root/src/lpe-tool-context.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-12-15 16:19:28 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-12-15 16:19:28 +0000
commit70201e92aa1e700d49279871f2b84082750b8ed8 (patch)
tree1886fcdf8ad20d73b92bf4f4bfd3ab1406ba4c66 /src/lpe-tool-context.cpp
parentFix mask luminance calculation, so the coeffs add up to 1 (diff)
parentWin32 post-GSoC fixups. (diff)
downloadinkscape-70201e92aa1e700d49279871f2b84082750b8ed8.tar.gz
inkscape-70201e92aa1e700d49279871f2b84082750b8ed8.zip
Merge from trunk (again)
(bzr r9508.1.72)
Diffstat (limited to 'src/lpe-tool-context.cpp')
-rw-r--r--src/lpe-tool-context.cpp9
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);