File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
tests/ImageSharp.Drawing.Tests/Issues Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) Six Labors.
2+ // Licensed under the Apache License, Version 2.0.
3+
4+ using System . Numerics ;
5+ using SixLabors . Fonts ;
6+ using SixLabors . ImageSharp . Drawing . Processing ;
7+ using SixLabors . ImageSharp . PixelFormats ;
8+ using SixLabors . ImageSharp . Processing ;
9+ using Xunit ;
10+
11+ namespace SixLabors . ImageSharp . Drawing . Tests . Issues
12+ {
13+ public class Issue_241
14+ {
15+ [ Fact ]
16+ public void DoesNotThrowArgumentOutOfRangeException ( )
17+ {
18+ if ( ! TestEnvironment . IsWindows )
19+ {
20+ return ;
21+ }
22+
23+ FontFamily fontFamily = SystemFonts . Get ( "Arial" ) ;
24+ RichTextOptions opt = new ( fontFamily . CreateFont ( 100 , FontStyle . Regular ) )
25+ {
26+ Origin = new Vector2 ( 159 , 0 )
27+ } ;
28+ const string content = "TEST" ;
29+
30+ using Image image = new Image < Rgba32 > ( 512 , 256 , Color . Black ) ;
31+ image . Mutate ( x => x . DrawText ( opt , content , Brushes . Horizontal ( Color . Orange ) ) ) ;
32+ }
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments