Skip to content

Commit 8344111

Browse files
Cleanup
1 parent 9eb8dee commit 8344111

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

src/ImageSharp.Drawing/Processing/DrawingCanvas{TPixel}.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ public sealed partial class DrawingCanvas<TPixel> : IDrawingCanvas
5454
/// </summary>
5555
private readonly List<Image<TPixel>> pendingImageResources = [];
5656

57-
/// <summary>
58-
/// Indicates whether this canvas is the root owner of the target frame.
59-
/// Only the root canvas releases backend resources on dispose.
60-
/// </summary>
61-
private readonly bool isRoot;
62-
6357
/// <summary>
6458
/// Tracks whether this instance has already been disposed.
6559
/// </summary>
@@ -135,14 +129,12 @@ internal DrawingCanvas(
135129
/// <param name="targetFrame">The destination frame.</param>
136130
/// <param name="batcher">The command batcher used for deferred composition.</param>
137131
/// <param name="defaultState">The default state used when no scoped state is active.</param>
138-
/// <param name="isRoot">Whether this canvas is the root owner of the target frame.</param>
139132
private DrawingCanvas(
140133
Configuration configuration,
141134
IDrawingBackend backend,
142135
ICanvasFrame<TPixel> targetFrame,
143136
DrawingCanvasBatcher<TPixel> batcher,
144-
DrawingCanvasState defaultState,
145-
bool isRoot)
137+
DrawingCanvasState defaultState)
146138
{
147139
Guard.NotNull(configuration, nameof(configuration));
148140
Guard.NotNull(backend, nameof(backend));
@@ -159,7 +151,6 @@ private DrawingCanvas(
159151
this.backend = backend;
160152
this.targetFrame = targetFrame;
161153
this.batcher = batcher;
162-
this.isRoot = isRoot;
163154

164155
// Canvas coordinates are local to the current frame; origin stays at (0,0).
165156
this.Bounds = new Rectangle(0, 0, targetFrame.Bounds.Width, targetFrame.Bounds.Height);
@@ -1252,7 +1243,7 @@ private static IPath FlattenAndTransform(IPath path, Matrix4x4 matrix)
12521243
}
12531244

12541245
RectangleF totalBounds = new(minX, minY, maxX - minX, maxY - minY);
1255-
return new PreFlattenedCompositePath(subPaths.ToArray(), totalBounds);
1246+
return new PreFlattenedCompositePath([.. subPaths], totalBounds);
12561247
}
12571248

12581249
/// <summary>

src/ImageSharp.Drawing/Processing/RadialGradientBrush.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
namespace SixLabors.ImageSharp.Drawing.Processing;
5-
64
using System.Numerics;
75
using SixLabors.ImageSharp.Drawing.Helpers;
86
using SixLabors.ImageSharp.Memory;
97

8+
namespace SixLabors.ImageSharp.Drawing.Processing;
9+
1010
/// <summary>
1111
/// A radial gradient brush defined by either one circle or two circles.
1212
/// When one circle is provided, the gradient parameter is the distance from the center divided by the radius.

0 commit comments

Comments
 (0)