Browse Source

fix class name

af/merge-core
Scott Williams 9 years ago
parent
commit
49a4dd3cc0
  1. 2
      src/ImageSharp.Drawing/Pens/IPen.cs
  2. 6
      src/ImageSharp.Drawing/Pens/Pen{TColor}.cs
  3. 4
      src/ImageSharp.Drawing/Pens/Processors/PenApplicator.cs
  4. 2
      src/ImageSharp.Drawing/Processors/DrawPathProcessor.cs

2
src/ImageSharp.Drawing/Pens/IPen.cs

@ -26,6 +26,6 @@ namespace ImageSharp.Drawing.Pens
/// <remarks>
/// The <paramref name="region" /> when being applied to things like shapes would usually be the bounding box of the shape not necessarily the shape of the whole image.
/// </remarks>
IPenApplicator<TColor> CreateApplicator(PixelAccessor<TColor> pixelSource, RectangleF region);
PenApplicator<TColor> CreateApplicator(PixelAccessor<TColor> pixelSource, RectangleF region);
}
}

6
src/ImageSharp.Drawing/Pens/Pen{TColor}.cs

@ -111,7 +111,7 @@ namespace ImageSharp.Drawing.Pens
/// The <paramref name="region" /> when being applied to things like shapes would ussually be the
/// bounding box of the shape not necorserrally the shape of the whole image
/// </remarks>
public IPenApplicator<TColor> CreateApplicator(PixelAccessor<TColor> sourcePixels, RectangleF region)
public PenApplicator<TColor> CreateApplicator(PixelAccessor<TColor> sourcePixels, RectangleF region)
{
if (this.pattern == null || this.pattern.Length < 2)
{
@ -123,7 +123,7 @@ namespace ImageSharp.Drawing.Pens
return new PatternPenApplicator(sourcePixels, this.Brush, region, this.Width, this.pattern);
}
private class SolidPenApplicator : IPenApplicator<TColor>
private class SolidPenApplicator : PenApplicator<TColor>
{
private readonly BrushApplicator<TColor> brush;
private readonly float halfWidth;
@ -164,7 +164,7 @@ namespace ImageSharp.Drawing.Pens
}
}
private class PatternPenApplicator : IPenApplicator<TColor>
private class PatternPenApplicator : PenApplicator<TColor>
{
private readonly BrushApplicator<TColor> brush;
private readonly float halfWidth;

4
src/ImageSharp.Drawing/Pens/Processors/IPenApplicator.cs → src/ImageSharp.Drawing/Pens/Processors/PenApplicator.cs

@ -1,4 +1,4 @@
// <copyright file="IPenApplicator.cs" company="James Jackson-South">
// <copyright file="PenApplicator.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
@ -12,7 +12,7 @@ namespace ImageSharp.Drawing.Processors
/// primitive that converts a <see cref="PointInfo"/> into a color and a distance away from the drawable part of the path.
/// </summary>
/// <typeparam name="TColor">The type of the color.</typeparam>
public abstract class IPenApplicator<TColor> : IDisposable
public abstract class PenApplicator<TColor> : IDisposable
where TColor : struct, IPackedPixel, IEquatable<TColor>
{
/// <summary>

2
src/ImageSharp.Drawing/Processors/DrawPathProcessor.cs

@ -84,7 +84,7 @@ namespace ImageSharp.Drawing.Processors
protected override void OnApply(ImageBase<TColor> source, Rectangle sourceRectangle)
{
using (PixelAccessor<TColor> sourcePixels = source.Lock())
using (IPenApplicator<TColor> applicator = this.pen.CreateApplicator(sourcePixels, this.region))
using (PenApplicator<TColor> applicator = this.pen.CreateApplicator(sourcePixels, this.region))
{
var rect = RectangleF.Ceiling(applicator.RequiredRegion);

Loading…
Cancel
Save