From 6f4d9c183cab7dfa0a7ce86c905e1702c5dd0842 Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Sat, 31 May 2008 17:33:48 +0000 Subject: [PATCH] Fix an error and remove some useless code (thanks to Peter Moulder for pointing me at this) --- src/sp-item.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/sp-item.cpp b/src/sp-item.cpp index be6be4f63..566ff8cb8 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -804,16 +804,12 @@ sp_item_invoke_bbox_full(SPItem const *item, NR::Maybe *bbox, NR::Matr } if (temp_bbox.x0 > temp_bbox.x1 || temp_bbox.y0 > temp_bbox.y1) { - // We'll assume here that when x0 > x1 or y0 > y1, the bbox is "nothing" - // However it has never been explicitely defined this way for NRRects - // (as opposed to NR::Maybe) - *bbox = NR::Nothing(); - return; - } - - if (temp_bbox.x0 == temp_bbox.y0 == NR_HUGE && temp_bbox.x1 == temp_bbox.y1 == -NR_HUGE) { - // The bbox hasn't been touched by the SPItemClass' bbox method + // Either the bbox hasn't been touched by the SPItemClass' bbox method + // (it still has its initial values, see above: x0 = y0 = NR_HUGE and x1 = y1 = -NR_HUGE) // or it has explicitely been set to be like this (e.g. in sp_shape_bbox) + + // When x0 > x1 or y0 > y1, the bbox is considered to be "nothing", although it has not been + // explicitely defined this way for NRRects (as opposed to NR::Maybe) *bbox = NR::Nothing(); return; } -- 2.30.2