mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.14k stars 522 forks source link

[BUG] SKPaint's IsAntiAlisasing is on on Android but off on iOS by default (Xamarin / SkiaSharp 2.88.8) #2845

Open janne-hmp opened 3 weeks ago

janne-hmp commented 3 weeks ago

Description

IsAntiAlisasing seems to be off by default for iOS but on for Android. Workaround: Set IsAntiAliasing always on before using SKPaint.

Code

https://github.com/hyvanmielenpelit/GnollHack

Expected Behavior

IsAntiAliasing is on by default for both iOS and Android

Actual Behavior

IsAntiAliasing is off (or just does not work) by default for iOS and but on for Android

Version of SkiaSharp

2.88.3 (Current)

Last Known Good Version of SkiaSharp

2.80.x (Deprecated)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

iOS

Platform / Operating System Version

iOS 17.4.1

Devices

iPad 11,7

Relevant Screenshots

See https://github.com/mono/SkiaSharp/issues/2218 This was an antialiasing problem on iOS.

Relevant Log Output

No response

Code of Conduct

janne-hmp commented 3 weeks ago

This is regarding text drawing. Also, there's interesting observation. If you switch IsAntialiasing on before DrawText and then switch off after the command, the text seems to be drawn without antialiasing at least on SKGLView. If you set it permanently on, the text is drawn with antialiasing.