diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-08-22 21:49:32 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-08-22 21:49:32 +0000 |
| commit | 6c059afd9ecdd6fc153e8e9ce0a9e5817fa3086c (patch) | |
| tree | 95b3520ec96e0f8ad5f695f4d70ca483848ab9e2 /src/sp-lpe-item.cpp | |
| parent | fix 272408 and address fixmes: fix inheriting of dasharray and dashoffset, ma... (diff) | |
| download | inkscape-6c059afd9ecdd6fc153e8e9ce0a9e5817fa3086c.tar.gz inkscape-6c059afd9ecdd6fc153e8e9ce0a9e5817fa3086c.zip | |
fix rendering of testcase errorhandling-nosuchlpe.svg: make sure shapes do not calculate the curve if they have a broken lpe, instead reading it directly from d= and issuing a warning
(bzr r8520)
Diffstat (limited to 'src/sp-lpe-item.cpp')
| -rw-r--r-- | src/sp-lpe-item.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index 90e9b2d6d..a27344ebc 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -598,6 +598,24 @@ void sp_lpe_item_up_current_path_effect(SPLPEItem *lpeitem) sp_lpe_item_cleanup_original_path_recursive(lpeitem); } +/** used for shapes so they can see if they should also disable shape calculation and read from d= */ +bool sp_lpe_item_has_broken_path_effect(SPLPEItem *lpeitem) +{ + if (lpeitem->path_effect_list->empty()) + return false; + + // go through the list; if some are unknown or invalid, return true + PathEffectList effect_list = sp_lpe_item_get_effect_list(lpeitem); + for (PathEffectList::iterator it = effect_list.begin(); it != effect_list.end(); it++) + { + LivePathEffectObject *lpeobj = (*it)->lpeobject; + if (!lpeobj || !lpeobj->get_lpe()) + return true; + } + + return false; +} + bool sp_lpe_item_has_path_effect(SPLPEItem *lpeitem) { |
