30 Sep
2013
30 Sep
'13
8:58 p.m.
On 30-9-2013 0:12, Krzysztof KosiĆski wrote:
It looks like the bug is actually in SPRect. It happens because of the following interaction:
SPGroup::update() chains up to SPItem::update(), which in turns calls the SPItem::bbox() virtual method to set the filter bounds. However, SPShape uses this->_curve to compute the bounding box, and SPRect only sets the curve when SPRect::update() is called. Consequently, calling SPItem::bbox on an SPRect before it is updated returns an empty bbox.
To fix this, SPRect should either provide its own implementation of the bbox method that does not use _curve, or (preferably) update the curve in the set() method.
I assume this applies to the other "generated" shapes too? (ellipse, star,...)
Cheers, Johan