summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fb3469)
raw | patch | inline | side by side (parent: 6fb3469)
author | Johan Engelen <goejendaagh@zonnet.nl> | |
Sat, 23 Oct 2010 20:40:34 +0000 (22:40 +0200) | ||
committer | Johan Engelen <goejendaagh@zonnet.nl> | |
Sat, 23 Oct 2010 20:40:34 +0000 (22:40 +0200) |
src/sp-ellipse.cpp | patch | blob | history |
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 88fc59f17d12543bcb1fbe8b73d7df16aadd4b7d..dbc5b140799ce709860cbc851105b0a46b199c66 100644 (file)
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
SPGenericEllipse *ellipse = (SPGenericEllipse *) object;
SPStyle const *style = object->style;
Geom::OptRect viewbox = ((SPItemCtx const *) ctx)->vp;
- double const dx = viewbox->width();
- double const dy = viewbox->height();
- double const dr = sqrt(dx*dx + dy*dy)/sqrt(2);
- double const em = style->font_size.computed;
- double const ex = em * 0.5; // fixme: get from pango or libnrtype
- ellipse->cx.update(em, ex, dx);
- ellipse->cy.update(em, ex, dy);
- ellipse->rx.update(em, ex, dr);
- ellipse->ry.update(em, ex, dr);
- sp_shape_set_shape((SPShape *) object);
+ if (viewbox) {
+ double const dx = viewbox->width();
+ double const dy = viewbox->height();
+ double const dr = sqrt(dx*dx + dy*dy)/sqrt(2);
+ double const em = style->font_size.computed;
+ double const ex = em * 0.5; // fixme: get from pango or libnrtype
+ ellipse->cx.update(em, ex, dx);
+ ellipse->cy.update(em, ex, dy);
+ ellipse->rx.update(em, ex, dr);
+ ellipse->ry.update(em, ex, dr);
+ sp_shape_set_shape((SPShape *) object);
+ }
}
if (((SPObjectClass *) ge_parent_class)->update)