summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/emf-win32-print.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-07-12 15:21:12 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-07-12 15:21:12 +0000
commite93821409140f74f3c27b3f8a42bda8b16dd4dfe (patch)
tree22b89b397781a11e95c256008b6a0bc03315ba02 /src/extension/internal/emf-win32-print.cpp
parentenable writing "H/h" and "V/v" to SVG ! (diff)
downloadinkscape-e93821409140f74f3c27b3f8a42bda8b16dd4dfe.tar.gz
inkscape-e93821409140f74f3c27b3f8a42bda8b16dd4dfe.zip
2geomify print, fill and stroke methods of extensions
(bzr r6274)
Diffstat (limited to 'src/extension/internal/emf-win32-print.cpp')
-rw-r--r--src/extension/internal/emf-win32-print.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp
index 0e231a608..e696df06d 100644
--- a/src/extension/internal/emf-win32-print.cpp
+++ b/src/extension/internal/emf-win32-print.cpp
@@ -43,6 +43,7 @@
#include "libnr/nr-matrix-fns.h"
#include "libnr/nr-path.h"
#include "libnr/nr-pixblock.h"
+#include <libnr/n-art-bpath-2geom.h>
#include "display/canvas-bpath.h"
#include "sp-item.h"
@@ -501,7 +502,7 @@ PrintEmfWin32::release(Inkscape::Extension::Print *mod)
unsigned int
PrintEmfWin32::fill(Inkscape::Extension::Print *mod,
- const_NRBPath const *bpath, NR::Matrix const *transform, SPStyle const *style,
+ Geom::PathVector const &pathv, NR::Matrix const *transform, SPStyle const *style,
NRRect const *pbox, NRRect const *dbox, NRRect const *bbox)
{
if (!hdc) return 0;
@@ -518,7 +519,9 @@ PrintEmfWin32::fill(Inkscape::Extension::Print *mod,
return 0;
}
- fill_path = copy_bpath( bpath->path );
+ NArtBpath * bpath = BPath_from_2GeomPath(pathv);
+ fill_path = copy_bpath( bpath );
+ g_free(bpath);
fill_transform = tf;
fill_pbox = *pbox;
@@ -530,14 +533,16 @@ PrintEmfWin32::fill(Inkscape::Extension::Print *mod,
unsigned int
PrintEmfWin32::stroke (Inkscape::Extension::Print *mod,
- const const_NRBPath *bpath, const NR::Matrix *transform, const SPStyle *style,
+ Geom::PathVector const &pathv, const NR::Matrix *transform, const SPStyle *style,
const NRRect *pbox, const NRRect *dbox, const NRRect *bbox)
{
if (!hdc) return 0;
NR::Matrix tf = m_tr_stack.top();
- stroke_and_fill = ( cmp_bpath( bpath->path, fill_path ) == 0 );
+ NArtBpath * bpath = BPath_from_2GeomPath(pathv);
+
+ stroke_and_fill = ( cmp_bpath( bpath, fill_path ) == 0 );
if (!stroke_and_fill) {
flush_fill(); // flush any pending fills
@@ -550,7 +555,7 @@ PrintEmfWin32::stroke (Inkscape::Extension::Print *mod,
return 0;
}
- print_bpath(bpath->path, &tf, pbox);
+ print_bpath(bpath, &tf, pbox);
if (stroke_and_fill) {
if (!simple_shape)
@@ -563,6 +568,7 @@ PrintEmfWin32::stroke (Inkscape::Extension::Print *mod,
StrokePath( hdc );
}
+ g_free(bpath);
destroy_pen();
return 0;