Skip to content

Commit 0b8f34e

Browse files
committed
SixLabors#542: apply naming scheme for abstract classes
1 parent 0af611f commit 0b8f34e

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/ImageSharp.Drawing/Processing/Drawing/Brushes/GradientBrushes/EllipticGradientBrush{TPixel}.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.Processing.Drawing.Brushes.GradientBrushes
1212
/// the ratio between longest and shortest extension.
1313
/// </summary>
1414
/// <typeparam name="TPixel">The Pixel format that is used.</typeparam>
15-
public sealed class EllipticGradientBrush<TPixel> : AbstractGradientBrush<TPixel>
15+
public sealed class EllipticGradientBrush<TPixel> : GradientBrushBase<TPixel>
1616
where TPixel : struct, IPixel<TPixel>
1717
{
1818
private readonly Point center;
@@ -21,7 +21,7 @@ public sealed class EllipticGradientBrush<TPixel> : AbstractGradientBrush<TPixel
2121

2222
private readonly float axisRatio;
2323

24-
/// <inheritdoc cref="AbstractGradientBrush{TPixel}" />
24+
/// <inheritdoc cref="GradientBrushBase{TPixel}" />
2525
/// <param name="center">The center of the elliptical gradient and 0 for the color stops.</param>
2626
/// <param name="referenceAxisEnd">The end point of the reference axis of the ellipse.</param>
2727
/// <param name="axisRatio">
@@ -59,7 +59,7 @@ public override BrushApplicator<TPixel> CreateApplicator(
5959
this.RepetitionMode);
6060

6161
/// <inheritdoc />
62-
private sealed class RadialGradientBrushApplicator : AbstractGradientBrushApplicator
62+
private sealed class RadialGradientBrushApplicator : GradientBrushApplicatorBase
6363
{
6464
private readonly Point center;
6565

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ namespace SixLabors.ImageSharp.Processing.Drawing.Brushes.GradientBrushes
1111
/// Base class for Gradient brushes
1212
/// </summary>
1313
/// <typeparam name="TPixel">The pixel format</typeparam>
14-
public abstract class AbstractGradientBrush<TPixel> : IBrush<TPixel>
14+
public abstract class GradientBrushBase<TPixel> : IBrush<TPixel>
1515
where TPixel : struct, IPixel<TPixel>
1616
{
1717
/// <inheritdoc cref="IBrush{TPixel}"/>
1818
/// <param name="repetitionMode">Defines how the colors are repeated beyond the interval [0..1]</param>
1919
/// <param name="colorStops">The gradient colors.</param>
20-
protected AbstractGradientBrush(
20+
protected GradientBrushBase(
2121
GradientRepetitionMode repetitionMode,
2222
params ColorStop<TPixel>[] colorStops)
2323
{
@@ -44,20 +44,20 @@ public abstract BrushApplicator<TPixel> CreateApplicator(
4444
/// <summary>
4545
/// Base class for gradient brush applicators
4646
/// </summary>
47-
protected abstract class AbstractGradientBrushApplicator : BrushApplicator<TPixel>
47+
protected abstract class GradientBrushApplicatorBase : BrushApplicator<TPixel>
4848
{
4949
private readonly ColorStop<TPixel>[] colorStops;
5050

5151
private readonly GradientRepetitionMode repetitionMode;
5252

5353
/// <summary>
54-
/// Initializes a new instance of the <see cref="AbstractGradientBrushApplicator"/> class.
54+
/// Initializes a new instance of the <see cref="GradientBrushApplicatorBase"/> class.
5555
/// </summary>
5656
/// <param name="target">The target.</param>
5757
/// <param name="options">The options.</param>
5858
/// <param name="colorStops">An array of color stops sorted by their position.</param>
5959
/// <param name="repetitionMode">Defines if and how the gradient should be repeated.</param>
60-
protected AbstractGradientBrushApplicator(
60+
protected GradientBrushApplicatorBase(
6161
ImageFrame<TPixel> target,
6262
GraphicsOptions options,
6363
ColorStop<TPixel>[] colorStops,

src/ImageSharp.Drawing/Processing/Drawing/Brushes/GradientBrushes/LinearGradientBrush{TPixel}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace SixLabors.ImageSharp.Processing.Drawing.Brushes.GradientBrushes
1111
/// - a set of colors in relative distances to each other.
1212
/// </summary>
1313
/// <typeparam name="TPixel">The pixel format</typeparam>
14-
public sealed class LinearGradientBrush<TPixel> : AbstractGradientBrush<TPixel>
14+
public sealed class LinearGradientBrush<TPixel> : GradientBrushBase<TPixel>
1515
where TPixel : struct, IPixel<TPixel>
1616
{
1717
private readonly Point p1;
@@ -43,7 +43,7 @@ public override BrushApplicator<TPixel> CreateApplicator(ImageFrame<TPixel> sour
4343
/// <summary>
4444
/// The linear gradient brush applicator.
4545
/// </summary>
46-
private sealed class LinearGradientBrushApplicator : AbstractGradientBrushApplicator
46+
private sealed class LinearGradientBrushApplicator : GradientBrushApplicatorBase
4747
{
4848
private readonly Point start;
4949

src/ImageSharp.Drawing/Processing/Drawing/Brushes/GradientBrushes/RadialGradientBrush{TPixel}.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ namespace SixLabors.ImageSharp.Processing.Drawing.Brushes.GradientBrushes
99
/// A Circular Gradient Brush, defined by center point and radius.
1010
/// </summary>
1111
/// <typeparam name="TPixel">The pixel format.</typeparam>
12-
public sealed class RadialGradientBrush<TPixel> : AbstractGradientBrush<TPixel>
12+
public sealed class RadialGradientBrush<TPixel> : GradientBrushBase<TPixel>
1313
where TPixel : struct, IPixel<TPixel>
1414
{
1515
private readonly Point center;
1616

1717
private readonly float radius;
1818

19-
/// <inheritdoc cref="AbstractGradientBrush{TPixel}" />
19+
/// <inheritdoc cref="GradientBrushBase{TPixel}" />
2020
/// <param name="center">The center of the circular gradient and 0 for the color stops.</param>
2121
/// <param name="radius">The radius of the circular gradient and 1 for the color stops.</param>
2222
/// <param name="repetitionMode">Defines how the colors in the gradient are repeated.</param>
@@ -46,7 +46,7 @@ public override BrushApplicator<TPixel> CreateApplicator(
4646
this.RepetitionMode);
4747

4848
/// <inheritdoc />
49-
private sealed class RadialGradientBrushApplicator : AbstractGradientBrushApplicator
49+
private sealed class RadialGradientBrushApplicator : GradientBrushApplicatorBase
5050
{
5151
private readonly Point center;
5252

tests/ImageSharp.Tests/Drawing/FillLinearGradientBrushTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void WithEqualColorsReturnsUnicolorImage<TPixel>(TestImageProvider<TPixel
4141
new ColorStop<TPixel>(1, red));
4242

4343
image.Mutate(x => x.Fill(unicolorLinearGradientBrush));
44-
44+
4545
image.DebugSave(provider, appendPixelTypeToFileName: false, appendSourceFileOrDescription: false);
4646

4747
// no need for reference image in this test:
@@ -68,7 +68,7 @@ public void DoesNotDependOnSinglePixelType<TPixel>(TestImageProvider<TPixel> pro
6868
new ColorStop<TPixel>(1, NamedColors<TPixel>.Yellow));
6969

7070
image.Mutate(x => x.Fill(unicolorLinearGradientBrush));
71-
},
71+
},
7272
appendSourceFileOrDescription: false);
7373
}
7474

0 commit comments

Comments
 (0)