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
Over the past few months, I have overhauled, fixed, cleaned up, and streamlined the shape drawing system in Shape Engine. This extensive overhaul was essential because most outline drawing functions produced visible artifacts when transparent colors were used. Previously, these functions used segments with round end caps to draw each edge of a shape, resulting in overlapping end caps at each corner. I rewrote most of the outline drawing algorithms to calculate all necessary triangles for an outline, which are then drawn directly.
Polygon outlines, polylines, and some special outline drawing algorithms proved extremely challenging to implement and quickly became too complex to maintain. To address this, I am now using Clipper2 to create triangulations for polygon outlines, polylines, and other special cases. For example, to create a polygon outline, I inflate and shrink the polygon and then take the difference between both to obtain the new outline vertices. After a final triangulation, I have all the triangles of the outline. To enhance efficiency, I completely rewrote my Clipper2 wrapping system to be more memory efficient.
This task required much more work than I anticipated, but I am finally finished. A positive side effect is that most drawing functions are now faster as well. Even polygon outlines are faster to draw when the triangulation of the outline is cached and redrawn.
This was the last big missing piece for the upcoming 5.0 release as well. So stay tuned for that :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Over the past few months, I have overhauled, fixed, cleaned up, and streamlined the shape drawing system in Shape Engine. This extensive overhaul was essential because most outline drawing functions produced visible artifacts when transparent colors were used. Previously, these functions used segments with round end caps to draw each edge of a shape, resulting in overlapping end caps at each corner. I rewrote most of the outline drawing algorithms to calculate all necessary triangles for an outline, which are then drawn directly.
Polygon outlines, polylines, and some special outline drawing algorithms proved extremely challenging to implement and quickly became too complex to maintain. To address this, I am now using Clipper2 to create triangulations for polygon outlines, polylines, and other special cases. For example, to create a polygon outline, I inflate and shrink the polygon and then take the difference between both to obtain the new outline vertices. After a final triangulation, I have all the triangles of the outline. To enhance efficiency, I completely rewrote my Clipper2 wrapping system to be more memory efficient.
This task required much more work than I anticipated, but I am finally finished. A positive side effect is that most drawing functions are now faster as well. Even polygon outlines are faster to draw when the triangulation of the outline is cached and redrawn.
This was the last big missing piece for the upcoming 5.0 release as well. So stay tuned for that :)
ShapeEngine-OutlineDrawingOverhaul-Showcase-1080p.mp4
YouTube Video
All reactions