diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-26 15:32:30 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-26 15:32:30 +0000 |
| commit | 7cc98c191a5362926daae7b31e36f8ae709d9b60 (patch) | |
| tree | ee62ba5adff150bb9dbcfe60f96f07a5787b4371 /src/extension | |
| parent | don't use splivarot to get livarot path, just use LoadPathVector method (diff) | |
| download | inkscape-7cc98c191a5362926daae7b31e36f8ae709d9b60.tar.gz inkscape-7cc98c191a5362926daae7b31e36f8ae709d9b60.zip | |
add CairoRenderContext::renderPathVector
(bzr r6074)
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/internal/cairo-render-context.cpp | 13 | ||||
| -rw-r--r-- | src/extension/internal/cairo-render-context.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 3ec94af63..b19e4b316 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -34,6 +34,8 @@ #include <libnr/nr-matrix-scale-ops.h> #include <libnr/nr-matrix-translate-ops.h> #include <libnr/nr-scale-matrix-ops.h> +#include <libnr/n-art-bpath-2geom.h> +#include <2geom/pathvector.h> #include <glib/gmem.h> @@ -1245,6 +1247,17 @@ CairoRenderContext::_setStrokeStyle(SPStyle const *style, NRRect const *pbox) } bool +CairoRenderContext::renderPathVector(Geom::PathVector const & pathv, SPStyle const *style, NRRect const *pbox) +{ + NArtBpath * bpath = BPath_from_2GeomPath (pathv); + const_NRBPath *bp; + bp->path = bpath; + bool retvalue = renderPath(bp, style, pbox); + g_free(bpath); + return retvalue; +} + +bool CairoRenderContext::renderPath(const_NRBPath const *bpath, SPStyle const *style, NRRect const *pbox) { g_assert( _is_valid ); diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h index 642c6d90e..68a615234 100644 --- a/src/extension/internal/cairo-render-context.h +++ b/src/extension/internal/cairo-render-context.h @@ -23,6 +23,7 @@ #include "libnr/nr-path.h" #include <libnr/nr-matrix-ops.h> +#include <2geom/forward.h> #include "style.h" @@ -136,6 +137,7 @@ public: void addClippingRect(double x, double y, double width, double height); /* Rendering methods */ + bool renderPathVector(Geom::PathVector const & pathv, SPStyle const *style, NRRect const *pbox); bool renderPath(const_NRBPath const *bpath, SPStyle const *style, NRRect const *pbox); bool renderImage(unsigned char *px, unsigned int w, unsigned int h, unsigned int rs, NR::Matrix const *image_transform, SPStyle const *style); |
