diff --git a/src/ImageSharp.Drawing/Primitives/ShapePath.cs b/src/ImageSharp.Drawing/Primitives/ShapePath.cs
index 6b4ccd917..2a569f061 100644
--- a/src/ImageSharp.Drawing/Primitives/ShapePath.cs
+++ b/src/ImageSharp.Drawing/Primitives/ShapePath.cs
@@ -1,6 +1,7 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp.Primitives
@@ -16,7 +17,7 @@ namespace SixLabors.ImageSharp.Primitives
/// The shape.
/// The pen to apply to the shape.
// TODO: SixLabors.shape will be moving to a Span/ReadOnlySpan based API shortly use ToArray for now.
- public ShapePath(IPath shape, Drawing.Pens.IPen pen)
+ public ShapePath(IPath shape, IPen pen)
: base(shape.GenerateOutline(pen.StrokeWidth, pen.StrokePattern.ToArray()))
{
}
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/Processors/BrushApplicator.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/BrushApplicator.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Drawing/Brushes/Processors/BrushApplicator.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/BrushApplicator.cs
index 78b394bf2..f665e8408 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/Processors/BrushApplicator.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/BrushApplicator.cs
@@ -6,7 +6,7 @@ using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Drawing.Brushes.Processors
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// primitive that converts a point in to a color for discovering the fill color based on an implementation
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/Brushes.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/Brushes.cs
similarity index 99%
rename from src/ImageSharp.Drawing/Drawing/Brushes/Brushes.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/Brushes.cs
index 47e207e8c..141ca403b 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/Brushes.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/Brushes.cs
@@ -3,7 +3,7 @@
using SixLabors.ImageSharp.PixelFormats;
-namespace SixLabors.ImageSharp.Drawing.Brushes
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// A collection of methods for creating generic brushes.
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/IBrush.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/IBrush.cs
similarity index 93%
rename from src/ImageSharp.Drawing/Drawing/Brushes/IBrush.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/IBrush.cs
index 41d9081eb..93ecb7788 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/IBrush.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/IBrush.cs
@@ -1,11 +1,10 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Brushes
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// Brush represents a logical configuration of a brush which can be used to source pixel colors
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/ImageBrush{TPixel}.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/ImageBrush{TPixel}.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Drawing/Brushes/ImageBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/ImageBrush{TPixel}.cs
index 91965e62e..c2e3a16ef 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/ImageBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/ImageBrush{TPixel}.cs
@@ -3,12 +3,11 @@
using System;
using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Brushes
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// Provides an implementation of an image brush for painting images within areas.
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/PatternBrush{TPixel}.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/PatternBrush{TPixel}.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Drawing/Brushes/PatternBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/PatternBrush{TPixel}.cs
index ba6d91208..765f2a132 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/PatternBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/PatternBrush{TPixel}.cs
@@ -4,13 +4,12 @@
using System;
using System.Numerics;
using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Brushes
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// Provides an implementation of a pattern brush for painting patterns.
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/RecolorBrush{TPixel}.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/RecolorBrush{TPixel}.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Drawing/Brushes/RecolorBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/RecolorBrush{TPixel}.cs
index 4cef8cc83..324c54e18 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/RecolorBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/RecolorBrush{TPixel}.cs
@@ -4,12 +4,11 @@
using System;
using System.Numerics;
using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Brushes
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// Provides an implementation of a brush that can recolor an image
diff --git a/src/ImageSharp.Drawing/Drawing/Brushes/SolidBrush{TPixel}.cs b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/SolidBrush{TPixel}.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Drawing/Brushes/SolidBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Brushes/SolidBrush{TPixel}.cs
index 1511ce86c..826f5f60a 100644
--- a/src/ImageSharp.Drawing/Drawing/Brushes/SolidBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Brushes/SolidBrush{TPixel}.cs
@@ -3,12 +3,11 @@
using System;
using SixLabors.ImageSharp.Advanced;
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Brushes
+namespace SixLabors.ImageSharp.Processing.Drawing.Brushes
{
///
/// Provides an implementation of a solid brush for painting solid color areas.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawBezierExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawBezierExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawBezierExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawBezierExtensions.cs
index 974c7a650..8f075d5c2 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawBezierExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawBezierExtensions.cs
@@ -1,13 +1,13 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Primitives;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of Bezier paths to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawImageExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawImageExtensions.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawImageExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawImageExtensions.cs
index 1fa16da49..618768206 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawImageExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawImageExtensions.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays.Processors;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of images to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawLineExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawLineExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawLineExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawLineExtensions.cs
index 8bf42a07f..9d2ea0c1d 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawLineExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawLineExtensions.cs
@@ -1,13 +1,13 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Primitives;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of lines to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawPathCollectionExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawPathCollectionExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawPathCollectionExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawPathCollectionExtensions.cs
index 191a73a36..d148638ae 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawPathCollectionExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawPathCollectionExtensions.cs
@@ -1,12 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of collections of polygon outlines to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawPathExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawPathExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawPathExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawPathExtensions.cs
index 7f86ddee6..a795ee295 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawPathExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawPathExtensions.cs
@@ -1,13 +1,13 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of polygon outlines to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawPolygonExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawPolygonExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawPolygonExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawPolygonExtensions.cs
index f56ab19d8..833b616f8 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawPolygonExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawPolygonExtensions.cs
@@ -1,13 +1,13 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Primitives;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of closed linear polygons to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/DrawRectangleExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/DrawRectangleExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/DrawRectangleExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/DrawRectangleExtensions.cs
index df0c1bf15..3d6702be9 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/DrawRectangleExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/DrawRectangleExtensions.cs
@@ -1,13 +1,13 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Primitives;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the drawing of rectangles to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/FillPathBuilderExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/FillPathBuilderExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/FillPathBuilderExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/FillPathBuilderExtensions.cs
index e40eaa413..975b5db4c 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/FillPathBuilderExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/FillPathBuilderExtensions.cs
@@ -2,12 +2,11 @@
// Licensed under the Apache License, Version 2.0.
using System;
-
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the filling of polygons with various brushes to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/FillPathCollectionExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/FillPathCollectionExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/FillPathCollectionExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/FillPathCollectionExtensions.cs
index 7021b5c87..be472d373 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/FillPathCollectionExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/FillPathCollectionExtensions.cs
@@ -1,11 +1,11 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the filling of collections of polygon outlines to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/FillPathExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/FillPathExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/FillPathExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/FillPathExtensions.cs
index 779a6e94f..9b288c8be 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/FillPathExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/FillPathExtensions.cs
@@ -1,12 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the filling of polygon outlines to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/FillPolygonExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/FillPolygonExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/FillPolygonExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/FillPolygonExtensions.cs
index 700b3e18f..692f88337 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/FillPolygonExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/FillPolygonExtensions.cs
@@ -1,12 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.Primitives;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the filling of closed linear polygons to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/FillRectangleExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/FillRectangleExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/FillRectangleExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/FillRectangleExtensions.cs
index a7ba82d49..eff333a4f 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/FillRectangleExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/FillRectangleExtensions.cs
@@ -1,12 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.Primitives;
using SixLabors.Shapes;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the filling of rectangles to the type.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/FillRegionExtensions.cs b/src/ImageSharp.Drawing/Processing/Drawing/FillRegionExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Processing/Overlays/FillRegionExtensions.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/FillRegionExtensions.cs
index 0f1176e9d..d3e223222 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/FillRegionExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/FillRegionExtensions.cs
@@ -1,12 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
-namespace SixLabors.ImageSharp.Processing.Overlays
+namespace SixLabors.ImageSharp.Processing.Drawing
{
///
/// Adds extensions that allow the filling of regions with various brushes to the type.
diff --git a/src/ImageSharp.Drawing/Drawing/Pens/IPen.cs b/src/ImageSharp.Drawing/Processing/Drawing/Pens/IPen.cs
similarity index 89%
rename from src/ImageSharp.Drawing/Drawing/Pens/IPen.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Pens/IPen.cs
index ed7de1461..387165e20 100644
--- a/src/ImageSharp.Drawing/Drawing/Pens/IPen.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Pens/IPen.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
-namespace SixLabors.ImageSharp.Drawing.Pens
+namespace SixLabors.ImageSharp.Processing.Drawing.Pens
{
///
/// Interface representing a Pen
diff --git a/src/ImageSharp.Drawing/Drawing/Pens/Pens.cs b/src/ImageSharp.Drawing/Processing/Drawing/Pens/Pens.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Drawing/Pens/Pens.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Pens/Pens.cs
index 4eb2d5d20..b1883e322 100644
--- a/src/ImageSharp.Drawing/Drawing/Pens/Pens.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Pens/Pens.cs
@@ -1,10 +1,10 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
-namespace SixLabors.ImageSharp.Drawing.Pens
+namespace SixLabors.ImageSharp.Processing.Drawing.Pens
{
///
/// Contains a collection of common Pen styles
diff --git a/src/ImageSharp.Drawing/Drawing/Pens/Pen{TPixel}.cs b/src/ImageSharp.Drawing/Processing/Drawing/Pens/Pen{TPixel}.cs
similarity index 96%
rename from src/ImageSharp.Drawing/Drawing/Pens/Pen{TPixel}.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Pens/Pen{TPixel}.cs
index 3956dde0c..1dd6b6616 100644
--- a/src/ImageSharp.Drawing/Drawing/Pens/Pen{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Pens/Pen{TPixel}.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
-namespace SixLabors.ImageSharp.Drawing.Pens
+namespace SixLabors.ImageSharp.Processing.Drawing.Pens
{
///
/// Provides a pen that can apply a pattern to a line with a set brush and thickness
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/Processors/DrawImageProcessor.cs b/src/ImageSharp.Drawing/Processing/Drawing/Processors/DrawImageProcessor.cs
similarity index 99%
rename from src/ImageSharp.Drawing/Processing/Overlays/Processors/DrawImageProcessor.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Processors/DrawImageProcessor.cs
index a41496d2a..7b6e36d9d 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/Processors/DrawImageProcessor.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Processors/DrawImageProcessor.cs
@@ -9,7 +9,7 @@ using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Processing.Overlays.Processors
+namespace SixLabors.ImageSharp.Processing.Drawing.Processors
{
///
/// Combines two images together by blending the pixels.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillProcessor.cs b/src/ImageSharp.Drawing/Processing/Drawing/Processors/FillProcessor.cs
similarity index 94%
rename from src/ImageSharp.Drawing/Processing/Overlays/Processors/FillProcessor.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Processors/FillProcessor.cs
index 70ac2507a..e4ef44564 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillProcessor.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Processors/FillProcessor.cs
@@ -3,14 +3,13 @@
using System;
using System.Threading.Tasks;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.ImageSharp.Processing.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Processors
+namespace SixLabors.ImageSharp.Processing.Drawing.Processors
{
///
/// Using the brush as a source of pixels colors blends the brush color with source.
diff --git a/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillRegionProcessor.cs b/src/ImageSharp.Drawing/Processing/Drawing/Processors/FillRegionProcessor.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Processing/Overlays/Processors/FillRegionProcessor.cs
rename to src/ImageSharp.Drawing/Processing/Drawing/Processors/FillRegionProcessor.cs
index dfd66d7fc..aa0b2e9b2 100644
--- a/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillRegionProcessor.cs
+++ b/src/ImageSharp.Drawing/Processing/Drawing/Processors/FillRegionProcessor.cs
@@ -3,15 +3,14 @@
using System;
using System.Runtime.CompilerServices;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Brushes.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.ImageSharp.Processing.Processors;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing.Processors
+namespace SixLabors.ImageSharp.Processing.Drawing.Processors
{
///
/// Using a brush and a shape fills shape with contents of brush the
diff --git a/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.Path.cs b/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.Path.cs
index 6c009169f..84bf26c51 100644
--- a/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.Path.cs
+++ b/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.Path.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.Fonts;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Shapes;
namespace SixLabors.ImageSharp.Processing.Text
diff --git a/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.cs b/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.cs
index 7e43fb17c..5731804ac 100644
--- a/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.cs
+++ b/src/ImageSharp.Drawing/Processing/Text/DrawTextExtensions.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using SixLabors.Fonts;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Primitives;
using SixLabors.Shapes;
diff --git a/tests/ImageSharp.Benchmarks/Drawing/DrawBeziers.cs b/tests/ImageSharp.Benchmarks/Drawing/DrawBeziers.cs
index 97db3fc49..d2f54f140 100644
--- a/tests/ImageSharp.Benchmarks/Drawing/DrawBeziers.cs
+++ b/tests/ImageSharp.Benchmarks/Drawing/DrawBeziers.cs
@@ -11,7 +11,7 @@ using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
namespace SixLabors.ImageSharp.Benchmarks
{
diff --git a/tests/ImageSharp.Benchmarks/Drawing/DrawLines.cs b/tests/ImageSharp.Benchmarks/Drawing/DrawLines.cs
index d12b064cb..a027108a1 100644
--- a/tests/ImageSharp.Benchmarks/Drawing/DrawLines.cs
+++ b/tests/ImageSharp.Benchmarks/Drawing/DrawLines.cs
@@ -3,7 +3,7 @@
// Licensed under the Apache License, Version 2.0.
//
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
namespace SixLabors.ImageSharp.Benchmarks
{
@@ -22,13 +22,13 @@ namespace SixLabors.ImageSharp.Benchmarks
[Benchmark(Baseline = true, Description = "System.Drawing Draw Lines")]
public void DrawPathSystemDrawing()
{
- using (Bitmap destination = new Bitmap(800, 800))
+ using (var destination = new Bitmap(800, 800))
{
- using (Graphics graphics = Graphics.FromImage(destination))
+ using (var graphics = Graphics.FromImage(destination))
{
graphics.InterpolationMode = InterpolationMode.Default;
graphics.SmoothingMode = SmoothingMode.AntiAlias;
- Pen pen = new Pen(System.Drawing.Color.HotPink, 10);
+ var pen = new Pen(System.Drawing.Color.HotPink, 10);
graphics.DrawLines(pen, new[] {
new PointF(10, 10),
new PointF(550, 50),
@@ -36,7 +36,7 @@ namespace SixLabors.ImageSharp.Benchmarks
});
}
- using (MemoryStream ms = new MemoryStream())
+ using (var ms = new MemoryStream())
{
destination.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
}
@@ -46,7 +46,7 @@ namespace SixLabors.ImageSharp.Benchmarks
[Benchmark(Description = "ImageSharp Draw Lines")]
public void DrawLinesCore()
{
- using (Image image = new Image(800, 800))
+ using (var image = new Image(800, 800))
{
image.Mutate(x => x.DrawLines(
Rgba32.HotPink,
@@ -57,7 +57,7 @@ namespace SixLabors.ImageSharp.Benchmarks
new Vector2(200, 400)
}));
- using (MemoryStream ms = new MemoryStream())
+ using (var ms = new MemoryStream())
{
image.SaveAsBmp(ms);
}
diff --git a/tests/ImageSharp.Benchmarks/Drawing/DrawPolygon.cs b/tests/ImageSharp.Benchmarks/Drawing/DrawPolygon.cs
index c020fabf2..ab690f645 100644
--- a/tests/ImageSharp.Benchmarks/Drawing/DrawPolygon.cs
+++ b/tests/ImageSharp.Benchmarks/Drawing/DrawPolygon.cs
@@ -11,6 +11,7 @@ using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
namespace SixLabors.ImageSharp.Benchmarks
diff --git a/tests/ImageSharp.Benchmarks/Drawing/FillPolygon.cs b/tests/ImageSharp.Benchmarks/Drawing/FillPolygon.cs
index 2ae104cd1..c53a97515 100644
--- a/tests/ImageSharp.Benchmarks/Drawing/FillPolygon.cs
+++ b/tests/ImageSharp.Benchmarks/Drawing/FillPolygon.cs
@@ -12,6 +12,7 @@ using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
namespace SixLabors.ImageSharp.Benchmarks
diff --git a/tests/ImageSharp.Benchmarks/Drawing/FillRectangle.cs b/tests/ImageSharp.Benchmarks/Drawing/FillRectangle.cs
index b0bee373b..7bd55e905 100644
--- a/tests/ImageSharp.Benchmarks/Drawing/FillRectangle.cs
+++ b/tests/ImageSharp.Benchmarks/Drawing/FillRectangle.cs
@@ -10,6 +10,7 @@ using BenchmarkDotNet.Attributes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
using CoreRectangle = SixLabors.Primitives.Rectangle;
using CoreSize = SixLabors.Primitives.Size;
diff --git a/tests/ImageSharp.Benchmarks/Drawing/FillWithPattern.cs b/tests/ImageSharp.Benchmarks/Drawing/FillWithPattern.cs
index 3d840de46..059398c6c 100644
--- a/tests/ImageSharp.Benchmarks/Drawing/FillWithPattern.cs
+++ b/tests/ImageSharp.Benchmarks/Drawing/FillWithPattern.cs
@@ -3,20 +3,22 @@
// Licensed under the Apache License, Version 2.0.
//
-using SixLabors.ImageSharp.Processing.Overlays;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.IO;
+
+using BenchmarkDotNet.Attributes;
+
+using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
+
+using CoreBrushes = SixLabors.ImageSharp.Processing.Drawing.Brushes.Brushes;
+
namespace SixLabors.ImageSharp.Benchmarks
{
- using System.Drawing;
- using System.Drawing.Drawing2D;
- using System.IO;
-
- using BenchmarkDotNet.Attributes;
- using SixLabors.ImageSharp.Drawing.Brushes;
- using CoreBrushes = ImageSharp.Drawing.Brushes.Brushes;
- using SixLabors.ImageSharp.PixelFormats;
- using SixLabors.ImageSharp.Processing;
public class FillWithPattern
{
@@ -29,7 +31,7 @@ namespace SixLabors.ImageSharp.Benchmarks
{
graphics.SmoothingMode = SmoothingMode.AntiAlias;
HatchBrush brush = new HatchBrush(HatchStyle.BackwardDiagonal, System.Drawing.Color.HotPink);
- graphics.FillRectangle(brush, new Rectangle(0,0, 800,800)); // can't find a way to flood fill with a brush
+ graphics.FillRectangle(brush, new Rectangle(0, 0, 800, 800)); // can't find a way to flood fill with a brush
}
using (MemoryStream ms = new MemoryStream())
{
diff --git a/tests/ImageSharp.Tests/Drawing/BeziersTests.cs b/tests/ImageSharp.Tests/Drawing/BeziersTests.cs
index f9483e18b..a0f62c4e7 100644
--- a/tests/ImageSharp.Tests/Drawing/BeziersTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/BeziersTests.cs
@@ -5,6 +5,7 @@ using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs b/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs
index 3138b8c70..993adb169 100644
--- a/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs
+++ b/tests/ImageSharp.Tests/Drawing/BlendedShapes.cs
@@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.Primitives;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs b/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs
index eb8e48b7e..cf65833ea 100644
--- a/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs
+++ b/tests/ImageSharp.Tests/Drawing/DrawImageTest.cs
@@ -5,7 +5,7 @@ using System;
using System.Numerics;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.Primitives;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/DrawPathTests.cs b/tests/ImageSharp.Tests/Drawing/DrawPathTests.cs
index 40b023e8d..dbf0e6ce9 100644
--- a/tests/ImageSharp.Tests/Drawing/DrawPathTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/DrawPathTests.cs
@@ -2,9 +2,10 @@
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.ImageSharp.Processing.Overlays;
using SixLabors.Shapes;
using Xunit;
@@ -17,18 +18,18 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPath()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "Path");
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
- LinearLineSegment linerSegemnt = new LinearLineSegment(
+ var linerSegemnt = new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300));
- CubicBezierLineSegment bazierSegment = new CubicBezierLineSegment(new Vector2(50, 300),
+ var bazierSegment = new CubicBezierLineSegment(new Vector2(50, 300),
new Vector2(500, 500),
new Vector2(60, 10),
new Vector2(10, 400));
- Path p = new Path(linerSegemnt, bazierSegment);
+ var p = new Path(linerSegemnt, bazierSegment);
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -52,23 +53,23 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "Path");
- Rgba32 color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
+ var color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
- LinearLineSegment linerSegemnt = new LinearLineSegment(
+ var linerSegemnt = new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)
);
- CubicBezierLineSegment bazierSegment = new CubicBezierLineSegment(new Vector2(50, 300),
+ var bazierSegment = new CubicBezierLineSegment(new Vector2(50, 300),
new Vector2(500, 500),
new Vector2(60, 10),
new Vector2(10, 400));
- Path p = new Path(linerSegemnt, bazierSegment);
+ var p = new Path(linerSegemnt, bazierSegment);
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -76,7 +77,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
image.Save($"{path}/Opacity.png");
//shift background color towards forground color by the opacity amount
- Rgba32 mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
+ var mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
using (PixelAccessor sourcePixels = image.Lock())
{
@@ -98,7 +99,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
using (var image = new Image(256, 256))
{
image.Mutate(x => x.Fill(Rgba32.Black));
- var pen = Pens.Solid(Rgba32.White, 5f);
+ Pen pen = Pens.Solid(Rgba32.White, 5f);
for (int i = 0; i < 300; i += 20)
{
diff --git a/tests/ImageSharp.Tests/Drawing/FillPatternTests.cs b/tests/ImageSharp.Tests/Drawing/FillPatternTests.cs
index 79bf91803..7db88e959 100644
--- a/tests/ImageSharp.Tests/Drawing/FillPatternTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/FillPatternTests.cs
@@ -2,12 +2,9 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.IO;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using Xunit;
@@ -22,7 +19,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
private void Test(string name, Rgba32 background, IBrush brush, Rgba32[,] expectedPattern)
{
string path = TestEnvironment.CreateOutputDirectory("Fill", "PatternBrush");
- using (Image image = new Image(20, 20))
+ using (var image = new Image(20, 20))
{
image.Mutate(x => x
.Fill(background)
@@ -33,15 +30,15 @@ namespace SixLabors.ImageSharp.Tests.Drawing
using (PixelAccessor sourcePixels = image.Lock())
{
// lets pick random spots to start checking
- Random r = new Random();
- DenseMatrix expectedPatternFast = new DenseMatrix(expectedPattern);
+ var r = new Random();
+ var expectedPatternFast = new DenseMatrix(expectedPattern);
int xStride = expectedPatternFast.Columns;
int yStride = expectedPatternFast.Rows;
int offsetX = r.Next(image.Width / xStride) * xStride;
int offsetY = r.Next(image.Height / yStride) * yStride;
- for (int x = 0; x < xStride; x++)
+ for (var x = 0; x < xStride; x++)
{
- for (int y = 0; y < yStride; y++)
+ for (var y = 0; y < yStride; y++)
{
int actualX = x + offsetX;
int actualY = y + offsetY;
diff --git a/tests/ImageSharp.Tests/Drawing/FillRegionProcessorTests.cs b/tests/ImageSharp.Tests/Drawing/FillRegionProcessorTests.cs
index 049ed7e1f..c995dd31b 100644
--- a/tests/ImageSharp.Tests/Drawing/FillRegionProcessorTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/FillRegionProcessorTests.cs
@@ -2,15 +2,16 @@
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
-using SixLabors.ImageSharp.Drawing.Pens;
-using SixLabors.ImageSharp.Drawing.Processors;
+
using Moq;
using Xunit;
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
using SixLabors.ImageSharp.Processing;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.Primitives;
namespace SixLabors.ImageSharp.Tests.Drawing
diff --git a/tests/ImageSharp.Tests/Drawing/FillSolidBrushTests.cs b/tests/ImageSharp.Tests/Drawing/FillSolidBrushTests.cs
index 88b6a8b25..aa360c893 100644
--- a/tests/ImageSharp.Tests/Drawing/FillSolidBrushTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/FillSolidBrushTests.cs
@@ -1,13 +1,9 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
using System.Numerics;
-using SixLabors.ImageSharp.Drawing;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Tests.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing;
using Xunit;
namespace SixLabors.ImageSharp.Tests.Drawing
@@ -21,12 +17,10 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeFloodFilledWithColorOnDefaultBackground()
{
string path = TestEnvironment.CreateOutputDirectory("Fill", "SolidBrush");
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
- image.Mutate(x => x
- .Fill(Rgba32.HotPink));
- image
- .Save($"{path}/DefaultBack.png");
+ image.Mutate(x => x.Fill(Rgba32.HotPink));
+ image.Save($"{path}/DefaultBack.png");
using (PixelAccessor sourcePixels = image.Lock())
{
@@ -41,7 +35,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeFloodFilledWithColor()
{
string path = TestEnvironment.CreateOutputDirectory("Fill", "SolidBrush");
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -61,9 +55,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeFloodFilledWithColorOpacity()
{
string path = TestEnvironment.CreateOutputDirectory("Fill", "SolidBrush");
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
- Rgba32 color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
+ var color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -71,7 +65,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
image.Save($"{path}/Opacity.png");
//shift background color towards forground color by the opacity amount
- Rgba32 mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
+ var mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
using (PixelAccessor sourcePixels = image.Lock())
diff --git a/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs b/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs
index 76e109c62..0e0df6844 100644
--- a/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/LineComplexPolygonTests.cs
@@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
-
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using SixLabors.Shapes;
using Xunit;
@@ -20,17 +20,17 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- Polygon simplePath = new Polygon(new LinearLineSegment(
+ var simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)));
- Polygon hole1 = new Polygon(new LinearLineSegment(
+ var hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(93, 85),
new Vector2(65, 137)));
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -67,17 +67,17 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPolygonOutlineNoOverlapping()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- Polygon simplePath = new Polygon(new LinearLineSegment(
+ var simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)));
- Polygon hole1 = new Polygon(new LinearLineSegment(
+ var hole1 = new Polygon(new LinearLineSegment(
new Vector2(207, 25),
new Vector2(263, 25),
new Vector2(235, 57)));
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -115,17 +115,17 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPolygonOutlineOverlapping()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- Polygon simplePath = new Polygon(new LinearLineSegment(
+ var simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)));
- Polygon hole1 = new Polygon(new LinearLineSegment(
+ var hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(130, 40),
new Vector2(65, 137)));
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -158,17 +158,17 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByPolygonOutlineDashed()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- Polygon simplePath = new Polygon(new LinearLineSegment(
+ var simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)));
- Polygon hole1 = new Polygon(new LinearLineSegment(
+ var hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(93, 85),
new Vector2(65, 137)));
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -182,18 +182,18 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedPolygonOutlineWithOpacity()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "LineComplexPolygon");
- Polygon simplePath = new Polygon(new LinearLineSegment(
+ var simplePath = new Polygon(new LinearLineSegment(
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)));
- Polygon hole1 = new Polygon(new LinearLineSegment(
+ var hole1 = new Polygon(new LinearLineSegment(
new Vector2(37, 85),
new Vector2(93, 85),
new Vector2(65, 137)));
- Rgba32 color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
+ var color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -201,7 +201,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
image.Save($"{path}/Opacity.png");
//shift background color towards forground color by the opacity amount
- Rgba32 mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
+ var mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
using (PixelAccessor sourcePixels = image.Lock())
{
diff --git a/tests/ImageSharp.Tests/Drawing/LineTests.cs b/tests/ImageSharp.Tests/Drawing/LineTests.cs
index 2048b6fe9..d7eb0b657 100644
--- a/tests/ImageSharp.Tests/Drawing/LineTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/LineTests.cs
@@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
-
-using SixLabors.ImageSharp.Drawing.Pens;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/FillPath.cs b/tests/ImageSharp.Tests/Drawing/Paths/FillPath.cs
index cf818765d..4713e63c2 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/FillPath.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/FillPath.cs
@@ -2,11 +2,11 @@
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.Shapes;
using Xunit;
@@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
GraphicsOptions noneDefault = new GraphicsOptions();
Rgba32 color = Rgba32.HotPink;
SolidBrush brush = Brushes.Solid(Rgba32.HotPink);
- IPath path = new SixLabors.Shapes.Path(new LinearLineSegment(new SixLabors.Primitives.PointF[] {
+ IPath path = new Path(new LinearLineSegment(new SixLabors.Primitives.PointF[] {
new Vector2(10,10),
new Vector2(20,10),
new Vector2(20,10),
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/FillPathCollection.cs b/tests/ImageSharp.Tests/Drawing/Paths/FillPathCollection.cs
index 0b4a5e0bf..526cf1b92 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/FillPathCollection.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/FillPathCollection.cs
@@ -1,15 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
-using SixLabors.ImageSharp;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.Shapes;
using Xunit;
@@ -20,13 +17,13 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
GraphicsOptions noneDefault = new GraphicsOptions();
Rgba32 color = Rgba32.HotPink;
SolidBrush brush = Brushes.Solid(Rgba32.HotPink);
- IPath path1 = new SixLabors.Shapes.Path(new LinearLineSegment(new SixLabors.Primitives.PointF[] {
+ IPath path1 = new Path(new LinearLineSegment(new SixLabors.Primitives.PointF[] {
new Vector2(10,10),
new Vector2(20,10),
new Vector2(20,10),
new Vector2(30,10),
}));
- IPath path2 = new SixLabors.Shapes.Path(new LinearLineSegment(new SixLabors.Primitives.PointF[] {
+ IPath path2 = new Path(new LinearLineSegment(new SixLabors.Primitives.PointF[] {
new Vector2(10,10),
new Vector2(20,10),
new Vector2(20,10),
@@ -45,7 +42,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
{
this.operations.Fill(this.brush, this.pathCollection);
- for (var i = 0; i < 2; i++)
+ for (int i = 0; i < 2; i++)
{
FillRegionProcessor processor = this.Verify>(i);
@@ -66,7 +63,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
{
this.operations.Fill(this.brush, this.pathCollection, this.noneDefault);
- for (var i = 0; i < 2; i++)
+ for (int i = 0; i < 2; i++)
{
FillRegionProcessor processor = this.Verify>(i);
@@ -85,7 +82,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
{
this.operations.Fill(this.color, this.pathCollection);
- for (var i = 0; i < 2; i++)
+ for (int i = 0; i < 2; i++)
{
FillRegionProcessor processor = this.Verify>(i);
@@ -105,7 +102,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
{
this.operations.Fill(this.color, this.pathCollection, this.noneDefault);
- for (var i = 0; i < 2; i++)
+ for (int i = 0; i < 2; i++)
{
FillRegionProcessor processor = this.Verify>(i);
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/FillPolygon.cs b/tests/ImageSharp.Tests/Drawing/Paths/FillPolygon.cs
index 9eacdff29..a1f083cf4 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/FillPolygon.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/FillPolygon.cs
@@ -2,12 +2,11 @@
// Licensed under the Apache License, Version 2.0.
using System.Numerics;
-
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.Shapes;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/FillRectangle.cs b/tests/ImageSharp.Tests/Drawing/Paths/FillRectangle.cs
index 429da5826..263eb9a9c 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/FillRectangle.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/FillRectangle.cs
@@ -1,11 +1,11 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Primitives;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using Xunit;
namespace SixLabors.ImageSharp.Tests.Drawing.Paths
@@ -20,75 +20,75 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
[Fact]
public void CorrectlySetsBrushAndRectangle()
{
- this.operations.Fill(brush, rectangle);
+ this.operations.Fill(this.brush, this.rectangle);
FillRegionProcessor processor = this.Verify>();
Assert.Equal(GraphicsOptions.Default, processor.Options);
ShapeRegion region = Assert.IsType(processor.Region);
- SixLabors.Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
- Assert.Equal(rect.Location.X, rectangle.X);
- Assert.Equal(rect.Location.Y, rectangle.Y);
- Assert.Equal(rect.Size.Width, rectangle.Width);
- Assert.Equal(rect.Size.Height, rectangle.Height);
+ Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
+ Assert.Equal(rect.Location.X, this.rectangle.X);
+ Assert.Equal(rect.Location.Y, this.rectangle.Y);
+ Assert.Equal(rect.Size.Width, this.rectangle.Width);
+ Assert.Equal(rect.Size.Height, this.rectangle.Height);
- Assert.Equal(brush, processor.Brush);
+ Assert.Equal(this.brush, processor.Brush);
}
[Fact]
public void CorrectlySetsBrushRectangleAndOptions()
{
- this.operations.Fill(brush, rectangle, noneDefault);
+ this.operations.Fill(this.brush, this.rectangle, this.noneDefault);
FillRegionProcessor processor = this.Verify>();
- Assert.Equal(noneDefault, processor.Options);
+ Assert.Equal(this.noneDefault, processor.Options);
ShapeRegion region = Assert.IsType(processor.Region);
- SixLabors.Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
- Assert.Equal(rect.Location.X, rectangle.X);
- Assert.Equal(rect.Location.Y, rectangle.Y);
- Assert.Equal(rect.Size.Width, rectangle.Width);
- Assert.Equal(rect.Size.Height, rectangle.Height);
+ Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
+ Assert.Equal(rect.Location.X, this.rectangle.X);
+ Assert.Equal(rect.Location.Y, this.rectangle.Y);
+ Assert.Equal(rect.Size.Width, this.rectangle.Width);
+ Assert.Equal(rect.Size.Height, this.rectangle.Height);
- Assert.Equal(brush, processor.Brush);
+ Assert.Equal(this.brush, processor.Brush);
}
[Fact]
public void CorrectlySetsColorAndRectangle()
{
- this.operations.Fill(color, rectangle);
+ this.operations.Fill(this.color, this.rectangle);
FillRegionProcessor processor = this.Verify>();
Assert.Equal(GraphicsOptions.Default, processor.Options);
ShapeRegion region = Assert.IsType(processor.Region);
- SixLabors.Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
- Assert.Equal(rect.Location.X, rectangle.X);
- Assert.Equal(rect.Location.Y, rectangle.Y);
- Assert.Equal(rect.Size.Width, rectangle.Width);
- Assert.Equal(rect.Size.Height, rectangle.Height);
+ Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
+ Assert.Equal(rect.Location.X, this.rectangle.X);
+ Assert.Equal(rect.Location.Y, this.rectangle.Y);
+ Assert.Equal(rect.Size.Width, this.rectangle.Width);
+ Assert.Equal(rect.Size.Height, this.rectangle.Height);
SolidBrush brush = Assert.IsType>(processor.Brush);
- Assert.Equal(color, brush.Color);
+ Assert.Equal(this.color, brush.Color);
}
[Fact]
public void CorrectlySetsColorRectangleAndOptions()
{
- this.operations.Fill(color, rectangle, noneDefault);
+ this.operations.Fill(this.color, this.rectangle, this.noneDefault);
FillRegionProcessor processor = this.Verify>();
- Assert.Equal(noneDefault, processor.Options);
+ Assert.Equal(this.noneDefault, processor.Options);
ShapeRegion region = Assert.IsType(processor.Region);
- SixLabors.Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
- Assert.Equal(rect.Location.X, rectangle.X);
- Assert.Equal(rect.Location.Y, rectangle.Y);
- Assert.Equal(rect.Size.Width, rectangle.Width);
- Assert.Equal(rect.Size.Height, rectangle.Height);
+ Shapes.RectangularePolygon rect = Assert.IsType(region.Shape);
+ Assert.Equal(rect.Location.X, this.rectangle.X);
+ Assert.Equal(rect.Location.Y, this.rectangle.Y);
+ Assert.Equal(rect.Size.Width, this.rectangle.Width);
+ Assert.Equal(rect.Size.Height, this.rectangle.Height);
SolidBrush brush = Assert.IsType>(processor.Brush);
- Assert.Equal(color, brush.Color);
+ Assert.Equal(this.color, brush.Color);
}
}
}
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/ShapePathTests.cs b/tests/ImageSharp.Tests/Drawing/Paths/ShapePathTests.cs
index 5d2e93e87..b474f6e47 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/ShapePathTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/ShapePathTests.cs
@@ -1,25 +1,10 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Collections.Generic;
-using System.Collections.Immutable;
-using System.IO;
-using System.Numerics;
-using SixLabors.ImageSharp;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
-using SixLabors.ImageSharp.Drawing.Processors;
-using SixLabors.ImageSharp.Processing;
-using Moq;
-using SixLabors.Shapes;
-using Xunit;
-
namespace SixLabors.ImageSharp.Tests.Drawing.Paths
{
public class ShapePathTests
{
- // TODO readd these back in
+ // TODO read these back in
}
}
diff --git a/tests/ImageSharp.Tests/Drawing/Paths/ShapeRegionTests.cs b/tests/ImageSharp.Tests/Drawing/Paths/ShapeRegionTests.cs
index d0912acee..2a9ab3412 100644
--- a/tests/ImageSharp.Tests/Drawing/Paths/ShapeRegionTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/Paths/ShapeRegionTests.cs
@@ -8,8 +8,6 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
using System;
using Moq;
-
- using SixLabors.ImageSharp.Drawing;
using SixLabors.Primitives;
using SixLabors.Shapes;
@@ -42,7 +40,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
[Fact]
public void ShapeRegionWithPathRetainsShape()
{
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
Assert.Equal(this.pathMock.Object, region.Shape);
}
@@ -50,7 +48,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
[Fact]
public void ShapeRegionFromPathConvertsBoundsProxyToShape()
{
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
Assert.Equal(Math.Floor(this.bounds.Left), region.Bounds.Left);
Assert.Equal(Math.Ceiling(this.bounds.Right), region.Bounds.Right);
@@ -61,7 +59,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
[Fact]
public void ShapeRegionFromPathMaxIntersectionsProxyToShape()
{
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
int i = region.MaxIntersections;
this.pathMock.Verify(x => x.MaxIntersections);
@@ -71,7 +69,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
public void ShapeRegionFromPathScanYProxyToShape()
{
int yToScan = 10;
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
this.pathMock
.Setup(
@@ -99,7 +97,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
public void ShapeRegionFromShapeScanYProxyToShape()
{
int yToScan = 10;
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
this.pathMock
.Setup(
@@ -126,7 +124,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
[Fact]
public void ShapeRegionFromShapeConvertsBoundsProxyToShape()
{
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
Assert.Equal(Math.Floor(this.bounds.Left), region.Bounds.Left);
Assert.Equal(Math.Ceiling(this.bounds.Right), region.Bounds.Right);
@@ -137,7 +135,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Paths
[Fact]
public void ShapeRegionFromShapeMaxIntersectionsProxyToShape()
{
- ShapeRegion region = new ShapeRegion(this.pathMock.Object);
+ var region = new ShapeRegion(this.pathMock.Object);
int i = region.MaxIntersections;
this.pathMock.Verify(x => x.MaxIntersections);
diff --git a/tests/ImageSharp.Tests/Drawing/PolygonTests.cs b/tests/ImageSharp.Tests/Drawing/PolygonTests.cs
index 318ce4fce..f6d9bf213 100644
--- a/tests/ImageSharp.Tests/Drawing/PolygonTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/PolygonTests.cs
@@ -6,6 +6,7 @@ using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
using SixLabors.ImageSharp.Processing;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/RecolorImageTest.cs b/tests/ImageSharp.Tests/Drawing/RecolorImageTest.cs
index 8fe26fff5..4a87ad189 100644
--- a/tests/ImageSharp.Tests/Drawing/RecolorImageTest.cs
+++ b/tests/ImageSharp.Tests/Drawing/RecolorImageTest.cs
@@ -1,9 +1,9 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.Primitives;
using Xunit;
@@ -18,7 +18,7 @@ namespace SixLabors.ImageSharp.Tests
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "RecolorImage");
- RecolorBrush brush = new RecolorBrush(Rgba32.Yellow, Rgba32.HotPink, 0.2f);
+ var brush = new RecolorBrush(Rgba32.Yellow, Rgba32.HotPink, 0.2f);
foreach (TestFile file in Files)
{
@@ -35,7 +35,7 @@ namespace SixLabors.ImageSharp.Tests
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "RecolorImage");
- RecolorBrush brush = new RecolorBrush(Rgba32.Yellow, Rgba32.HotPink, 0.2f);
+ var brush = new RecolorBrush(Rgba32.Yellow, Rgba32.HotPink, 0.2f);
foreach (TestFile file in Files)
{
diff --git a/tests/ImageSharp.Tests/Drawing/SolidBezierTests.cs b/tests/ImageSharp.Tests/Drawing/SolidBezierTests.cs
index 70b896cf8..7c75c2c44 100644
--- a/tests/ImageSharp.Tests/Drawing/SolidBezierTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/SolidBezierTests.cs
@@ -3,6 +3,7 @@
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.Shapes;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/SolidComplexPolygonTests.cs b/tests/ImageSharp.Tests/Drawing/SolidComplexPolygonTests.cs
index 759947eb0..39a7bac53 100644
--- a/tests/ImageSharp.Tests/Drawing/SolidComplexPolygonTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/SolidComplexPolygonTests.cs
@@ -4,6 +4,7 @@
using System.Numerics;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.Shapes;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/SolidPolygonTests.cs b/tests/ImageSharp.Tests/Drawing/SolidPolygonTests.cs
index 941c358b4..6eeed144c 100644
--- a/tests/ImageSharp.Tests/Drawing/SolidPolygonTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/SolidPolygonTests.cs
@@ -3,14 +3,15 @@
using System;
using System.Numerics;
-using SixLabors.ImageSharp.Drawing.Brushes;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.Shapes;
using Xunit;
namespace SixLabors.ImageSharp.Tests.Drawing
{
using SixLabors.ImageSharp.Processing;
+ using SixLabors.ImageSharp.Processing.Drawing.Brushes;
using SixLabors.ImageSharp.Processing.Overlays;
public class SolidPolygonTests : FileTestBase
@@ -25,7 +26,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
new Vector2(50, 300)
};
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.FillPolygon(Rgba32.HotPink, simplePath, new GraphicsOptions(true)));
@@ -42,13 +43,13 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByFilledPolygonWithPattern()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- SixLabors.Primitives.PointF[] simplePath = new SixLabors.Primitives.PointF[] {
+ var simplePath = new SixLabors.Primitives.PointF[] {
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)
};
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.FillPolygon(Brushes.Horizontal(Rgba32.HotPink), simplePath, new GraphicsOptions(true)));
@@ -65,13 +66,13 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByFilledPolygonNoAntialias()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- SixLabors.Primitives.PointF[] simplePath = new SixLabors.Primitives.PointF[] {
+ var simplePath = new SixLabors.Primitives.PointF[] {
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)
};
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -95,16 +96,16 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByFilledPolygonImage()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- SixLabors.Primitives.PointF[] simplePath = new SixLabors.Primitives.PointF[] {
+ var simplePath = new SixLabors.Primitives.PointF[] {
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)
};
using (Image brushImage = TestFile.Create(TestImages.Bmp.Car).CreateImage())
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
- ImageBrush brush = new ImageBrush(brushImage);
+ var brush = new ImageBrush(brushImage);
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -117,14 +118,14 @@ namespace SixLabors.ImageSharp.Tests.Drawing
public void ImageShouldBeOverlayedByFilledPolygonOpacity()
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- SixLabors.Primitives.PointF[] simplePath = new SixLabors.Primitives.PointF[] {
+ var simplePath = new SixLabors.Primitives.PointF[] {
new Vector2(10, 10),
new Vector2(200, 150),
new Vector2(50, 300)
};
- Rgba32 color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
+ var color = new Rgba32(Rgba32.HotPink.R, Rgba32.HotPink.G, Rgba32.HotPink.B, 150);
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -132,7 +133,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
image.Save($"{path}/Opacity.png");
//shift background color towards forground color by the opacity amount
- Rgba32 mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
+ var mergedColor = new Rgba32(Vector4.Lerp(Rgba32.Blue.ToVector4(), Rgba32.HotPink.ToVector4(), 150f / 255f));
using (PixelAccessor sourcePixels = image.Lock())
{
@@ -146,7 +147,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- using (Image image = new Image(500, 500))
+ using (var image = new Image(500, 500))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -173,7 +174,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- using (Image image = new Image(100, 100))
+ using (var image = new Image(100, 100))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -194,9 +195,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- Configuration config = Configuration.CreateDefaultInstance();
+ var config = Configuration.CreateDefaultInstance();
config.ParallelOptions.MaxDegreeOfParallelism = 1;
- using (Image image = new Image(config, 100, 100))
+ using (var image = new Image(config, 100, 100))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -210,9 +211,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- Configuration config = Configuration.CreateDefaultInstance();
+ var config = Configuration.CreateDefaultInstance();
config.ParallelOptions.MaxDegreeOfParallelism = 1;
- using (Image image = new Image(config, 100, 100))
+ using (var image = new Image(config, 100, 100))
{
image.Mutate(x => x
.BackgroundColor(Rgba32.Blue)
@@ -227,9 +228,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing
{
string path = TestEnvironment.CreateOutputDirectory("Drawing", "FilledPolygons");
- Configuration config = Configuration.CreateDefaultInstance();
+ var config = Configuration.CreateDefaultInstance();
config.ParallelOptions.MaxDegreeOfParallelism = 1;
- using (Image image = new Image(config, 200, 200))
+ using (var image = new Image(config, 200, 200))
{
image.Mutate(x => x
.Fill(Rgba32.Blue)
diff --git a/tests/ImageSharp.Tests/Drawing/Text/DrawText.Path.cs b/tests/ImageSharp.Tests/Drawing/Text/DrawText.Path.cs
index 939a5bd65..85503a552 100644
--- a/tests/ImageSharp.Tests/Drawing/Text/DrawText.Path.cs
+++ b/tests/ImageSharp.Tests/Drawing/Text/DrawText.Path.cs
@@ -1,18 +1,15 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Tests.Drawing.Paths;
using SixLabors.Fonts;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.ImageSharp.Processing.Text;
using SixLabors.Shapes;
using Xunit;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
namespace SixLabors.ImageSharp.Tests.Drawing.Text
{
@@ -44,7 +41,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
this.Font,
Brushes.Solid(Rgba32.Red),
null,
- path,
+ this.path,
new TextGraphicsOptions(true));
this.Verify>(0);
@@ -55,7 +52,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void FillsForEachACharachterWhenBrushSetAndNotPenDefaultOptions()
{
- this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), null, path);
+ this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), null, this.path);
this.Verify>(0);
this.Verify>(1);
@@ -65,7 +62,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void FillsForEachACharachterWhenBrushSet()
{
- this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), path, new TextGraphicsOptions(true));
+ this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), this.path, new TextGraphicsOptions(true));
this.Verify>(0);
this.Verify>(1);
@@ -75,7 +72,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void FillsForEachACharachterWhenBrushSetDefaultOptions()
{
- this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), path);
+ this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), this.path);
this.Verify>(0);
this.Verify>(1);
@@ -85,7 +82,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void FillsForEachACharachterWhenColorSet()
{
- this.operations.DrawText("123", this.Font, Rgba32.Red, path, new TextGraphicsOptions(true));
+ this.operations.DrawText("123", this.Font, Rgba32.Red, this.path, new TextGraphicsOptions(true));
var processor = this.Verify>(0);
this.Verify>(1);
@@ -98,9 +95,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void FillsForEachACharachterWhenColorSetDefaultOptions()
{
- this.operations.DrawText("123", this.Font, Rgba32.Red, path);
+ this.operations.DrawText("123", this.Font, Rgba32.Red, this.path);
- var processor = this.Verify>(0);
+ FillRegionProcessor processor = this.Verify>(0);
this.Verify>(1);
this.Verify>(2);
@@ -116,7 +113,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
this.Font,
null,
Pens.Dash(Rgba32.Red, 1),
- path,
+ this.path,
new TextGraphicsOptions(true));
var processor = this.Verify>(0);
@@ -127,7 +124,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void DrawForEachACharachterWhenPenSetAndNotBrushDefaultOptions()
{
- this.operations.DrawText("123", this.Font, null, Pens.Dash(Rgba32.Red, 1), path);
+ this.operations.DrawText("123", this.Font, null, Pens.Dash(Rgba32.Red, 1), this.path);
var processor = this.Verify>(0);
this.Verify>(1);
@@ -137,7 +134,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void DrawForEachACharachterWhenPenSet()
{
- this.operations.DrawText("123", this.Font, Pens.Dash(Rgba32.Red, 1), path, new TextGraphicsOptions(true));
+ this.operations.DrawText("123", this.Font, Pens.Dash(Rgba32.Red, 1), this.path, new TextGraphicsOptions(true));
var processor = this.Verify>(0);
this.Verify>(1);
@@ -147,9 +144,9 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void DrawForEachACharachterWhenPenSetDefaultOptions()
{
- this.operations.DrawText("123", this.Font, Pens.Dash(Rgba32.Red, 1), path);
+ this.operations.DrawText("123", this.Font, Pens.Dash(Rgba32.Red, 1), this.path);
- var processor = this.Verify>(0);
+ FillRegionProcessor processor = this.Verify>(0);
this.Verify>(1);
this.Verify>(2);
}
@@ -162,7 +159,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
this.Font,
Brushes.Solid(Rgba32.Red),
Pens.Dash(Rgba32.Red, 1),
- path,
+ this.path,
new TextGraphicsOptions(true));
var processor = this.Verify>(0);
@@ -176,7 +173,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void DrawForEachACharachterWhenPenSetAndFillFroEachWhenBrushSetDefaultOptions()
{
- this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), Pens.Dash(Rgba32.Red, 1), path);
+ this.operations.DrawText("123", this.Font, Brushes.Solid(Rgba32.Red), Pens.Dash(Rgba32.Red, 1), this.path);
var processor = this.Verify>(0);
this.Verify>(1);
@@ -194,7 +191,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
this.Font,
Brushes.Solid(Rgba32.Red),
Pens.Dash(Rgba32.Red, 1),
- path,
+ this.path,
new TextGraphicsOptions(true));
var processor = this.Verify>(0);
@@ -204,7 +201,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void BrushAppliesBeforPenDefaultOptions()
{
- this.operations.DrawText("1", this.Font, Brushes.Solid(Rgba32.Red), Pens.Dash(Rgba32.Red, 1), path);
+ this.operations.DrawText("1", this.Font, Brushes.Solid(Rgba32.Red), Pens.Dash(Rgba32.Red, 1), this.path);
var processor = this.Verify>(0);
this.Verify>(1);
diff --git a/tests/ImageSharp.Tests/Drawing/Text/DrawText.cs b/tests/ImageSharp.Tests/Drawing/Text/DrawText.cs
index 85234d0b5..058ce6f95 100644
--- a/tests/ImageSharp.Tests/Drawing/Text/DrawText.cs
+++ b/tests/ImageSharp.Tests/Drawing/Text/DrawText.cs
@@ -1,15 +1,12 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.Numerics;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Tests.Drawing.Paths;
using SixLabors.Fonts;
+using SixLabors.ImageSharp.Processing.Drawing.Brushes;
+using SixLabors.ImageSharp.Processing.Drawing.Pens;
+using SixLabors.ImageSharp.Processing.Drawing.Processors;
using SixLabors.ImageSharp.Processing.Text;
using SixLabors.Shapes;
using Xunit;
diff --git a/tests/ImageSharp.Tests/Drawing/Text/OutputText.cs b/tests/ImageSharp.Tests/Drawing/Text/OutputText.cs
index 908120d42..ec05b64ab 100644
--- a/tests/ImageSharp.Tests/Drawing/Text/OutputText.cs
+++ b/tests/ImageSharp.Tests/Drawing/Text/OutputText.cs
@@ -1,21 +1,14 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Collections.Generic;
-using System.IO;
using System.Numerics;
-using SixLabors.ImageSharp;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.ImageSharp.Drawing.Brushes;
-using SixLabors.ImageSharp.Drawing.Pens;
-using SixLabors.ImageSharp.Drawing.Processors;
+
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.Fonts;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Text;
-using SixLabors.Shapes;
+
using Xunit;
namespace SixLabors.ImageSharp.Tests.Drawing.Text
@@ -28,14 +21,14 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
public OutputText()
{
this.FontCollection = new FontCollection();
- this.Font = FontCollection.Install(TestFontUtilities.GetPath("SixLaborsSampleAB.woff")).CreateFont(12);
+ this.Font = this.FontCollection.Install(TestFontUtilities.GetPath("SixLaborsSampleAB.woff")).CreateFont(12);
}
[Fact]
public void DrawAB()
{
//draws 2 overlapping triangle glyphs twice 1 set on each line
- using (Image img = new Image(100, 200))
+ using (var img = new Image(100, 200))
{
img.Mutate(x => x.Fill(Rgba32.DarkBlue)
.DrawText("AB\nAB", new Font(this.Font, 50), Rgba32.Red, new Vector2(0, 0)));
diff --git a/tests/ImageSharp.Tests/Drawing/Text/TextGraphicsOptionsTests.cs b/tests/ImageSharp.Tests/Drawing/Text/TextGraphicsOptionsTests.cs
index dbbfa186e..d710229ff 100644
--- a/tests/ImageSharp.Tests/Drawing/Text/TextGraphicsOptionsTests.cs
+++ b/tests/ImageSharp.Tests/Drawing/Text/TextGraphicsOptionsTests.cs
@@ -1,13 +1,6 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Numerics;
-using System.Threading.Tasks;
-using SixLabors.ImageSharp.Drawing;
-using SixLabors.Fonts;
using SixLabors.ImageSharp.Processing.Text;
using Xunit;
@@ -19,7 +12,7 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void ExplicitCastOfGraphicsOptions()
{
- GraphicsOptions opt = new GraphicsOptions(false)
+ var opt = new GraphicsOptions(false)
{
AntialiasSubpixelDepth = 99
};
@@ -33,12 +26,12 @@ namespace SixLabors.ImageSharp.Tests.Drawing.Text
[Fact]
public void ImplicitCastToGraphicsOptions()
{
- TextGraphicsOptions textOptions = new TextGraphicsOptions(false)
+ var textOptions = new TextGraphicsOptions(false)
{
AntialiasSubpixelDepth = 99
};
- GraphicsOptions opt = (GraphicsOptions)textOptions;
+ var opt = (GraphicsOptions)textOptions;
Assert.False(opt.Antialias);
Assert.Equal(99, opt.AntialiasSubpixelDepth);
diff --git a/tests/ImageSharp.Tests/Issues/Issue412.cs b/tests/ImageSharp.Tests/Issues/Issue412.cs
index 8d4e360a5..f48696cd9 100644
--- a/tests/ImageSharp.Tests/Issues/Issue412.cs
+++ b/tests/ImageSharp.Tests/Issues/Issue412.cs
@@ -2,7 +2,7 @@
using Xunit;
using SixLabors.ImageSharp.PixelFormats;
-using SixLabors.ImageSharp.Processing.Overlays;
+using SixLabors.ImageSharp.Processing.Drawing;
namespace SixLabors.ImageSharp.Tests.Issues
{
diff --git a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/SolidProvider.cs b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/SolidProvider.cs
index c06902071..30902b4b0 100644
--- a/tests/ImageSharp.Tests/TestUtilities/ImageProviders/SolidProvider.cs
+++ b/tests/ImageSharp.Tests/TestUtilities/ImageProviders/SolidProvider.cs
@@ -4,6 +4,7 @@
using System;
using SixLabors.ImageSharp.PixelFormats;
+using SixLabors.ImageSharp.Processing.Drawing;
using SixLabors.ImageSharp.Processing.Overlays;
using Xunit.Abstractions;