You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following reduced SVG does not show the red and tips of the gradient because the path bounds computation in LayoutObject::strokeBoundingBox just calls Path::box which computes the loose bounding box purely based on the points without regards to m_commands. That works great for clip regions of subcanvases in RenderState::beginGroup (because it's fast and light, and a few extra pixels of slack is no big deal), but it returns inaccurate extents for gradients because the bezier curve does not actually extend out as far as its control points.
I'm in no hurry for a fix - just bringing it to your attention. I'll likely have to compute accurate bounds anyway for correct grid fitting / pixel snapping of shape bounding boxes because I've found icons where the anchors are not at the left/right/top/bottom extents (e.g. see below the icons8.com fluency set forward button) which would be several pixels off otherwise. That will require me to read more though :b (https://floris.briolas.nl/floris/2009/10/bounding-box-of-cubic-bezier/), and then I can try applying it to gradients too...
The text was updated successfully, but these errors were encountered:
The following reduced SVG does not show the red and tips of the gradient because the path bounds computation in
LayoutObject::strokeBoundingBox
just callsPath::box
which computes the loose bounding box purely based on the points without regards tom_commands
. That works great for clip regions of subcanvases inRenderState::beginGroup
(because it's fast and light, and a few extra pixels of slack is no big deal), but it returns inaccurate extents for gradients because the bezier curve does not actually extend out as far as its control points.I'm in no hurry for a fix - just bringing it to your attention. I'll likely have to compute accurate bounds anyway for correct grid fitting / pixel snapping of shape bounding boxes because I've found icons where the anchors are not at the left/right/top/bottom extents (e.g. see below the icons8.com fluency set forward button) which would be several pixels off otherwise. That will require me to read more though :b (https://floris.briolas.nl/floris/2009/10/bounding-box-of-cubic-bezier/), and then I can try applying it to gradients too...
The text was updated successfully, but these errors were encountered: