mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1019 B
40 lines
1019 B
// Copyright (c) Six Labors and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
using SixLabors.ImageSharp.Processing.Text;
|
|
|
|
using Xunit;
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Drawing.Text
|
|
{
|
|
public class TextGraphicsOptionsTests
|
|
{
|
|
[Fact]
|
|
public void ExplicitCastOfGraphicsOptions()
|
|
{
|
|
var opt = new GraphicsOptions(false)
|
|
{
|
|
AntialiasSubpixelDepth = 99
|
|
};
|
|
|
|
TextGraphicsOptions textOptions = opt;
|
|
|
|
Assert.False(textOptions.Antialias);
|
|
Assert.Equal(99, textOptions.AntialiasSubpixelDepth);
|
|
}
|
|
|
|
[Fact]
|
|
public void ImplicitCastToGraphicsOptions()
|
|
{
|
|
var textOptions = new TextGraphicsOptions(false)
|
|
{
|
|
AntialiasSubpixelDepth = 99
|
|
};
|
|
|
|
var opt = (GraphicsOptions)textOptions;
|
|
|
|
Assert.False(opt.Antialias);
|
|
Assert.Equal(99, opt.AntialiasSubpixelDepth);
|
|
}
|
|
}
|
|
}
|