Skip to content

Commit de08b34

Browse files
Remove InnerJoin config, ensure WebGPU configuration coverage
1 parent f1ec587 commit de08b34

17 files changed

Lines changed: 583 additions & 524 deletions

src/ImageSharp.Drawing.WebGPU/Shaders/WgslSource/Shared/pathtag.wgsl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ const PATH_TAG_STYLE = 0x40u;
2121
const PATH_TAG_SUBPATH_END = 4u;
2222

2323
// Size of the `Style` data structure in words
24-
const STYLE_SIZE_IN_WORDS: u32 = 3u;
24+
const STYLE_SIZE_IN_WORDS: u32 = 5u;
2525

2626
const STYLE_FLAGS_STYLE: u32 = 0x80000000u;
2727
const STYLE_FLAGS_FILL: u32 = 0x40000000u;
28-
const STYLE_MITER_LIMIT_MASK: u32 = 0xFFFFu;
2928

3029
const STYLE_FLAGS_START_CAP_MASK: u32 = 0x0C000000u;
3130
const STYLE_FLAGS_END_CAP_MASK: u32 = 0x03000000u;

src/ImageSharp.Drawing.WebGPU/Shaders/WgslSource/flatten.wgsl

Lines changed: 175 additions & 108 deletions
Large diffs are not rendered by default.

src/ImageSharp.Drawing.WebGPU/WebGPUSceneEncoder.cs

Lines changed: 172 additions & 80 deletions
Large diffs are not rendered by default.

src/ImageSharp.Drawing/ImageSharp.Drawing.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
<None Include="..\..\shared-infrastructure\branding\icons\imagesharp.drawing\sixlabors.imagesharp.drawing.128.png" Pack="true" PackagePath="" />
4141
</ItemGroup>
4242
<ItemGroup>
43-
<PackageReference Include="SixLabors.Fonts" Version="3.0.0-alpha.0.41" />
44-
<PackageReference Include="SixLabors.ImageSharp" Version="4.0.0-alpha.0.94" />
45-
<PackageReference Include="SixLabors.PolygonClipper" Version="1.0.0-alpha.0.54" />
43+
<PackageReference Include="SixLabors.Fonts" Version="3.0.0-alpha.0.43" />
44+
<PackageReference Include="SixLabors.ImageSharp" Version="4.0.0-alpha.0.102" />
45+
<PackageReference Include="SixLabors.PolygonClipper" Version="1.0.0-alpha.0.55" />
4646
</ItemGroup>
4747

4848
<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />

src/ImageSharp.Drawing/InnerJoin.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/ImageSharp.Drawing/PolygonGeometry/StrokedShapeGenerator.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ private static PolygonClipper.StrokeOptions CreateStrokeOptions(StrokeOptions op
8484
{
8585
ArcDetailScale = options.ArcDetailScale,
8686
MiterLimit = options.MiterLimit,
87-
InnerMiterLimit = options.InnerMiterLimit,
8887
LineJoin = options.LineJoin switch
8988
{
9089
LineJoin.MiterRound => PolygonClipper.LineJoin.MiterRound,
@@ -94,14 +93,6 @@ private static PolygonClipper.StrokeOptions CreateStrokeOptions(StrokeOptions op
9493
_ => PolygonClipper.LineJoin.Miter,
9594
},
9695

97-
InnerJoin = options.InnerJoin switch
98-
{
99-
InnerJoin.Round => PolygonClipper.InnerJoin.Round,
100-
InnerJoin.Miter => PolygonClipper.InnerJoin.Miter,
101-
InnerJoin.Jag => PolygonClipper.InnerJoin.Jag,
102-
_ => PolygonClipper.InnerJoin.Bevel,
103-
},
104-
10596
LineCap = options.LineCap switch
10697
{
10798
LineCap.Round => PolygonClipper.LineCap.Round,

src/ImageSharp.Drawing/Processing/Backends/DefaultRasterizer.Stroke.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,9 +1539,7 @@ public StrokeStyle(Pen pen, float widthScale)
15391539
this.Width = pen.StrokeWidth * widthScale;
15401540
this.LineCap = pen.StrokeOptions.LineCap;
15411541
this.LineJoin = pen.StrokeOptions.LineJoin;
1542-
this.InnerJoin = pen.StrokeOptions.InnerJoin;
15431542
this.MiterLimit = pen.StrokeOptions.MiterLimit;
1544-
this.InnerMiterLimit = pen.StrokeOptions.InnerMiterLimit;
15451543
this.ArcDetailScale = pen.StrokeOptions.ArcDetailScale;
15461544
}
15471545

@@ -1565,21 +1563,11 @@ public StrokeStyle(Pen pen, float widthScale)
15651563
/// </summary>
15661564
public LineJoin LineJoin { get; }
15671565

1568-
/// <summary>
1569-
/// Gets the inner join style applied to contour corners.
1570-
/// </summary>
1571-
public InnerJoin InnerJoin { get; }
1572-
15731566
/// <summary>
15741567
/// Gets the outer miter limit expressed in stroke-width units.
15751568
/// </summary>
15761569
public double MiterLimit { get; }
15771570

1578-
/// <summary>
1579-
/// Gets the inner miter limit expressed in stroke-width units.
1580-
/// </summary>
1581-
public double InnerMiterLimit { get; }
1582-
15831571
/// <summary>
15841572
/// Gets the round join/cap tessellation detail scale.
15851573
/// </summary>

0 commit comments

Comments
 (0)