summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/cairo-render-context.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-12 15:13:08 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-12 15:13:08 +0000
commit309112136c71cbb4f62fb850c6f6f12e32a67a8e (patch)
tree58e867ed84ddbc721113b948d4b6365cef02338a /src/extension/internal/cairo-render-context.cpp
parentReverted swatches (diff)
parentChange stroke-dasharray and stroke-dashoffset handling to match other propert... (diff)
downloadinkscape-309112136c71cbb4f62fb850c6f6f12e32a67a8e.tar.gz
inkscape-309112136c71cbb4f62fb850c6f6f12e32a67a8e.zip
Updated to trunk
(bzr r13090.1.24)
Diffstat (limited to 'src/extension/internal/cairo-render-context.cpp')
-rw-r--r--src/extension/internal/cairo-render-context.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp
index 2916d9fa9..4ec6ae1c8 100644
--- a/src/extension/internal/cairo-render-context.cpp
+++ b/src/extension/internal/cairo-render-context.cpp
@@ -1297,10 +1297,14 @@ CairoRenderContext::_setStrokeStyle(SPStyle const *style, Geom::OptRect const &p
}
}
- if (style->stroke_dash.n_dash &&
- style->stroke_dash.dash )
+ if (!style->stroke_dasharray.values.empty())
{
- cairo_set_dash(_cr, style->stroke_dash.dash, style->stroke_dash.n_dash, style->stroke_dash.offset);
+ size_t ndashes = style->stroke_dasharray.values.size();
+ double* dashes =(double*)malloc(ndashes*sizeof(double));
+ for( unsigned i = 0; i < ndashes; ++i ) {
+ dashes[i] = style->stroke_dasharray.values[i];
+ }
+ cairo_set_dash(_cr, dashes, ndashes, style->stroke_dashoffset.value);
} else {
cairo_set_dash(_cr, NULL, 0, 0.0); // disable dashing
}