Code

use LoadPathVector instead of LoadArtBPath everywhere
authorjohanengelen <johanengelen@users.sourceforge.net>
Sun, 22 Jun 2008 22:03:10 +0000 (22:03 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sun, 22 Jun 2008 22:03:10 +0000 (22:03 +0000)
src/display/canvas-bpath.cpp
src/display/nr-arena-shape.cpp
src/sp-flowregion.cpp
src/sp-use-reference.cpp

index 3c46a9049d6c4fbf824c607fdd1cb240847c17bc..76ef54e76749cb2f87edcd0602afc8967282e41b 100644 (file)
@@ -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;
index b4a6c82e5b8b4d37e7f21cb28aeeea153cacf7fc..b87c93a0c8a43b7eb3a3fff5ffd22822810558be 100644 (file)
@@ -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
index 61fcdd08c0bd2b5fda91a6d9a6d5f75482c31388..cbfb5119504b583990a57c68af863b4a94f28512 100644 (file)
@@ -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);
index a1cb045e59f33a5adff6962380ec78fe19553a12..5b5011381a41fd18758d3bd9a6e3bdd30a41589c 100644 (file)
@@ -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();
 }