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-ellipse.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-ellipse.cpp')
| -rw-r--r-- | src/sp-ellipse.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index ff2e39044..769fa54fd 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -28,6 +28,7 @@ #include "display/curve.h" #include <glibmm/i18n.h> #include <2geom/transforms.h> +#include <2geom/pathvector.h> #include "document.h" #include "sp-ellipse.h" @@ -184,6 +185,18 @@ sp_genericellipse_update_patheffect(SPLPEItem *lpeitem, bool write) /* Can't we use arcto in this method? */ static void sp_genericellipse_set_shape(SPShape *shape) { + if (sp_lpe_item_has_broken_path_effect(SP_LPE_ITEM(shape))) { + g_warning ("The ellipse shape has unknown LPE on it! Convert to path to make it editable preserving the appearance; editing it as ellipse will remove the bad LPE"); + if (SP_OBJECT_REPR(shape)->attribute("d")) { + // unconditionally read the curve from d, if any, to preserve appearance + Geom::PathVector pv = sp_svg_read_pathv(SP_OBJECT_REPR(shape)->attribute("d")); + SPCurve *cold = new SPCurve(pv); + sp_shape_set_curve_insync (shape, cold, TRUE); + cold->unref(); + } + return; + } + double rx, ry, s, e; double x0, y0, x1, y1, x2, y2, x3, y3; double len; |
