diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-11-25 20:51:17 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-11-25 20:51:17 +0000 |
| commit | 0bd9f7e209d522dbcebe0449a91397fdd9e38977 (patch) | |
| tree | 834c7d02456658b57625ab68cc28f7854a5a85dc /src/sp-ellipse.cpp | |
| parent | Fix handling of x and y attributes of patterns (diff) | |
| parent | Fix ruler redraw issue on GTK 2.22 (diff) | |
| download | inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.tar.gz inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.zip | |
Merge from trunk
(bzr r9508.1.70)
Diffstat (limited to 'src/sp-ellipse.cpp')
| -rw-r--r-- | src/sp-ellipse.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 100be187a..964ab48b1 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -142,16 +142,18 @@ sp_genericellipse_update(SPObject *object, SPCtx *ctx, guint flags) 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) @@ -921,4 +923,4 @@ Geom::Point sp_arc_get_xy(SPArc *arc, gdouble arg) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |
