diff --git a/src/ImageSharp.Drawing/Brushes/Brushes.cs b/src/ImageSharp.Drawing/Drawing/Brushes/Brushes.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Brushes/Brushes.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/Brushes.cs
diff --git a/src/ImageSharp.Drawing/Brushes/IBrush.cs b/src/ImageSharp.Drawing/Drawing/Brushes/IBrush.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Brushes/IBrush.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/IBrush.cs
diff --git a/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs b/src/ImageSharp.Drawing/Drawing/Brushes/ImageBrush{TPixel}.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/ImageBrush{TPixel}.cs
index 320c94c96b..91965e62ea 100644
--- a/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Drawing/Brushes/ImageBrush{TPixel}.cs
@@ -4,7 +4,6 @@
using System;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Drawing.Brushes.Processors;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
@@ -43,9 +42,7 @@ namespace SixLabors.ImageSharp.Drawing.Brushes
///
public BrushApplicator CreateApplicator(ImageFrame source, RectangleF region, GraphicsOptions options)
- {
- return new ImageBrushApplicator(source, this.image, region, options);
- }
+ => new ImageBrushApplicator(source, this.image, region, options);
///
/// The image brush applicator.
diff --git a/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs b/src/ImageSharp.Drawing/Drawing/Brushes/PatternBrush{TPixel}.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/PatternBrush{TPixel}.cs
diff --git a/src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs b/src/ImageSharp.Drawing/Drawing/Brushes/Processors/BrushApplicator.cs
similarity index 93%
rename from src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/Processors/BrushApplicator.cs
index d8ea435586..78b394bf22 100644
--- a/src/ImageSharp.Drawing/Brushes/Processors/BrushApplicator.cs
+++ b/src/ImageSharp.Drawing/Drawing/Brushes/Processors/BrushApplicator.cs
@@ -31,12 +31,12 @@ namespace SixLabors.ImageSharp.Drawing.Brushes.Processors
}
///
- /// Gets the blendder
+ /// Gets the blender
///
internal PixelBlender Blender { get; }
///
- /// Gets the destinaion
+ /// Gets the destination
///
protected ImageFrame Target { get; }
@@ -48,8 +48,8 @@ namespace SixLabors.ImageSharp.Drawing.Brushes.Processors
///
/// Gets the color for a single pixel.
///
- /// The x cordinate.
- /// The y cordinate.
+ /// The x coordinate.
+ /// The y coordinate.
/// The a that should be applied to the pixel.
internal abstract TPixel this[int x, int y] { get; }
@@ -57,7 +57,7 @@ namespace SixLabors.ImageSharp.Drawing.Brushes.Processors
public abstract void Dispose();
///
- /// Applies the opactiy weighting for each pixel in a scanline to the target based on the pattern contained in the brush.
+ /// Applies the opacity weighting for each pixel in a scanline to the target based on the pattern contained in the brush.
///
/// The a collection of opacity values between 0 and 1 to be merged with the brushed color value before being applied to the target.
/// The x position in the target pixel space that the start of the scanline data corresponds to.
diff --git a/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs b/src/ImageSharp.Drawing/Drawing/Brushes/RecolorBrush{TPixel}.cs
similarity index 90%
rename from src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/RecolorBrush{TPixel}.cs
index 39afd965c8..ac2588038f 100644
--- a/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Drawing/Brushes/RecolorBrush{TPixel}.cs
@@ -5,7 +5,6 @@ using System;
using System.Numerics;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Drawing.Brushes.Processors;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
@@ -23,21 +22,18 @@ namespace SixLabors.ImageSharp.Drawing.Brushes
/// Initializes a new instance of the class.
///
/// Color of the source.
- /// Color of the target.
+ /// Color of the target.
/// The threshold as a value between 0 and 1.
- public RecolorBrush(TPixel sourceColor, TPixel targeTPixel, float threshold)
+ public RecolorBrush(TPixel sourceColor, TPixel targetColor, float threshold)
{
this.SourceColor = sourceColor;
this.Threshold = threshold;
- this.TargeTPixel = targeTPixel;
+ this.TargetColor = targetColor;
}
///
/// Gets the threshold.
///
- ///
- /// The threshold.
- ///
public float Threshold { get; }
///
@@ -51,15 +47,12 @@ namespace SixLabors.ImageSharp.Drawing.Brushes
///
/// Gets the target color.
///
- ///
- /// The color of the target.
- ///
- public TPixel TargeTPixel { get; }
+ public TPixel TargetColor { get; }
///
public BrushApplicator CreateApplicator(ImageFrame source, RectangleF region, GraphicsOptions options)
{
- return new RecolorBrushApplicator(source, this.SourceColor, this.TargeTPixel, this.Threshold, options);
+ return new RecolorBrushApplicator(source, this.SourceColor, this.TargetColor, this.Threshold, options);
}
///
@@ -158,8 +151,8 @@ namespace SixLabors.ImageSharp.Drawing.Brushes
int offsetX = x + i;
- // no doubt this one can be optermised further but I can't imagine its
- // actually being used and can probably be removed/interalised for now
+ // No doubt this one can be optimized further but I can't imagine its
+ // actually being used and can probably be removed/internalized for now
overlaySpan[i] = this[offsetX, y];
}
diff --git a/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs b/src/ImageSharp.Drawing/Drawing/Brushes/SolidBrush{TPixel}.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
rename to src/ImageSharp.Drawing/Drawing/Brushes/SolidBrush{TPixel}.cs
index 9630c707ef..3aff3aea15 100644
--- a/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Drawing/Brushes/SolidBrush{TPixel}.cs
@@ -2,10 +2,9 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.Numerics;
+
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Drawing.Brushes.Processors;
-using SixLabors.ImageSharp.Drawing.Processors;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.Primitives;
diff --git a/src/ImageSharp.Drawing/Pens/IPen.cs b/src/ImageSharp.Drawing/Drawing/Pens/IPen.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Pens/IPen.cs
rename to src/ImageSharp.Drawing/Drawing/Pens/IPen.cs
diff --git a/src/ImageSharp.Drawing/Pens/Pens.cs b/src/ImageSharp.Drawing/Drawing/Pens/Pens.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Pens/Pens.cs
rename to src/ImageSharp.Drawing/Drawing/Pens/Pens.cs
diff --git a/src/ImageSharp.Drawing/Pens/Pen{TPixel}.cs b/src/ImageSharp.Drawing/Drawing/Pens/Pen{TPixel}.cs
similarity index 98%
rename from src/ImageSharp.Drawing/Pens/Pen{TPixel}.cs
rename to src/ImageSharp.Drawing/Drawing/Pens/Pen{TPixel}.cs
index 74e4c6596d..d2748e1112 100644
--- a/src/ImageSharp.Drawing/Pens/Pen{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Drawing/Pens/Pen{TPixel}.cs
@@ -19,7 +19,7 @@ namespace SixLabors.ImageSharp.Drawing.Pens
/// section 1 will be width long (making a square) and will be filled by the brush
/// section 2 will be width * 2 long and will be empty
/// section 3 will be width/2 long and will be filled
- /// the the pattern will imidiatly repeat without gap.
+ /// the the pattern will immediately repeat without gap.
///
public class Pen : IPen
where TPixel : struct, IPixel
diff --git a/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj b/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
index 3e320dccc7..2c4a286d63 100644
--- a/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
+++ b/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
@@ -46,7 +46,7 @@
..\..\ImageSharp.ruleset
- SixLabors.ImageSharp.Drawing
+ SixLabors.ImageSharp
true
diff --git a/src/ImageSharp.Drawing/Region.cs b/src/ImageSharp.Drawing/Primitives/Region.cs
similarity index 95%
rename from src/ImageSharp.Drawing/Region.cs
rename to src/ImageSharp.Drawing/Primitives/Region.cs
index c5e7c1cfd4..c85e373fb3 100644
--- a/src/ImageSharp.Drawing/Region.cs
+++ b/src/ImageSharp.Drawing/Primitives/Region.cs
@@ -1,10 +1,9 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
-using System;
using SixLabors.Primitives;
-namespace SixLabors.ImageSharp.Drawing
+namespace SixLabors.ImageSharp.Primitives
{
///
/// Represents a region of an image.
diff --git a/src/ImageSharp.Drawing/DrawImage.cs b/src/ImageSharp.Drawing/Processing/Overlays/DrawImage.cs
similarity index 100%
rename from src/ImageSharp.Drawing/DrawImage.cs
rename to src/ImageSharp.Drawing/Processing/Overlays/DrawImage.cs
diff --git a/src/ImageSharp.Drawing/FillRegion.cs b/src/ImageSharp.Drawing/Processing/Overlays/FillRegion.cs
similarity index 99%
rename from src/ImageSharp.Drawing/FillRegion.cs
rename to src/ImageSharp.Drawing/Processing/Overlays/FillRegion.cs
index 343225ab09..b9fb8650a7 100644
--- a/src/ImageSharp.Drawing/FillRegion.cs
+++ b/src/ImageSharp.Drawing/Processing/Overlays/FillRegion.cs
@@ -5,6 +5,7 @@ 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;
namespace SixLabors.ImageSharp
diff --git a/src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs b/src/ImageSharp.Drawing/Processing/Overlays/Processors/DrawImageProcessor.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Processors/DrawImageProcessor.cs
rename to src/ImageSharp.Drawing/Processing/Overlays/Processors/DrawImageProcessor.cs
diff --git a/src/ImageSharp.Drawing/Processors/FillProcessor.cs b/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillProcessor.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Processors/FillProcessor.cs
rename to src/ImageSharp.Drawing/Processing/Overlays/Processors/FillProcessor.cs
diff --git a/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs b/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillRegionProcessor.cs
similarity index 99%
rename from src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
rename to src/ImageSharp.Drawing/Processing/Overlays/Processors/FillRegionProcessor.cs
index 40db43a02a..dfd66d7fc5 100644
--- a/src/ImageSharp.Drawing/Processors/FillRegionProcessor.cs
+++ b/src/ImageSharp.Drawing/Processing/Overlays/Processors/FillRegionProcessor.cs
@@ -7,6 +7,7 @@ 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.Processors;
using SixLabors.Primitives;
diff --git a/src/ImageSharp.Drawing/Paths/DrawBeziers.cs b/src/ImageSharp.Drawing/Processing/Paths/DrawBezierExtensions.cs
similarity index 97%
rename from src/ImageSharp.Drawing/Paths/DrawBeziers.cs
rename to src/ImageSharp.Drawing/Processing/Paths/DrawBezierExtensions.cs
index 268a8c3c52..7476f3a75a 100644
--- a/src/ImageSharp.Drawing/Paths/DrawBeziers.cs
+++ b/src/ImageSharp.Drawing/Processing/Paths/DrawBezierExtensions.cs
@@ -13,9 +13,9 @@ using SixLabors.Shapes;
namespace SixLabors.ImageSharp
{
///
- /// Extension methods for the type.
+ /// EAdds extensions that allow the drawing of Bezier paths to the type.
///
- public static partial class ImageExtensions
+ public static class DrawBezierExtensions
{
///
/// Draws the provided Points as an open Bezier path at the provided thickness with the supplied brush
diff --git a/src/ImageSharp.Drawing/Paths/DrawLines.cs b/src/ImageSharp.Drawing/Processing/Paths/DrawLines.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/DrawLines.cs
rename to src/ImageSharp.Drawing/Processing/Paths/DrawLines.cs
diff --git a/src/ImageSharp.Drawing/Paths/DrawPath.cs b/src/ImageSharp.Drawing/Processing/Paths/DrawPath.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/DrawPath.cs
rename to src/ImageSharp.Drawing/Processing/Paths/DrawPath.cs
diff --git a/src/ImageSharp.Drawing/Paths/DrawPathCollection.cs b/src/ImageSharp.Drawing/Processing/Paths/DrawPathCollection.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/DrawPathCollection.cs
rename to src/ImageSharp.Drawing/Processing/Paths/DrawPathCollection.cs
diff --git a/src/ImageSharp.Drawing/Paths/DrawPolygon.cs b/src/ImageSharp.Drawing/Processing/Paths/DrawPolygon.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/DrawPolygon.cs
rename to src/ImageSharp.Drawing/Processing/Paths/DrawPolygon.cs
diff --git a/src/ImageSharp.Drawing/Paths/DrawRectangle.cs b/src/ImageSharp.Drawing/Processing/Paths/DrawRectangle.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/DrawRectangle.cs
rename to src/ImageSharp.Drawing/Processing/Paths/DrawRectangle.cs
diff --git a/src/ImageSharp.Drawing/Paths/FillPathBuilder.cs b/src/ImageSharp.Drawing/Processing/Paths/FillPathBuilder.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/FillPathBuilder.cs
rename to src/ImageSharp.Drawing/Processing/Paths/FillPathBuilder.cs
diff --git a/src/ImageSharp.Drawing/Paths/FillPathCollection.cs b/src/ImageSharp.Drawing/Processing/Paths/FillPathCollection.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/FillPathCollection.cs
rename to src/ImageSharp.Drawing/Processing/Paths/FillPathCollection.cs
diff --git a/src/ImageSharp.Drawing/Paths/FillPaths.cs b/src/ImageSharp.Drawing/Processing/Paths/FillPaths.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/FillPaths.cs
rename to src/ImageSharp.Drawing/Processing/Paths/FillPaths.cs
diff --git a/src/ImageSharp.Drawing/Paths/FillPolygon.cs b/src/ImageSharp.Drawing/Processing/Paths/FillPolygon.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/FillPolygon.cs
rename to src/ImageSharp.Drawing/Processing/Paths/FillPolygon.cs
diff --git a/src/ImageSharp.Drawing/Paths/FillRectangle.cs b/src/ImageSharp.Drawing/Processing/Paths/FillRectangle.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/FillRectangle.cs
rename to src/ImageSharp.Drawing/Processing/Paths/FillRectangle.cs
diff --git a/src/ImageSharp.Drawing/Paths/ShapePath.cs b/src/ImageSharp.Drawing/Processing/Paths/ShapePath.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Paths/ShapePath.cs
rename to src/ImageSharp.Drawing/Processing/Paths/ShapePath.cs
diff --git a/src/ImageSharp.Drawing/Paths/ShapeRegion.cs b/src/ImageSharp.Drawing/Processing/Paths/ShapeRegion.cs
similarity index 92%
rename from src/ImageSharp.Drawing/Paths/ShapeRegion.cs
rename to src/ImageSharp.Drawing/Processing/Paths/ShapeRegion.cs
index cc27f7fbb8..9e1f1bc35d 100644
--- a/src/ImageSharp.Drawing/Paths/ShapeRegion.cs
+++ b/src/ImageSharp.Drawing/Processing/Paths/ShapeRegion.cs
@@ -2,9 +2,8 @@
// Licensed under the Apache License, Version 2.0.
using System;
-using System.Buffers;
-using System.Numerics;
-using SixLabors.ImageSharp.Memory;
+
+using SixLabors.ImageSharp.Primitives;
using SixLabors.Primitives;
using SixLabors.Shapes;
@@ -48,7 +47,7 @@ namespace SixLabors.ImageSharp.Drawing
var end = new PointF(this.Bounds.Right + 1, y);
// TODO: This is a temporary workaround because of the lack of Span API-s on IPath. We should use MemoryManager.Allocate() here!
- PointF[] innerBuffer = new PointF[buffer.Length];
+ var innerBuffer = new PointF[buffer.Length];
int count = this.Shape.FindIntersections(start, end, innerBuffer, 0);
for (int i = 0; i < count; i++)
diff --git a/src/ImageSharp.Drawing/Text/DrawText.Path.cs b/src/ImageSharp.Drawing/Processing/Text/DrawText.Path.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Text/DrawText.Path.cs
rename to src/ImageSharp.Drawing/Processing/Text/DrawText.Path.cs
diff --git a/src/ImageSharp.Drawing/Text/DrawText.cs b/src/ImageSharp.Drawing/Processing/Text/DrawText.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Text/DrawText.cs
rename to src/ImageSharp.Drawing/Processing/Text/DrawText.cs
diff --git a/src/ImageSharp.Drawing/Text/TextGraphicsOptions.cs b/src/ImageSharp.Drawing/Processing/Text/TextGraphicsOptions.cs
similarity index 100%
rename from src/ImageSharp.Drawing/Text/TextGraphicsOptions.cs
rename to src/ImageSharp.Drawing/Processing/Text/TextGraphicsOptions.cs