Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<ItemGroup>
<ProjectReference Include="..\Iot.Device.Bindings\Iot.Device.Bindings.csproj" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsLoggingAbstractionsPackageVersion)" />
<PackageReference Include="SkiaSharp" Version="3.119.2" />
<PackageReference Include="SkiaSharp" Version="4.148.0" />
<!-- The NativeAssets packages for Windows and MacOS are included in the above by default -->
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="3.119.2" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="4.148.0" />
<Content Include="$(RepoRoot)src/devices/README-nuget.md" Pack="true" Visible="false" PackagePath="\README.md" />
Comment on lines 20 to 25
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/devices/SkiaSharpAdapter/SkiaSharpAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SkiaSharp" Version="3.119.4" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="3.119.4" />
<PackageReference Include="SkiaSharp" Version="4.148.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="4.148.0" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions src/devices/SkiaSharpAdapter/SkiaSharpGraphicsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public static void DrawImage(this IGraphics graphics, BitmapImage source, int x,
{
var sourceBmp = (SkiaSharpBitmap)source;
var targetCanvas = GetCanvas(graphics);
targetCanvas.DrawBitmap(sourceBmp.WrappedBitmap, x, y, null);
targetCanvas.DrawBitmap(sourceBmp.WrappedBitmap, x, y, SKSamplingOptions.Default, null);
}

/// <summary>
Expand Down Expand Up @@ -166,7 +166,7 @@ public static BitmapImage Rotate(this BitmapImage source, double angle)
canvas.Translate(rotatedWidth / 2.0f, rotatedHeight / 2.0f);
canvas.RotateDegrees((float)angle);
canvas.Translate(-originalWidth / 2.0f, -originalHeight / 2.0f);
canvas.DrawBitmap(img.WrappedBitmap, new SKPoint());
canvas.DrawBitmap(img.WrappedBitmap, new SKPoint(), SKSamplingOptions.Default, null);
}

PixelFormat pf = img.WrappedBitmap.ColorType switch
Expand All @@ -191,7 +191,7 @@ public static void DrawImage(this IGraphics graphics, BitmapImage source, Rectan
var sourceBmp = (SkiaSharpBitmap)source;
var targetCanvas = GetCanvas(graphics);
targetCanvas.DrawBitmap(sourceBmp.WrappedBitmap, new SKRect(sourceRectangle.Left, sourceRectangle.Top, sourceRectangle.Right, sourceRectangle.Bottom),
new SKRect(targetRectangle.Left, targetRectangle.Top, targetRectangle.Right, targetRectangle.Bottom));
new SKRect(targetRectangle.Left, targetRectangle.Top, targetRectangle.Right, targetRectangle.Bottom), SKSamplingOptions.Default, null);
}

/// <summary>
Expand Down
Loading