@@ -629,7 +629,44 @@ public void DrawRichTextRainbow<TPixel>(
629629
630630 provider . RunValidatingProcessorTest (
631631 x => x . DrawText ( textOptions , text , Color . White ) ,
632- $ "RichText-ArabicRainbow-F({ fontSize } )",
632+ $ "RichText-Rainbow-F({ fontSize } )",
633+ TextDrawingComparer ,
634+ appendPixelTypeToFileName : false ,
635+ appendSourceFileOrDescription : true ) ;
636+ }
637+
638+ [ Theory ]
639+ [ WithSolidFilledImages ( 100 , 100 , nameof ( Color . Black ) , PixelTypes . Rgba32 , "M10,90 Q90,90 90,45 Q90,10 50,10 Q10,10 10,40 Q10,70 45,70 Q70,70 75,50" , "spiral" ) ]
640+ [ WithSolidFilledImages ( 350 , 350 , nameof ( Color . Black ) , PixelTypes . Rgba32 , "M275 175 A100 100 0 1 1 275 174" , "circle" ) ]
641+ [ WithSolidFilledImages ( 120 , 120 , nameof ( Color . Black ) , PixelTypes . Rgba32 , "M50,10 L 90 90 L 10 90 L50 10" , "triangle" ) ]
642+ public void CanDrawRichTextAlongPathHorizontal < TPixel > ( TestImageProvider < TPixel > provider , string svgPath , string exampleImageKey )
643+ where TPixel : unmanaged, IPixel < TPixel >
644+ {
645+ bool parsed = Path . TryParseSvgPath ( svgPath , out IPath path ) ;
646+ Assert . True ( parsed ) ;
647+
648+ Font font = CreateFont ( TestFonts . OpenSans , 13 ) ;
649+
650+ const string text = "Quick brown fox jumps over the lazy dog." ;
651+ TextDrawingRun run = new ( )
652+ {
653+ Start = 0 ,
654+ End = text . GetGraphemeCount ( ) ,
655+ StrikeoutPen = new SolidPen ( Color . Red )
656+ } ;
657+
658+ TextDrawingOptions textOptions = new ( font )
659+ {
660+ WrappingLength = path . ComputeLength ( ) ,
661+ VerticalAlignment = VerticalAlignment . Bottom ,
662+ HorizontalAlignment = HorizontalAlignment . Left ,
663+ Path = path ,
664+ TextRuns = new [ ] { run }
665+ } ;
666+
667+ provider . RunValidatingProcessorTest (
668+ x => x . DrawText ( textOptions , text , Color . White ) ,
669+ $ "RichText-Path-({ exampleImageKey } )",
633670 TextDrawingComparer ,
634671 appendPixelTypeToFileName : false ,
635672 appendSourceFileOrDescription : true ) ;
0 commit comments