summaryrefslogtreecommitdiffstats
path: root/src/livarot/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/livarot/Path.cpp')
-rw-r--r--src/livarot/Path.cpp14
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++