How to solve this Openfl canvas issue at browser zoom 25%

Please check this video. ( Note: My video recorder did not record the zoom-setting window in the url bar for the browser. So I did open it to set page at 25% but it’s invisible in the recording)
When any Openfl app is zoomed to 25% , it starts clipping inside the stage. And it happens even when resizing code is added at onResize event’s method.
Also if you notice there are some break points where it starts showing the app at 25% zoom too. But mostly it’s clipped.

Is this solvable?

1 Like

Can you test it?

The problem is not about scaling or width/height. This problem is sort of an invisible mask over the app. That clips the view. And any type of scaling or increase/decrease in width and height does not work. As everything hides behind the mask. Only happens at 25% zoom on medium size monitor. (100% to 33% works fine )
I am testing on 25% zoom because same issue is occurring on high resolution monitor at 100%. So I think this issue is somewhere related.

Can you send me a minimal reproduction example?

Here:

  1. Set browser at 100% zoom.
  2. Launch the app
  3. Set browser at 25% zoom
  4. Hit Refresh

It happens in both Chrome as well as Firefox

You haven’t tried my PR, have you? Your file requires permission.

I don’t understand where to make changes as mentioned on github issue. That seems to be an unrelated issue.

I opened the link:

I tested the example attached there
https://github.com/openfl/openfl/files/15276939/scissor_rect.zip

And it’s talking about a different thing. Some problem at 500% .
It’s not about clipping that occurs at 25% zoom.

Chiming in as an OpenFL committer. Just because the zoom value is different does not necessarily mean that your issue isn’t caused by the same bug that rainy is fixing in the PR. Both 500% and 25% are at the extremes of the zoom ranges, so it’s possible that they’re both affected by a badly calculated clipping rectangle.

There is also the same kind of issue with Starling see OpenFL/Starling touches and system zoom

Thx, Maste!
I have not solved it yet(
I need to move canvas inside html instead of viewport inside OpenFL/Starling(