diff --git a/tests/ImageSharp.Tests/Drawing/Helpers/BezierPolygon.cs b/tests/ImageSharp.Tests/Drawing/Helpers/BezierPolygon.cs
deleted file mode 100644
index 070e55501..000000000
--- a/tests/ImageSharp.Tests/Drawing/Helpers/BezierPolygon.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// Copyright (c) James Jackson-South and contributors.
-// Licensed under the Apache License, Version 2.0.
-//
-
-namespace SixLabors.Shapes
-{
- using System.Collections.Generic;
- using System.Collections.Immutable;
- using System.Numerics;
-
- using SixLabors.Shapes;
- public class BezierPolygon : IShape
- {
- private Polygon polygon;
-
- public BezierPolygon(params Vector2[] points)
- {
- this.polygon = new Polygon(new BezierLineSegment(points));
- }
-
- public float Distance(Vector2 point)
- {
- return this.polygon.Distance(point);
- }
-
- public bool Contains(Vector2 point)
- {
- return this.polygon.Contains(point);
- }
-
- public int FindIntersections(Vector2 start, Vector2 end, Vector2[] buffer, int count, int offset)
- {
- return this.polygon.FindIntersections(start, end, buffer, count, offset);
- }
-
- public IEnumerable FindIntersections(Vector2 start, Vector2 end)
- {
- return this.polygon.FindIntersections(start, end);
- }
-
- public IShape Transform(Matrix3x2 matrix)
- {
- return ((IShape)this.polygon).Transform(matrix);
- }
-
- public Rectangle Bounds
- {
- get
- {
- return this.polygon.Bounds;
- }
- }
-
- public ImmutableArray Paths
- {
- get
- {
- return this.polygon.Paths;
- }
- }
-
- public int MaxIntersections
- {
- get
- {
- return this.polygon.MaxIntersections;
- }
- }
- }
-}
diff --git a/tests/ImageSharp.Tests/Drawing/Helpers/LinearPolygon.cs b/tests/ImageSharp.Tests/Drawing/Helpers/LinearPolygon.cs
deleted file mode 100644
index fa9488266..000000000
--- a/tests/ImageSharp.Tests/Drawing/Helpers/LinearPolygon.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// Copyright (c) James Jackson-South and contributors.
-// Licensed under the Apache License, Version 2.0.
-//
-
-namespace SixLabors.Shapes
-{
- using System.Collections.Generic;
- using System.Collections.Immutable;
- using System.Numerics;
-
- using SixLabors.Shapes;
- public class LinearPolygon : IShape
- {
- private Polygon polygon;
-
- public LinearPolygon(params Vector2[] points)
- {
- this.polygon = new Polygon(new LinearLineSegment(points));
- }
-
- public float Distance(Vector2 point)
- {
- return this.polygon.Distance(point);
- }
-
- public bool Contains(Vector2 point)
- {
- return this.polygon.Contains(point);
- }
-
- public int FindIntersections(Vector2 start, Vector2 end, Vector2[] buffer, int count, int offset)
- {
- return this.polygon.FindIntersections(start, end, buffer, count, offset);
- }
-
- public IEnumerable FindIntersections(Vector2 start, Vector2 end)
- {
- return this.polygon.FindIntersections(start, end);
- }
-
- public IShape Transform(Matrix3x2 matrix)
- {
- return ((IShape)this.polygon).Transform(matrix);
- }
-
- public Rectangle Bounds
- {
- get
- {
- return this.polygon.Bounds;
- }
- }
-
- public ImmutableArray Paths
- {
- get
- {
- return this.polygon.Paths;
- }
- }
-
- public int MaxIntersections
- {
- get
- {
- return this.polygon.MaxIntersections;
- }
- }
- }
-}
diff --git a/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs b/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs
index 03ec5d0c8..0a4f2c4a0 100644
--- a/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs
@@ -71,15 +71,15 @@ namespace ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPolygonOutlineNoOverlapping()
{
string path = this.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- LinearPolygon simplePath = new LinearPolygon(
+ Polygon simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
- new Vector2(50, 300));
+ new Vector2(50, 300)));
- LinearPolygon hole1 = new LinearPolygon(
+ Polygon hole1 = new Polygon(new LinearLineSegment(
new Vector2(207, 25),
new Vector2(263, 25),
- new Vector2(235, 57));
+ new Vector2(235, 57)));
using (Image image = new Image(500, 500))
{
@@ -122,15 +122,15 @@ namespace ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPolygonOutlineOverlapping()
{
string path = this.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- LinearPolygon simplePath = new LinearPolygon(
+ Polygon simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
- new Vector2(50, 300));
+ new Vector2(50, 300)));
- LinearPolygon hole1 = new LinearPolygon(
+ Polygon hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(130, 40),
- new Vector2(65, 137));
+ new Vector2(65, 137)));
using (Image image = new Image(500, 500))
@@ -169,15 +169,15 @@ namespace ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPolygonOutlineDashed()
{
string path = this.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- LinearPolygon simplePath = new LinearPolygon(
+ Polygon simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
- new Vector2(50, 300));
+ new Vector2(50, 300)));
- LinearPolygon hole1 = new LinearPolygon(
+ Polygon hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(93, 85),
- new Vector2(65, 137));
+ new Vector2(65, 137)));
using (Image image = new Image(500, 500))
{
@@ -196,15 +196,15 @@ namespace ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedPolygonOutlineWithOpacity()
{
string path = this.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- LinearPolygon simplePath = new LinearPolygon(
+ Polygon simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
- new Vector2(50, 300));
+ new Vector2(50, 300)));
- LinearPolygon hole1 = new LinearPolygon(
+ Polygon hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(93, 85),
- new Vector2(65, 137));
+ new Vector2(65, 137)));
Color color = new Color(Color.HotPink.R, Color.HotPink.G, Color.HotPink.B, 150);
using (Image image = new Image(500, 500))
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/DrawBeziersTests.cs b/tests/ImageSharp.Tests/Drawing/Paths/DrawBeziersTests.cs
index 967cd1970..0d3b46981 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/DrawBeziersTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/DrawBeziersTests.cs
@@ -40,127 +40,127 @@ namespace ImageSharp.Tests.Drawing.Paths
}
[Fact]
- public void Brush_Thickness_points()
+ public void CorrectlySetsBrushThicknessAndPoints()
{
img.DrawBeziers(brush, thickness, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ BezierLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void Brush_Thickness_points_options()
+ public void CorrectlySetsBrushThicknessPointsAndOptions()
{
img.DrawBeziers(brush, thickness, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ BezierLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void color_Thickness_points()
+ public void CorrectlySetsColorThicknessAndPoints()
{
img.DrawBeziers(color, thickness, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ BezierLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void color_Thickness_points_options()
+ public void CorrectlySetsColorThicknessPointsAndOptions()
{
img.DrawBeziers(color, thickness, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ BezierLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void pen_points()
+ public void CorrectlySetsPenAndPoints()
{
img.DrawBeziers(pen, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ BezierLineSegment segment = Assert.IsType(vector.LineSegments[0]);
Assert.Equal(pen, processor.Pen);
}
[Fact]
- public void pen_points_options()
+ public void CorrectlySetsPenPointsAndOptions()
{
img.DrawBeziers(pen, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ BezierLineSegment segment = Assert.IsType(vector.LineSegments[0]);
Assert.Equal(pen, processor.Pen);
}
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/DrawLinesTests.cs b/tests/ImageSharp.Tests/Drawing/Paths/DrawLinesTests.cs
index 3b203cdd8..bbed3cae6 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/DrawLinesTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/DrawLinesTests.cs
@@ -40,127 +40,127 @@ namespace ImageSharp.Tests.Drawing.Paths
}
[Fact]
- public void Brush_Thickness_points()
+ public void CorrectlySetsBrushThicknessAndPoints()
{
img.DrawLines(brush, thickness, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void Brush_Thickness_points_options()
+ public void CorrectlySetsBrushThicknessPointsAndOptions()
{
img.DrawLines(brush, thickness, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void color_Thickness_points()
+ public void CorrectlySetsColorThicknessAndPoints()
{
img.DrawLines(color, thickness, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void color_Thickness_points_options()
+ public void CorrectlySetsColorThicknessPointsAndOptions()
{
img.DrawLines(color, thickness, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void pen_points()
+ public void CorrectlySetsPenAndPoints()
{
img.DrawLines(pen, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
Assert.Equal(pen, processor.Pen);
}
[Fact]
- public void pen_points_options()
+ public void CorrectlySetsPenPointsAndOptions()
{
img.DrawLines(pen, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0]);
- var segment = Assert.IsType(vector.LineSegments[0]);
+ SixLabors.Shapes.Path vector = Assert.IsType(path.Paths[0]);
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
Assert.Equal(pen, processor.Pen);
}
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/DrawPath.cs b/tests/ImageSharp.Tests/Drawing/Paths/DrawPath.cs
index 8ce7dcba2..531546370 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/DrawPath.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/DrawPath.cs
@@ -40,96 +40,96 @@ namespace ImageSharp.Tests.Drawing.Paths
}
[Fact]
- public void Brush_Thickness_path()
+ public void CorrectlySetsBrushThicknessAndPath()
{
img.Draw(brush, thickness, path);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var shapepath = Assert.IsType(processor.Path);
+ ShapePath shapepath = Assert.IsType(processor.Path);
Assert.NotEmpty(shapepath.Paths);
Assert.Equal(path, shapepath.Paths[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void Brush_Thickness_path_options()
+ public void CorrectlySetsBrushThicknessPathAndOptions()
{
img.Draw(brush, thickness, path, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var shapepath = Assert.IsType(processor.Path);
+ ShapePath shapepath = Assert.IsType(processor.Path);
Assert.NotEmpty(shapepath.Paths);
Assert.Equal(path, shapepath.Paths[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void color_Thickness_path()
+ public void CorrectlySetsColorThicknessAndPath()
{
img.Draw(color, thickness, path);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var shapepath = Assert.IsType(processor.Path);
+ ShapePath shapepath = Assert.IsType(processor.Path);
Assert.NotEmpty(shapepath.Paths);
Assert.Equal(path, shapepath.Paths[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void color_Thickness_path_options()
+ public void CorrectlySetsColorThicknessPathAndOptions()
{
img.Draw(color, thickness, path, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var shapepath = Assert.IsType(processor.Path);
+ ShapePath shapepath = Assert.IsType(processor.Path);
Assert.NotEmpty(shapepath.Paths);
Assert.Equal(path, shapepath.Paths[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void pen_path()
+ public void CorrectlySetsPenAndPath()
{
img.Draw(pen, path);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var shapepath = Assert.IsType(processor.Path);
+ ShapePath shapepath = Assert.IsType(processor.Path);
Assert.NotEmpty(shapepath.Paths);
Assert.Equal(path, shapepath.Paths[0]);
@@ -137,16 +137,16 @@ namespace ImageSharp.Tests.Drawing.Paths
}
[Fact]
- public void pen_path_options()
+ public void CorrectlySetsPenPathAndOptions()
{
img.Draw(pen, path, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var shapepath = Assert.IsType(processor.Path);
+ ShapePath shapepath = Assert.IsType(processor.Path);
Assert.NotEmpty(shapepath.Paths);
Assert.Equal(path, shapepath.Paths[0]);
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/DrawPolygon.cs b/tests/ImageSharp.Tests/Drawing/Paths/DrawPolygon.cs
index 9a931470d..399e79dae 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/DrawPolygon.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/DrawPolygon.cs
@@ -40,127 +40,127 @@ namespace ImageSharp.Tests.Drawing.Paths
}
[Fact]
- public void Brush_Thickness_points()
+ public void CorrectlySetsBrushThicknessAndPoints()
{
img.DrawPolygon(brush, thickness, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0].AsShape());
- var segment = Assert.IsType(vector.LineSegments[0]);
+ Polygon vector = Assert.IsType(path.Paths[0].AsShape());
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void Brush_Thickness_points_options()
+ public void CorrectlySetsBrushThicknessPointsAndOptions()
{
img.DrawPolygon(brush, thickness, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0].AsShape());
- var segment = Assert.IsType(vector.LineSegments[0]);
+ Polygon vector = Assert.IsType(path.Paths[0].AsShape());
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(brush, pen.Brush);
Assert.Equal(thickness, pen.Width);
}
[Fact]
- public void color_Thickness_points()
+ public void CorrectlySetsColorThicknessAndPoints()
{
img.DrawPolygon(color, thickness, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0].AsShape());
- var segment = Assert.IsType(vector.LineSegments[0]);
+ Polygon vector = Assert.IsType(path.Paths[0].AsShape());
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void color_Thickness_points_options()
+ public void CorrectlySetsColorThicknessPointsAndOptions()
{
img.DrawPolygon(color, thickness, points, noneDefault);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(noneDefault, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType(processor.Path);
Assert.NotEmpty(path.Paths);
- var vector = Assert.IsType(path.Paths[0].AsShape());
- var segment = Assert.IsType(vector.LineSegments[0]);
+ Polygon vector = Assert.IsType(path.Paths[0].AsShape());
+ LinearLineSegment segment = Assert.IsType(vector.LineSegments[0]);
- var pen = Assert.IsType>(processor.Pen);
+ Pen pen = Assert.IsType>(processor.Pen);
Assert.Equal(thickness, pen.Width);
- var brush = Assert.IsType>(pen.Brush);
+ SolidBrush brush = Assert.IsType>(pen.Brush);
Assert.Equal(color, brush.Color);
}
[Fact]
- public void pen_points()
+ public void CorrectlySetsPenAndPoints()
{
img.DrawPolygon(pen, points);
Assert.NotEmpty(img.ProcessorApplications);
- var processor = Assert.IsType>(img.ProcessorApplications[0].processor);
+ DrawPathProcessor processor = Assert.IsType>(img.ProcessorApplications[0].processor);
Assert.Equal(GraphicsOptions.Default, processor.Options);
- var path = Assert.IsType(processor.Path);
+ ShapePath path = Assert.IsType