@@ -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  class  LinearGradientBrush < TPixel >  :  AbstractGradientBrush < TPixel > 
14+     public  sealed   class  LinearGradientBrush < TPixel >  :  AbstractGradientBrush < 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  class  LinearGradientBrushApplicator  :  AbstractGradientBrushApplicator 
46+         private  sealed   class  LinearGradientBrushApplicator  :  AbstractGradientBrushApplicator 
4747        { 
4848            private  readonly  Point  start ; 
4949
@@ -147,30 +147,6 @@ protected override float PositionOnGradient(int x, int y)
147147            public  override  void  Dispose ( ) 
148148            { 
149149            } 
150- 
151-             internal  override  void  Apply ( Span < float >  scanline ,  int  x ,  int  y ) 
152-             { 
153-                 base . Apply ( scanline ,  x ,  y ) ; 
154- 
155-                 // TODO: we should at least(!) speed up the x=0 and y=0 special cases. 
156-                 // But in fact that could be done by special case Applicators directly: 
157-                 // - horizontal would apply a precalc. row independent of given row, 
158-                 // - vertical would get the color of the row once and fill the whole line. 
159- 
160-                 // Span<TPixel> destinationRow = this.Target.GetPixelRowSpan(y).Slice(x, scanline.Length); 
161-                 // MemoryManager memoryManager = this.Target.MemoryManager; 
162-                 // using (IBuffer<float> amountBuffer = memoryManager.Allocate<float>(scanline.Length)) 
163-                 // { 
164-                 //     Span<float> amountSpan = amountBuffer.Span; 
165-                 // 
166-                 //     for (int i = 0; i < scanline.Length; i++) 
167-                 //     { 
168-                 //         amountSpan[i] = scanline[i] * this.Options.BlendPercentage; 
169-                 //     } 
170-                 // 
171-                 //     this.Blender.Blend(memoryManager, destinationRow, destinationRow, this.Colors.Span, amountSpan); 
172-                 // } 
173-             } 
174150        } 
175151    } 
176152} 
0 commit comments