-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Gap-Removing Features #161
Conversation
PIXELPERFECT_ZOOM makes the scale an integer when zooming in to avoid floating point issues causing gaps. EXTRUDE_TILES extends each sprite by 1px in each dimension to cover any gaps caused by floating point issues.
why not make it do the pixel perfect zoom when the tracking is off? |
i know im not on the main team etc but it looks good to me. |
your reviews and opinions are welcome for these PRs |
- `stonesense`: added option ``EXTEND_TILES`` to slightly expand sprite to avoid gaps (on by default) | ||
- `stonesense`: added option ``PIXELPERFECT_ZOOM`` to change the zoom scale to avoid gaps (off by default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these two mutually exclusive? should they be an enum instead of two booleans?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not fully certain on that. One has an essentially invisible approach, and the other makes major changes to zoom/scaling. With how the options make changes in seemingly unrelated spots, I wasn't sure if they make sense to combine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fair enough. we will have a chance to re-evaluate our config choices when we move to toml as well.
Due to subpixel scaling, gaps could appear between tiles when zoomed in. This adds two new features which prevent these gaps from appearing.
EXTRUDE_TILES
(on by default) expands every sprite by 1px in each direction, preventing gaps with minimal visual difference.PIXELPERFECT_ZOOM
(off by default) changes the scaling algorithm for zoom to be pixel perfect, losing some granularity in the process. This zoom algorithm does not work nicely with following DFs native zoom, so it is off by default.Before:
After: