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.
36 lines
1.1 KiB
36 lines
1.1 KiB
// <copyright file="SkewTest.cs" company="James Jackson-South">
|
|
// Copyright (c) James Jackson-South and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
// </copyright>
|
|
|
|
namespace ImageSharp.Tests.Processing.Transforms
|
|
{
|
|
using ImageSharp.PixelFormats;
|
|
using ImageSharp.Processing.Processors;
|
|
using Xunit;
|
|
|
|
public class SkewTest : BaseImageOperationsExtensionTest
|
|
{
|
|
[Fact]
|
|
public void Skew_x_y_CreateSkewProcessorWithAnglesSetAndExpandTrue()
|
|
{
|
|
this.operations.Skew(10, 20);
|
|
var processor = this.Verify<SkewProcessor<Rgba32>>();
|
|
|
|
Assert.Equal(10, processor.AngleX);
|
|
Assert.Equal(20, processor.AngleY);
|
|
Assert.True(processor.Expand);
|
|
}
|
|
|
|
[Fact]
|
|
public void Skew_x_y_expand_CreateSkewProcessorWithAnglesSetAndExpandTrue()
|
|
{
|
|
this.operations.Skew(10, 20, false);
|
|
var processor = this.Verify<SkewProcessor<Rgba32>>();
|
|
|
|
Assert.Equal(10, processor.AngleX);
|
|
Assert.Equal(20, processor.AngleY);
|
|
Assert.False(processor.Expand);
|
|
}
|
|
}
|
|
}
|