Skip to content

[Windows, 9.0.50] Stretching and squeezing a bitmap malfunctions by omitting the middle pixel column on some scale / zoom levels #3234

Open
@janne-hmp

Description

@janne-hmp

Description

We've noticed that at some zoom levels on Windows only, the stretching of the bitmap malfunctions by leaving out one pixel column altogether from the middle. In the attached videos, there are two very close zoom levels displaying the character breathing animation that slightly stretches and squeezes the player bitmap, where the first one works as intended while in the other the middle pixel column disappears sometimes.

WindowsScalingProblem.zip

This may be some sort of a rounding error. Happens only on Windows, possibly when scaled using Windows Display > Scale setting.

Code

Steps to reproduce:

  1. Clone the reproduction repository at https://github.com/hyvanmielenpelit/GnollHackMAUIEasyBuild
  2. Build it for Windows according to instructions
  3. Start the game, press Play Game, and create a character to start playing
  4. Choose a zoom level using the mouse wheel while focusing on your character
  5. At some zoom levels, the middle pixels are omitted in the breathing animations, as per the videos

Expected Behavior

The squeeze and stretching works the same way at all zoom levels without sometimes omitting the middle pixel column during the character breathing animation.

Actual Behavior

The squeeze and stretching in the character breathing animation omits sometimes the middle pixel column at some zoom levels.

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

Other (Please indicate in the description)

IDE / Editor

Visual Studio (Windows)

Platform / Operating System

Windows

Platform / Operating System Version

Windows 11

Devices

MSI Windows Laptop

Relevant Screenshots

See the attached videos.

Relevant Log Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions