summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-06-22 22:03:10 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-06-22 22:03:10 +0000
commitc636971bde8a8d9676b58cc870bbbdfd527be36c (patch)
tree3fff62f3147650e2f533d13b9fbf616ed364589d
parentcreate method for Livarot paths to load PathVectors instead of NArtBpaths (diff)
downloadinkscape-c636971bde8a8d9676b58cc870bbbdfd527be36c.tar.gz
inkscape-c636971bde8a8d9676b58cc870bbbdfd527be36c.zip
use LoadPathVector instead of LoadArtBPath everywhere
(bzr r6017)
-rw-r--r--src/display/canvas-bpath.cpp3
-rw-r--r--src/display/nr-arena-shape.cpp8
-rw-r--r--src/sp-flowregion.cpp6
-rw-r--r--src/sp-use-reference.cpp2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp
index 3c46a9049..76ef54e76 100644
--- a/src/display/canvas-bpath.cpp
+++ b/src/display/canvas-bpath.cpp
@@ -24,6 +24,7 @@
#include <livarot/int-line.h>
#include <livarot/BitLigne.h>
#include <libnr/nr-pixops.h>
+#include <libnr/nr-convert2geom.h>
void nr_pixblock_render_bpath_rgba (Shape* theS,uint32_t color,NRRectL &area,char* destBuf,int stride);
@@ -140,7 +141,7 @@ sp_canvas_bpath_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i
if ((cbp->fill_rgba & 0xff) || (cbp->stroke_rgba & 0xff)) {
Path* thePath=new Path;
- thePath->LoadArtBPath(SP_CURVE_BPATH(cbp->curve), affine, true);
+ thePath->LoadPathVector(cbp->curve->get_pathvector(), to_2geom(affine), true);
thePath->Convert(0.25);
if ((cbp->fill_rgba & 0xff) && (cbp->curve->get_length() > 2)) {
Shape* theShape=new Shape;
diff --git a/src/display/nr-arena-shape.cpp b/src/display/nr-arena-shape.cpp
index b4a6c82e5..b87c93a0c 100644
--- a/src/display/nr-arena-shape.cpp
+++ b/src/display/nr-arena-shape.cpp
@@ -443,8 +443,8 @@ nr_arena_shape_update_fill(NRArenaShape *shape, NRGC *gc, NRRectL *area, bool fo
Path* thePath=new Path;
Shape* theShape=new Shape;
{
- NR::Matrix tempMat(gc->transform);
- thePath->LoadArtBPath(SP_CURVE_BPATH(shape->curve),tempMat,true);
+ Geom::Matrix tempMat(to_2geom(gc->transform));
+ thePath->LoadPathVector(shape->curve->get_pathvector(), tempMat, true);
}
if (is_inner_area(*area, NR_ARENA_ITEM(shape)->bbox)) {
@@ -558,8 +558,8 @@ nr_arena_shape_update_stroke(NRArenaShape *shape,NRGC* gc, NRRectL *area)
Path* thePath = new Path;
Shape* theShape = new Shape;
{
- NR::Matrix tempMat(gc->transform);
- thePath->LoadArtBPath(SP_CURVE_BPATH(shape->curve), tempMat, true);
+ Geom::Matrix tempMat( to_2geom(gc->transform) );
+ thePath->LoadPathVector(shape->curve->get_pathvector(), tempMat, true);
}
// add some padding to the rendering area, so clipped path does not go into a render area
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index 61fcdd08c..cbfb51195 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -524,9 +524,9 @@ static void GetDest(SPObject* child,Shape **computed,NR::Matrix itr_mat)
if ( curve ) {
Path* temp=new Path;
- NR::Matrix tr_mat = from_2geom(sp_item_i2root_affine (SP_ITEM(u_child)));
- tr_mat=itr_mat*tr_mat;
- temp->LoadArtBPath(SP_CURVE_BPATH(curve),tr_mat,true);
+ Geom::Matrix tr_mat = sp_item_i2root_affine (SP_ITEM(u_child));
+ tr_mat = to_2geom(itr_mat) * tr_mat;
+ temp->LoadPathVector(curve->get_pathvector(), tr_mat, true);
Shape* n_shp=new Shape;
temp->Convert(0.25);
temp->Fill(n_shp,0);
diff --git a/src/sp-use-reference.cpp b/src/sp-use-reference.cpp
index a1cb045e5..5b5011381 100644
--- a/src/sp-use-reference.cpp
+++ b/src/sp-use-reference.cpp
@@ -231,7 +231,7 @@ void SPUsePath::refresh_source()
}
}
originalPath = new Path;
- originalPath->LoadArtBPath(SP_CURVE_BPATH(curve), NR::Matrix(item->transform), true);
+ originalPath->LoadPathVector(curve->get_pathvector(), to_2geom(item->transform), true);
curve->unref();
}