Skip to content

Commit a4c7d06

Browse files
committed
revert field name
1 parent c02cc1c commit a4c7d06

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/ImageSharp.Drawing/Shapes/Text/BaseGlyphBuilder.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ internal class BaseGlyphBuilder : IGlyphRenderer
1717
/// The builder. TODO: Should this be a property?
1818
/// </summary>
1919
// ReSharper disable once InconsistentNaming
20-
protected readonly PathBuilder drawer;
20+
protected readonly PathBuilder builder;
2121
#pragma warning restore SA1401 // Fields should be private
2222
private readonly List<IPath> paths = new();
2323

2424
/// <summary>
2525
/// Initializes a new instance of the <see cref="BaseGlyphBuilder"/> class.
2626
/// </summary>
2727
public BaseGlyphBuilder()
28-
=> this.drawer = new PathBuilder();
28+
=> this.builder = new PathBuilder();
2929

3030
/// <summary>
3131
/// Gets the paths that have been rendered by this.
@@ -44,7 +44,7 @@ void IGlyphRenderer.BeginText(FontRectangle bounds)
4444
/// <inheritdoc/>
4545
bool IGlyphRenderer.BeginGlyph(FontRectangle bounds, GlyphRendererParameters paramaters)
4646
{
47-
this.drawer.Clear();
47+
this.builder.Clear();
4848
this.BeginGlyph(bounds);
4949
return true;
5050
}
@@ -53,7 +53,7 @@ bool IGlyphRenderer.BeginGlyph(FontRectangle bounds, GlyphRendererParameters par
5353
/// Begins the figure.
5454
/// </summary>
5555
void IGlyphRenderer.BeginFigure()
56-
=> this.drawer.StartFigure();
56+
=> this.builder.StartFigure();
5757

5858
/// <summary>
5959
/// Draws a cubic bezier from the current point to the <paramref name="point"/>
@@ -62,41 +62,41 @@ void IGlyphRenderer.BeginFigure()
6262
/// <param name="thirdControlPoint">The third control point.</param>
6363
/// <param name="point">The point.</param>
6464
void IGlyphRenderer.CubicBezierTo(Vector2 secondControlPoint, Vector2 thirdControlPoint, Vector2 point)
65-
=> this.drawer.CubicBezierTo(secondControlPoint, thirdControlPoint, point);
65+
=> this.builder.CubicBezierTo(secondControlPoint, thirdControlPoint, point);
6666

6767
/// <summary>
6868
/// Ends the glyph.
6969
/// </summary>
7070
void IGlyphRenderer.EndGlyph()
71-
=> this.paths.Add(this.drawer.Build());
71+
=> this.paths.Add(this.builder.Build());
7272

7373
/// <summary>
7474
/// Ends the figure.
7575
/// </summary>
7676
void IGlyphRenderer.EndFigure()
77-
=> this.drawer.CloseFigure();
77+
=> this.builder.CloseFigure();
7878

7979
/// <summary>
8080
/// Draws a line from the current point to the <paramref name="point"/>.
8181
/// </summary>
8282
/// <param name="point">The point.</param>
8383
void IGlyphRenderer.LineTo(Vector2 point)
84-
=> this.drawer.LineTo(point);
84+
=> this.builder.LineTo(point);
8585

8686
/// <summary>
8787
/// Moves to current point to the supplied vector.
8888
/// </summary>
8989
/// <param name="point">The point.</param>
9090
void IGlyphRenderer.MoveTo(Vector2 point)
91-
=> this.drawer.MoveTo(point);
91+
=> this.builder.MoveTo(point);
9292

9393
/// <summary>
9494
/// Draws a quadratics bezier from the current point to the <paramref name="point"/>
9595
/// </summary>
9696
/// <param name="secondControlPoint">The second control point.</param>
9797
/// <param name="point">The point.</param>
9898
void IGlyphRenderer.QuadraticBezierTo(Vector2 secondControlPoint, Vector2 point)
99-
=> this.drawer.QuadraticBezierTo(secondControlPoint, point);
99+
=> this.builder.QuadraticBezierTo(secondControlPoint, point);
100100

101101
/// <summary>Called before any glyphs have been rendered.</summary>
102102
/// <param name="rect">The bounds the text will be rendered at and at whats size.</param>

src/ImageSharp.Drawing/Shapes/Text/GlyphBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public GlyphBuilder()
2525
public GlyphBuilder(Vector2 origin)
2626
: base()
2727
{
28-
this.drawer.SetOrigin(origin);
28+
this.builder.SetOrigin(origin);
2929
}
3030
}
3131
}

src/ImageSharp.Drawing/Shapes/Text/PathGlyphBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected override void BeginGlyph(FontRectangle rect)
4545
// Due to how matrix combining works you have to combine this in the reverse order of operation
4646
// this one rotates the glype then moves it.
4747
Matrix3x2 matrix = Matrix3x2.CreateTranslation(targetPoint - rect.Location) * Matrix3x2.CreateRotation(point.Angle - Pi, point.Point);
48-
this.drawer.SetTransform(matrix);
48+
this.builder.SetTransform(matrix);
4949
}
5050
}
5151
}

0 commit comments

Comments
 (0)