From 44a3a78fb6a3863c0c7f3c1193837337e68a67e4 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 20 Nov 2008 23:24:08 -0600 Subject: Merge from fe-moved (bzr r6891) --- src/gradient-chemistry.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gradient-chemistry.cpp') diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp index 0fa24ccad..4abd7483f 100644 --- a/src/gradient-chemistry.cpp +++ b/src/gradient-chemistry.cpp @@ -285,9 +285,9 @@ sp_gradient_reset_to_userspace (SPGradient *gr, SPItem *item) // calculate the bbox of the item sp_document_ensure_up_to_date(SP_OBJECT_DOCUMENT(item)); - boost::optional bbox = item->getBounds(Geom::identity()); // we need "true" bbox without item_i2d_affine + Geom::OptRect bbox = item->getBounds(Geom::identity()); // we need "true" bbox without item_i2d_affine - if ( !bbox || bbox->isEmpty() ) + if (!bbox) return gr; Geom::Coord const width = bbox->dimensions()[Geom::X]; @@ -346,8 +346,8 @@ sp_gradient_convert_to_userspace(SPGradient *gr, SPItem *item, gchar const *prop // calculate the bbox of the item sp_document_ensure_up_to_date(SP_OBJECT_DOCUMENT(item)); Geom::Matrix bbox2user; - boost::optional bbox = item->getBounds(Geom::identity()); // we need "true" bbox without item_i2d_affine - if ( bbox && !bbox->isEmpty() ) { + Geom::OptRect bbox = item->getBounds(Geom::identity()); // we need "true" bbox without item_i2d_affine + if ( bbox ) { bbox2user = Geom::Matrix(bbox->dimensions()[Geom::X], 0, 0, bbox->dimensions()[Geom::Y], bbox->min()[Geom::X], bbox->min()[Geom::Y]); @@ -1098,7 +1098,7 @@ sp_item_gradient_get_coords (SPItem *item, guint point_type, guint point_i, bool if (SP_GRADIENT(gradient)->units == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX) { sp_document_ensure_up_to_date(SP_OBJECT_DOCUMENT(item)); - boost::optional bbox = item->getBounds(Geom::identity()); // we need "true" bbox without item_i2d_affine + Geom::OptRect bbox = item->getBounds(Geom::identity()); // we need "true" bbox without item_i2d_affine if (bbox) { p *= Geom::Matrix(bbox->dimensions()[Geom::X], 0, 0, bbox->dimensions()[Geom::Y], -- cgit v1.2.3