From: johanengelen Date: Thu, 26 Jun 2008 15:32:30 +0000 (+0000) Subject: add CairoRenderContext::renderPathVector X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=25479c033c7ed6bc12fc4d1e94f7385b02e9304d;p=inkscape.git add CairoRenderContext::renderPathVector --- 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 #include #include +#include +#include <2geom/pathvector.h> #include @@ -1244,6 +1246,17 @@ CairoRenderContext::_setStrokeStyle(SPStyle const *style, NRRect const *pbox) cairo_set_miter_limit(_cr, MAX(1, style->stroke_miterlimit.value)); } +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) { 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 +#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);