From 25e643db1a7f2f6dea6502a5f63fa9a3f5247b4b Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 23 Jun 2026 22:10:49 +0000
Subject: [PATCH 1/4] Update SkiaSharp to v4
---
src/KnowledgePicker.WordCloud/KnowledgePicker.WordCloud.csproj | 2 +-
.../KnowledgePicker.WordCloud.Tests.csproj | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/KnowledgePicker.WordCloud/KnowledgePicker.WordCloud.csproj b/src/KnowledgePicker.WordCloud/KnowledgePicker.WordCloud.csproj
index 223f9cb..d0d39d5 100644
--- a/src/KnowledgePicker.WordCloud/KnowledgePicker.WordCloud.csproj
+++ b/src/KnowledgePicker.WordCloud/KnowledgePicker.WordCloud.csproj
@@ -28,7 +28,7 @@
-
+
diff --git a/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj b/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj
index 261b437..226b3dd 100644
--- a/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj
+++ b/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj
@@ -24,7 +24,7 @@
-
+
From e268b8700c007a9888f8727a4f6dfeb144cf3d7c Mon Sep 17 00:00:00 2001
From: Jan Jones
Date: Wed, 24 Jun 2026 20:46:45 +0200
Subject: [PATCH 2/4] Treat warnings as errors in CI
---
.github/workflows/main.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b624bb5..76f0c91 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -25,7 +25,7 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build
- run: dotnet build --no-restore
+ run: dotnet build --no-restore -warnaserror -p:TreatWarningsAsErrors=true
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Process test results
From 402285ac9751da3770d18cb4eec9bd5440470685 Mon Sep 17 00:00:00 2001
From: Jan Jones
Date: Wed, 24 Jun 2026 20:48:10 +0200
Subject: [PATCH 3/4] Replace obsolete APIs
---
README.md | 2 +-
examples/WordFrequency.ConsoleApp/Program.cs | 2 +-
src/KnowledgePicker.WordCloud/Drawing/SkGraphicEngine.cs | 2 +-
test/KnowledgePicker.WordCloud.Tests/IntegrationTests.cs | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 5a21e57..0711f0f 100644
--- a/README.md
+++ b/README.md
@@ -100,7 +100,7 @@
// Draw on white background.
canvas.Clear(SKColors.White);
using var bitmap = wcg.Draw();
- canvas.DrawBitmap(bitmap, 0, 0);
+ canvas.DrawBitmap(bitmap, 0, 0, SKSamplingOptions.Default);
// Save to PNG.
using var data = final.Encode(SKEncodedImageFormat.Png, 100);
diff --git a/examples/WordFrequency.ConsoleApp/Program.cs b/examples/WordFrequency.ConsoleApp/Program.cs
index 9e44b39..747e8bf 100644
--- a/examples/WordFrequency.ConsoleApp/Program.cs
+++ b/examples/WordFrequency.ConsoleApp/Program.cs
@@ -66,7 +66,7 @@ static int Main(string[] args)
using var canvas = new SKCanvas(final);
canvas.Clear(SKColors.White);
using var bitmap = wcg.Draw();
- canvas.DrawBitmap(bitmap, 0, 0);
+ canvas.DrawBitmap(bitmap, 0, 0, SKSamplingOptions.Default);
// Save to PNG.
using var data = final.Encode(SKEncodedImageFormat.Png, 100);
diff --git a/src/KnowledgePicker.WordCloud/Drawing/SkGraphicEngine.cs b/src/KnowledgePicker.WordCloud/Drawing/SkGraphicEngine.cs
index ac10789..3f38bb3 100644
--- a/src/KnowledgePicker.WordCloud/Drawing/SkGraphicEngine.cs
+++ b/src/KnowledgePicker.WordCloud/Drawing/SkGraphicEngine.cs
@@ -73,7 +73,7 @@ public void Draw(PointD location, RectangleD measured, string text, int count, s
textPaint.Color = defaultColor;
}
canvas.DrawText(text, (float)(location.X - measured.Left),
- (float)(location.Y - measured.Top), font, textPaint);
+ (float)(location.Y - measured.Top), SKTextAlign.Left, font, textPaint);
}
public IGraphicEngine Clone()
diff --git a/test/KnowledgePicker.WordCloud.Tests/IntegrationTests.cs b/test/KnowledgePicker.WordCloud.Tests/IntegrationTests.cs
index b61ccc7..cf2ca97 100644
--- a/test/KnowledgePicker.WordCloud.Tests/IntegrationTests.cs
+++ b/test/KnowledgePicker.WordCloud.Tests/IntegrationTests.cs
@@ -174,7 +174,7 @@ private static byte[] GenerateWordCloud(
using var canvas = new SKCanvas(final);
canvas.Clear(SKColors.White);
using var bitmap = wcg.Draw();
- canvas.DrawBitmap(bitmap, 0, 0);
+ canvas.DrawBitmap(bitmap, 0, 0, SKSamplingOptions.Default);
// Save to PNG.
using var data = final.Encode(SKEncodedImageFormat.Png, 100);
From f7ed7750242688889547d6050282a416f2358cf6 Mon Sep 17 00:00:00 2001
From: Jan Jones
Date: Wed, 24 Jun 2026 21:01:59 +0200
Subject: [PATCH 4/4] Switch to package that can load fonts
---
.../KnowledgePicker.WordCloud.Tests.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj b/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj
index 226b3dd..72b6d58 100644
--- a/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj
+++ b/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj
@@ -24,7 +24,7 @@
-
+