Wobble icon indicating copy to clipboard operation
Wobble copied to clipboard

Fix Scaling Issues

Open Swan opened this issue 6 years ago • 4 comments

  • 1px issue shouldn't exist
  • Different aspect ratios should be supported out of the box

Swan avatar Apr 21 '19 15:04 Swan

Could you clarify what you mean by 1 px issue by providing screenshots and/or adding a test into Wobble.Tests? I found that it is surprisingly difficult to come up with a valid description and a test once I tried.

YaLTeR avatar Apr 21 '19 15:04 YaLTeR

Examples pulled directly from the Quaver client.

  1. The vertical divider line disappears at some resolutions
  2. The top menu bar line turns from 2px to 1px when changing resolutions - The bottom one is correct and preserves its original scale, but the top one is noticeably 1px off.

Swan avatar Apr 21 '19 16:04 Swan

Oh yeah I know that issue. It happens because when rectangles are drawn at fractional coordinates (like a rectangle with effective 1.5 px height) instead of being antialiased they are rounded, and the rounding is super weird and is something GPU-specific. It can be observed very well by the top and middle lines in the Scaling wobble test at lower resolutions. Maybe you know if there's any setting to turn on antialiasing instead of rounding?

YaLTeR avatar Apr 21 '19 18:04 YaLTeR