summaryrefslogtreecommitdiffstats
path: root/src/helper/geom-pathstroke.h
diff options
context:
space:
mode:
authorAlexander Brock <zaibu@lunar-orbit.de>2016-11-29 16:17:14 +0000
committerAlexander Brock <zaibu@lunar-orbit.de>2016-11-29 16:17:14 +0000
commit30cc2099eec035d794735d1742eb21c3d2401dee (patch)
treef91d66efc36242b0411fa85e49a47dcb46d9674b /src/helper/geom-pathstroke.h
parentFix instability caused by degenerate paths (patch by jabiertxof) (diff)
downloadinkscape-30cc2099eec035d794735d1742eb21c3d2401dee.tar.gz
inkscape-30cc2099eec035d794735d1742eb21c3d2401dee.zip
Make tolerance a parameter on every level
(bzr r15280.1.5)
Diffstat (limited to 'src/helper/geom-pathstroke.h')
-rw-r--r--src/helper/geom-pathstroke.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/helper/geom-pathstroke.h b/src/helper/geom-pathstroke.h
index 6a753a6fd..4e4b8b91e 100644
--- a/src/helper/geom-pathstroke.h
+++ b/src/helper/geom-pathstroke.h
@@ -42,12 +42,19 @@ enum LineCapType {
* @param[in] miter Miter limit. Only used when @a join is one of JOIN_MITER, JOIN_MITER_CLIP, and JOIN_EXTRAPOLATE.
* @param[in] join Line join type used during offset. Member of LineJoinType enum.
* @param[in] cap Line cap type used during stroking. Member of LineCapType enum.
+ * @param[in] tolerance Tolerance, values smaller than 0 lead to automatic tolerance depending on width.
*
* @return Stroked path.
* If the input path is closed, the resultant vector will contain two paths.
* Otherwise, there should be only one in the output.
*/
-Geom::PathVector outline(Geom::Path const& input, double width, double miter, LineJoinType join = JOIN_BEVEL, LineCapType cap = BUTT_FLAT);
+Geom::PathVector outline(
+ Geom::Path const& input,
+ double width,
+ double miter,
+ LineJoinType join = JOIN_BEVEL,
+ LineCapType cap = BUTT_FLAT,
+ double tolerance = -1);
/**
* Offset the input path by @a width.
@@ -57,10 +64,16 @@ Geom::PathVector outline(Geom::Path const& input, double width, double miter, Li
* @param[in] width Amount to offset.
* @param[in] miter Miter limit. Only used when @a join is one of JOIN_MITER, JOIN_MITER_CLIP, and JOIN_EXTRAPOLATE.
* @param[in] join Line join type used during offset. Member of LineJoinType enum.
+ * @param[in] tolerance Tolerance, values smaller than 0 lead to automatic tolerance depending on width.
*
* @return Offsetted output.
*/
-Geom::Path half_outline(Geom::Path const& input, double width, double miter, LineJoinType join = JOIN_BEVEL);
+Geom::Path half_outline(
+ Geom::Path const& input,
+ double width,
+ double miter,
+ LineJoinType join = JOIN_BEVEL,
+ double tolerance = -1);
/**
* Builds a join on the provided path.