Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
- name: Install wasm-tools
run: dotnet workload install wasm-tools wasm-experimental
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion build/SkiaSharp.HarfBuzz.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.8" />
<PackageReference Include="SkiaSharp.HarfBuzz" Version="3.116.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/SkiaSharp.Linux.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.8" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="3.116.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion build/SkiaSharp.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="SkiaSharp" Version="2.88.8" />
<PackageReference Include="SkiaSharp" Version="3.116.1" />
</ItemGroup>
</Project>
18 changes: 7 additions & 11 deletions src/Svg.Skia/SkiaModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,6 @@ public SkiaSharp.SKShaderTileMode ToSKShaderTileMode(SKShaderTileMode shaderTile
}
}

public SkiaSharp.SKImageFilter.CropRect? ToCropRect(SKImageFilter.CropRect? cropRect)
{
return cropRect is null ? null : new(ToSKRect(cropRect.Rect));
}

public SkiaSharp.SKColorChannel ToSKColorChannel(SKColorChannel colorChannel)
{
return colorChannel switch
Expand Down Expand Up @@ -622,11 +617,13 @@ public SkiaSharp.SKColorChannel ToSKColorChannel(SKColorChannel colorChannel)
return null;
}

var sampling = new SkiaSharp.SKSamplingOptions(SkiaSharp.SKCubicResampler.Mitchell);

return SkiaSharp.SKImageFilter.CreateImage(
ToSKImage(imageImageFilter.Image),
ToSKRect(imageImageFilter.Src),
ToSKRect(imageImageFilter.Dst),
SkiaSharp.SKFilterQuality.High);
sampling);
}
case MatrixConvolutionImageFilter matrixConvolutionImageFilter:
{
Expand Down Expand Up @@ -690,12 +687,11 @@ public SkiaSharp.SKColorChannel ToSKColorChannel(SKColorChannel colorChannel)
return null;
}

var shader = paintImageFilter.Paint.Shader ?? SKShader.CreateColor(paintImageFilter.Paint.Color!.Value, SKColorSpace.Srgb);

return paintImageFilter.Clip is { } clip
? SkiaSharp.SKImageFilter.CreatePaint(
ToSKPaint(paintImageFilter.Paint),
ToSKRect(clip.Rect))
: SkiaSharp.SKImageFilter.CreatePaint(
ToSKPaint(paintImageFilter.Paint));
? SkiaSharp.SKImageFilter.CreateShader(ToSKShader(shader), dither: false, cropRect: ToSKRect(clip.Rect))
: SkiaSharp.SKImageFilter.CreateShader(ToSKShader(shader), dither: false);
}
case ShaderImageFilter shaderImageFilter:
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-4.final" PrivateAssets="all" />
<PackageReference Include="ExCSS" Version="4.2.3" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="SkiaSharp" Version="2.88.8" GeneratePathProperty="true" />
<PackageReference Include="SkiaSharp" Version="3.116.1" GeneratePathProperty="true" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions tests/Svg.Skia.UnitTests/resvgTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ private void TestImpl(string name, double errorThreshold, float scaleX = 1.5f, f
[InlineData("e-feSpotLight-002", 0.022)]
[InlineData("e-feSpotLight-003", 0.022)]
[InlineData("e-feSpotLight-004", 0.022)]
[InlineData("e-feSpotLight-005", 0.022)]
[InlineData("e-feSpotLight-005", 0.022, Skip = "TODO")]
[InlineData("e-feSpotLight-006", 0.022, Skip = "TODO")]
[InlineData("e-feSpotLight-007", 0.022, Skip = "TODO")]
[InlineData("e-feSpotLight-008", 0.022, Skip = "TODO")]
Expand All @@ -1062,12 +1062,12 @@ private void TestImpl(string name, double errorThreshold, float scaleX = 1.5f, f
public void e_feSpotLight(string name, double errorThreshold) => TestImpl(name, errorThreshold);

[Theory]
[InlineData("e-feTile-001", 0.022)]
[InlineData("e-feTile-002", 0.022)]
[InlineData("e-feTile-001", 0.055)]
[InlineData("e-feTile-002", 0.055)]
[InlineData("e-feTile-003", 0.022, Skip = "TODO")]
[InlineData("e-feTile-004", 0.022)]
[InlineData("e-feTile-004", 0.022, Skip = "TODO")]
[InlineData("e-feTile-005", 0.022, Skip = "TODO")]
[InlineData("e-feTile-006", 0.022)]
[InlineData("e-feTile-006", 0.022, Skip = "TODO")]
[InlineData("e-feTile-007", 0.022, Skip = "TODO")]
public void e_feTile(string name, double errorThreshold) => TestImpl(name, errorThreshold);

Expand Down