summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d07caeb)
raw | patch | inline | side by side (parent: d07caeb)
author | Johan Engelen <goejendaagh@zonnet.nl> | |
Sat, 23 Oct 2010 20:24:27 +0000 (22:24 +0200) | ||
committer | Johan Engelen <goejendaagh@zonnet.nl> | |
Sat, 23 Oct 2010 20:24:27 +0000 (22:24 +0200) |
src/extension/internal/cairo-renderer.cpp | patch | blob | history | |
src/sp-shape.cpp | patch | blob | history | |
src/splivarot.cpp | patch | blob | history |
index ebdb82a69c6cf02ff5c59f8c1349f090de30cb1b..d429cbee3cd69a49f2fc263ec829e4dc171798c7 100644 (file)
SPStyle* style = SP_OBJECT_STYLE (item);
Geom::PathVector const & pathv = shape->curve->get_pathvector();
+ if (pathv.empty()) return;
ctx->renderPathVector(pathv, style, &pbox);
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index b64ad45e0773f5fafbfda24c5bf2b5efcc1304e7..4d765af9939e2a1df199cc45836736e56b426754 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
// position arguments to sp_marker_show_instance, basically counts the amount of markers.
int counter[4] = {0};
+ if (!shape->curve) return;
Geom::PathVector const & pathv = shape->curve->get_pathvector();
+ if (pathv.empty()) return;
// the first vertex should get a start marker, the last an end marker, and all the others a mid marker
// see bug 456148
@@ -585,7 +587,7 @@ static void sp_shape_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &
}
// Union with bboxes of the markers, if any
- if (sp_shape_has_markers (shape)) {
+ if (sp_shape_has_markers (shape) && !shape->curve->get_pathvector().empty()) {
/** \todo make code prettier! */
Geom::PathVector const & pathv = shape->curve->get_pathvector();
// START marker
if (!shape->curve) return;
+ Geom::PathVector const & pathv = shape->curve->get_pathvector();
+ if (pathv.empty()) return;
+
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gint add_comments = prefs->getBool("/printing/debug/add-label-comments");
if (add_comments) {
SPStyle* style = SP_OBJECT_STYLE (item);
if (!style->fill.isNone()) {
- sp_print_fill (ctx, shape->curve->get_pathvector(), &i2d, style, &pbox, &dbox, &bbox);
+ sp_print_fill (ctx, pathv, &i2d, style, &pbox, &dbox, &bbox);
}
if (!style->stroke.isNone()) {
- sp_print_stroke (ctx, shape->curve->get_pathvector(), &i2d, style, &pbox, &dbox, &bbox);
+ sp_print_stroke (ctx, pathv, &i2d, style, &pbox, &dbox, &bbox);
}
/** \todo make code prettier */
- Geom::PathVector const & pathv = shape->curve->get_pathvector();
// START marker
for (int i = 0; i < 2; i++) { // SP_MARKER_LOC and SP_MARKER_LOC_START
if ( shape->marker[i] ) {
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 2b7da7f8a881e7ce4170b676ce2c5c76e9c3bf74..e273ca82f196d1e5f4831317fc15425e84cfe5d6 100644 (file)
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
return ret_pathv;
}
+ if (curve->get_pathvector().empty()) {
+ return ret_pathv;
+ }
+
// remember old stroke style, to be set on fill
SPStyle *i_style = SP_OBJECT_STYLE(item);
continue;
}
+ if (curve->get_pathvector().empty()) {
+ continue;
+ }
+
// pas de stroke pas de chocolat
if (!SP_OBJECT_STYLE(item) || SP_OBJECT_STYLE(item)->stroke.noneSet) {
curve->unref();