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 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/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/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); diff --git a/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj b/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj index 261b437..72b6d58 100644 --- a/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj +++ b/test/KnowledgePicker.WordCloud.Tests/KnowledgePicker.WordCloud.Tests.csproj @@ -24,7 +24,7 @@ - +