Hi all,
I just committed an improved bbox calculation when SPItem::RENDERING_BBOX precision is requested. Now it correctly includes stroke endcaps.
This fixes an important bug: when creating a pattern from selected objects, the bbox calculation was not accurate enough for paths with butt caps. This meant it was not easy to make a pattern of a plus to create a hatch fill pattern. (the plusses would not connect with each other) Now this works as easy as it should.
I have also increased the precision of the bbox calculation for fitting the canvas to the selection and for turning the selection into a marker.
Note that the improved RENDERING_BBOX calculation takes more time than before (in fact, RENDERING_BBOX used to be the same as APPROXIMATE_BBOX).
Ciao, Johan
On 10/4/10 17:25, J.B.C.Engelen@...1578... wrote:
Hi all,
I just committed an improved bbox calculation when SPItem::RENDERING_BBOX precision is requested. Now it correctly includes stroke endcaps.
This fixes an important bug: when creating a pattern from selected objects, the bbox calculation was not accurate enough for paths with butt caps. This meant it was not easy to make a pattern of a plus to create a hatch fill pattern. (the plusses would not connect with each other) Now this works as easy as it should.
I have also increased the precision of the bbox calculation for fitting the canvas to the selection and for turning the selection into a marker.
Note that the improved RENDERING_BBOX calculation takes more time than before (in fact, RENDERING_BBOX used to be the same as APPROXIMATE_BBOX).
these 2 bugs can no longer be reproduced with Inkscape 0.47+devel r9307:
- "Fit Page to Selection" doesn't take arrow heads into account https://bugs.edge.launchpad.net/inkscape/+bug/479964
- Bounding box too small in EPS export https://bugs.edge.launchpad.net/inkscape/+bug/186182
still reproducible:
- Bounding box does not include long miters https://bugs.edge.launchpad.net/inkscape/+bug/166659
What is strange now imho: when resizing the page to selection, the bounding box of the selected object is smaller than the resized page margin (seen with both test cases of bug #479964 and #186182) -> does the command (button label) need to be rephrased or will the selection bounding box also be changed to include long miters / stroke endcaps?
~suv
-----Original Message----- From: ~suv [mailto:suv-sf@...58...] Sent: zaterdag 10 april 2010 21:30 To: Engelen, J.B.C. (Johan) Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Improved boundingbox calculation
On 10/4/10 17:25, J.B.C.Engelen@...1578... wrote:
Hi all,
I just committed an improved bbox calculation when SPItem::RENDERING_BBOX precision is requested. Now it correctly includes stroke endcaps.
This fixes an important bug: when creating a pattern from selected objects, the bbox calculation was not accurate enough for
paths with
butt caps. This meant it was not easy to make a pattern of
a plus to
create a hatch fill pattern. (the plusses would not connect
with each
other) Now this works as easy as it should.
I have also increased the precision of the bbox calculation for fitting the canvas to the selection and for turning the
selection into a marker.
Note that the improved RENDERING_BBOX calculation takes
more time than
before (in fact, RENDERING_BBOX used to be the same as APPROXIMATE_BBOX).
these 2 bugs can no longer be reproduced with Inkscape 0.47+devel r9307:
"Fit Page to Selection" doesn't take arrow heads into account https://bugs.edge.launchpad.net/inkscape/+bug/479964
Bounding box too small in EPS export https://bugs.edge.launchpad.net/inkscape/+bug/186182
still reproducible:
- Bounding box does not include long miters https://bugs.edge.launchpad.net/inkscape/+bug/166659
What is strange now imho: when resizing the page to selection, the bounding box of the selected object is smaller than the resized page margin (seen with both test cases of bug #479964 and #186182) -> does the command (button label) need to be rephrased or will the selection bounding box also be changed to include long miters / stroke endcaps?
The shown selection bounding box (the dashed rectangle) will not include stroke endcaps and stuff. Calculating the precise bbox is expensive and I think should only be done for action that require the precision, and not for interactive things like the selection cue.
-Johan
participants (2)
-
unknown@example.com
-
~suv