summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8eb8a53)
raw | patch | inline | side by side (parent: 8eb8a53)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 4 Jul 2008 23:07:47 +0000 (23:07 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 4 Jul 2008 23:07:47 +0000 (23:07 +0000) |
src/sp-shape.cpp | patch | blob | history |
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index c01f8535dd08b04d974d58e908ce98713fbfe392..54f674f6bb05ab9650e6cff78bac4b27b2494b82 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
int
sp_shape_number_of_markers (SPShape *shape, int type)
{
- int n = 0;
- for (NArtBpath const* bp = SP_CURVE_BPATH(shape->curve); bp->code != NR_END; bp++) {
- if (sp_shape_marker_required (shape, type, bp)) {
+ Geom::PathVector const & pathv = shape->curve->get_pathvector();
+
+ guint n = shape->marker[SP_MARKER_LOC_START] ? pathv.size() : 0;
+
+ for(Geom::PathVector::const_iterator path_it = pathv.begin(); path_it != pathv.end(); ++path_it) {
+ n += shape->marker[SP_MARKER_LOC_MID] ? path_it->size() : 0;
+
+ if ( shape->marker[SP_MARKER_LOC_END] && !path_it->empty()) {
n++;
}
}