diff options
| author | Alexander Brock <zaibu@lunar-orbit.de> | 2016-11-29 16:17:14 +0000 |
|---|---|---|
| committer | Alexander Brock <zaibu@lunar-orbit.de> | 2016-11-29 16:17:14 +0000 |
| commit | 30cc2099eec035d794735d1742eb21c3d2401dee (patch) | |
| tree | f91d66efc36242b0411fa85e49a47dcb46d9674b /src/helper/geom-pathstroke.h | |
| parent | Fix instability caused by degenerate paths (patch by jabiertxof) (diff) | |
| download | inkscape-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.h | 17 |
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. |
