Open cgbeutler opened 2 years ago
Got it working on my fork here: https://github.com/prime31/Nez/commit/fcdb729d69b360b93f2bf9ef3e67ee60aacc2673
If the feature is actually desired by anyone else, then I can make a PR. This is what it looks like in action:
The red rectangle is the minimal area within the bleed size. When a multiple of that area can be displayed, it snaps up a zoom level.
There are nice
PixelPerfect
options for each policy except forBestFit
. It would be nice have best fit in there as well. With the rise of Ultra-wide monitors, settings likeNoBorderPixelPerfect
can get problematic.BestFitPixelPerfect
would allow the targetting of a range of sizes and aspect ratios all at once.As far as how it should work goes, it would match BestFit, but snap scaling to integer values.
For example, the following settings would be fairly ideal for most 2D games:
That setting snap up to a 2x zoom when 960 width and 768 height are surpassed, as the minimal area within the bleed padding can now fit in the window.
I could also see doing a
padSize
instead of ableedSize
, as additive rendering wiggle room may be simpler on the user than the subtractive nature of bleed. That would make it not matchBestFit
, though, so it'd have to have a different name.