📷 A modern, cross-platform, 2D Graphics library for .NET
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.
 
 

33 lines
1.1 KiB

namespace ImageSharp.Tests.Drawing.Paths
{
using System;
using System.IO;
using ImageSharp;
using ImageSharp.Drawing.Brushes;
using ImageSharp.Processing;
using System.Collections.Generic;
using Xunit;
using ImageSharp.Drawing;
using System.Numerics;
using SixLabors.Shapes;
using ImageSharp.Drawing.Processors;
using ImageSharp.Drawing.Pens;
public class Extensions
{
[Theory]
[InlineData(0.5, 0.5, 5, 5, 0,0,6,6)]
[InlineData(1, 1, 5, 5, 1,1,5,5)]
public void ConvertRectangle(float x, float y, float width, float height, int expectedX, int expectedY, int expectedWidth, int expectedHeight)
{
SixLabors.Shapes.Rectangle src = new SixLabors.Shapes.Rectangle(x, y, width, height);
ImageSharp.Rectangle actual = src.Convert();
Assert.Equal(expectedX, actual.X);
Assert.Equal(expectedY, actual.Y);
Assert.Equal(expectedWidth, actual.Width);
Assert.Equal(expectedHeight, actual.Height);
}
}
}