Skip to content

Commit 2fbb74a

Browse files
Remove obsolete enforceFillOrientation flag
1 parent b796ece commit 2fbb74a

2 files changed

Lines changed: 4 additions & 17 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System.Collections.Concurrent;
55
using System.Runtime.InteropServices;
6+
using SixLabors.ImageSharp.Drawing.Processing.Backends;
67

78
namespace SixLabors.ImageSharp.Drawing.Processing;
89

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public void Fill(Brush brush, IPathCollection paths)
390390
Guard.NotNull(paths, nameof(paths));
391391
foreach (IPath path in paths)
392392
{
393-
this.EnqueueFillPath(brush, path, enforceFillOrientation: false);
393+
this.EnqueueFillPath(brush, path);
394394
}
395395
}
396396

@@ -407,7 +407,7 @@ public void Fill(Brush brush, IPath path)
407407
this.EnsureNotDisposed();
408408
Guard.NotNull(path, nameof(path));
409409
Guard.NotNull(brush, nameof(brush));
410-
this.EnqueueFillPath(brush, path, enforceFillOrientation: true);
410+
this.EnqueueFillPath(brush, path);
411411
}
412412

413413
/// <inheritdoc />
@@ -466,7 +466,6 @@ public void Process(IPath path, Action<IImageProcessingContext> operation)
466466
brush,
467467
effectiveOptions,
468468
RasterizerSamplingOrigin.PixelBoundary,
469-
enforceFillOrientation: false,
470469
state.ClipPaths);
471470
}
472471

@@ -536,7 +535,6 @@ public void Draw(Pen pen, IPath path)
536535
pen.StrokeFill,
537536
effectiveOptions,
538537
RasterizerSamplingOrigin.PixelCenter,
539-
enforceFillOrientation: false,
540538
state.ClipPaths,
541539
pen);
542540
}
@@ -942,7 +940,6 @@ private void DrawImageCore(
942940
brush,
943941
commandOptions,
944942
RasterizerSamplingOrigin.PixelBoundary,
945-
enforceFillOrientation: false,
946943
commandClipPaths);
947944
}
948945
finally
@@ -962,18 +959,13 @@ private void DrawImageCore(
962959
/// <param name="brush">Brush used for shading.</param>
963960
/// <param name="options">Effective drawing options.</param>
964961
/// <param name="samplingOrigin">Rasterizer sampling origin.</param>
965-
/// <param name="enforceFillOrientation">
966-
/// When <see langword="true"/>, preparation normalizes closed contour orientation before rasterization.
967-
/// Preserving incoming contour order is required for text and other pre-authored compound paths.
968-
/// </param>
969962
/// <param name="clipPaths">Optional clip paths to apply during preparation.</param>
970963
/// <param name="pen">Optional pen for stroke commands.</param>
971964
private void PrepareCompositionCore(
972965
IPath path,
973966
Brush brush,
974967
DrawingOptions options,
975968
RasterizerSamplingOrigin samplingOrigin,
976-
bool enforceFillOrientation,
977969
IReadOnlyList<IPath>? clipPaths = null,
978970
Pen? pen = null)
979971
{
@@ -1008,7 +1000,6 @@ private void PrepareCompositionCore(
10081000
in rasterizerOptions,
10091001
shapeOptions,
10101002
options.Transform,
1011-
enforceFillOrientation,
10121003
this.targetFrame.Bounds.Location,
10131004
pen,
10141005
clipPaths));
@@ -1019,10 +1010,7 @@ private void PrepareCompositionCore(
10191010
/// </summary>
10201011
/// <param name="brush">Brush used for shading.</param>
10211012
/// <param name="path">Path to fill.</param>
1022-
/// <param name="enforceFillOrientation">
1023-
/// Whether preparation should normalize closed contour winding for this specific fill.
1024-
/// </param>
1025-
private void EnqueueFillPath(Brush brush, IPath path, bool enforceFillOrientation)
1013+
private void EnqueueFillPath(Brush brush, IPath path)
10261014
{
10271015
this.EnsureNotDisposed();
10281016
Guard.NotNull(path, nameof(path));
@@ -1036,7 +1024,6 @@ private void EnqueueFillPath(Brush brush, IPath path, bool enforceFillOrientatio
10361024
brush,
10371025
state.Options,
10381026
RasterizerSamplingOrigin.PixelBoundary,
1039-
enforceFillOrientation,
10401027
state.ClipPaths);
10411028
}
10421029

@@ -1290,7 +1277,6 @@ private CompositionCommand CreateCompositionCommand(
12901277
in rasterizerOptions,
12911278
shapeOptions,
12921279
Matrix4x4.Identity,
1293-
enforceFillOrientation: false,
12941280
destinationOffset,
12951281
pen,
12961282
clipPaths);

0 commit comments

Comments
 (0)