Commit 4a88695
committed
Merge path-text decorations into continuous bands
Refactors text-along-path decoration rendering to accumulate contiguous same-styled glyph cells into a single segment rather than emitting one rectangle per glyph. Path-following decorations are now emitted as sampled curve bands instead of per-glyph rotated rectangles, eliminating double anti-aliased edges at cell boundaries.
- Moves path-transform logic from `RichTextGlyphRenderer`/`PathGlyphBuilder` into `BaseGlyphBuilder` via a new `TextPath` property and `ApplyPathTransform` method
- Deletes `PathGlyphBuilder` (replaced by a new `GlyphBuilder(IPath)` constructor)
- Adds `PendingSegment` accumulator to `DecorationLane` with contiguity merging
- Adds `EmitPathDecorationBand` for curve-sampled decoration geometry
- Extracts `RegisterDecorationPath` to share path registration between straight and curved emitters
- Adds `DrawTextDecorated` benchmark and `RichTextGlyphRendererTests` unit tests
- Updates reference image for path-text triangle test1 parent 3239307 commit 4a88695
17 files changed
Lines changed: 481 additions & 157 deletions
File tree
- src/ImageSharp.Drawing
- Processing
- Text
- tests
- ImageSharp.Drawing.Benchmarks/Drawing
- ImageSharp.Drawing.Tests/Processing
- Images/ReferenceOutput/Drawing/ProcessWithDrawingCanvasTests
Lines changed: 1 addition & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
| |||
193 | 187 | | |
194 | 188 | | |
195 | 189 | | |
196 | | - | |
| 190 | + | |
197 | 191 | | |
198 | 192 | | |
199 | 193 | | |
| |||
299 | 293 | | |
300 | 294 | | |
301 | 295 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | 296 | | |
306 | 297 | | |
307 | 298 | | |
| |||
730 | 721 | | |
731 | 722 | | |
732 | 723 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | 724 | | |
778 | 725 | | |
779 | 726 | | |
| |||
0 commit comments