diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-11-14 19:53:05 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-11-14 19:53:05 +0000 |
| commit | 5cf84535c4932156a7f9ea5630f4b5f467b9930c (patch) | |
| tree | 3e154f75ad67448f793270778ff4a25b019a337a /src/livarot/Path.cpp | |
| parent | Khmer translation updated (diff) | |
| download | inkscape-5cf84535c4932156a7f9ea5630f4b5f467b9930c.tar.gz inkscape-5cf84535c4932156a7f9ea5630f4b5f467b9930c.zip | |
Snap to intersections of line segments
(bzr r4082)
Diffstat (limited to '')
| -rw-r--r-- | src/livarot/Path.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 8ad806349..726b0001c 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -908,6 +908,20 @@ char *Path::svg_dump_path() const return g_strdup (os.str().c_str()); } +// Find out if the segment that corresponds to 'piece' is a straight line +bool Path::IsLineSegment(int piece) +{ + if (piece < 0 || piece >= int(descr_cmd.size())) { + return false; + } + + PathDescr const *theD = descr_cmd[piece]; + int const typ = theD->getType(); + + return (typ == descr_lineto); +} + + /* Local Variables: mode:c++ |
