Skip to content

Commit da77460

Browse files
Fix #367
1 parent b5c1f8a commit da77460

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Six Labors.
2+
// Licensed under the Six Labors Split License.
3+
4+
5+
using SixLabors.Fonts;
6+
using SixLabors.ImageSharp.Drawing.Processing;
7+
using SixLabors.ImageSharp.PixelFormats;
8+
9+
namespace SixLabors.ImageSharp.Drawing.Tests.Issues;
10+
11+
public class Issue_367
12+
{
13+
[Theory]
14+
[WithSolidFilledImages(512, 72, nameof(Color.White), PixelTypes.Rgba32)]
15+
public void BrushAndTextAlign<TPixel>(TestImageProvider<TPixel> provider)
16+
where TPixel : unmanaged, IPixel<TPixel>
17+
{
18+
if (!TestEnvironment.IsWindows)
19+
{
20+
return;
21+
}
22+
23+
provider.RunValidatingProcessorTest(
24+
c => c.ProcessWithCanvas(canvas =>
25+
{
26+
Pen pen = Pens.Solid(Color.Green, 1);
27+
Brush brush = Brushes.Solid(Color.Red);
28+
29+
Font font = SystemFonts.Get("Arial").CreateFont(64);
30+
RichTextOptions options = new(font);
31+
32+
canvas.DrawText(options, "Hello, world!", brush, pen);
33+
}),
34+
appendSourceFileOrDescription: false);
35+
}
36+
}
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)