@@ -135,21 +135,22 @@ private class CachingGlyphRenderer : IGlyphRenderer, IDisposable
135135
136136 private readonly PathBuilder builder ;
137137
138- private Point currentRenderPosition = default ;
139- private ( GlyphRendererParameters glyph , PointF subPixelOffset ) currentGlyphRenderParams = default ;
140- private readonly int offset = 0 ;
141- private PointF currentPoint = default ( PointF ) ;
138+ private Point currentRenderPosition ;
139+ private ( GlyphRendererParameters glyph , PointF subPixelOffset ) currentGlyphRenderParams ;
140+ private readonly int offset ;
141+ private PointF currentPoint ;
142142
143143 private readonly Dictionary < ( GlyphRendererParameters glyph , PointF subPixelOffset ) , GlyphRenderData >
144144 glyphData = new Dictionary < ( GlyphRendererParameters glyph , PointF subPixelOffset ) , GlyphRenderData > ( ) ;
145145
146- private readonly bool renderOutline = false ;
147- private readonly bool renderFill = false ;
148- private bool rasterizationRequired = false ;
146+ private readonly bool renderOutline ;
147+ private readonly bool renderFill ;
148+ private bool rasterizationRequired ;
149149
150150 public CachingGlyphRenderer ( MemoryAllocator memoryAllocator , int size , IPen pen , bool renderFill )
151151 {
152152 this . MemoryAllocator = memoryAllocator ;
153+ this . currentRenderPosition = default ;
153154 this . Pen = pen ;
154155 this . renderFill = renderFill ;
155156 this . renderOutline = pen != null ;
@@ -326,7 +327,7 @@ private Buffer2D<float> Render(IPath path)
326327 bool scanlineDirty = false ;
327328 float yPlusOne = y + 1 ;
328329
329- for ( float subPixel = ( float ) y ; subPixel < yPlusOne ; subPixel += subpixelFraction )
330+ for ( float subPixel = y ; subPixel < yPlusOne ; subPixel += subpixelFraction )
330331 {
331332 var start = new PointF ( path . Bounds . Left - 1 , subPixel ) ;
332333 var end = new PointF ( path . Bounds . Right + 1 , subPixel ) ;
0 commit comments