Skip to content
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

improve texture slicing; support non-symmetrical slicing #13488

Closed
wants to merge 2 commits into from
Closed

improve texture slicing; support non-symmetrical slicing #13488

wants to merge 2 commits into from

Conversation

JJJimbo1
Copy link
Contributor

@JJJimbo1 JJJimbo1 commented May 23, 2024

Objective

Previously, it was impossible to use a texture slicer when the 'center' was not in the exact center of the source image. This PR aims to fix that.

Solution

Changed the slicing algorithm to allow for non-symmetrical slicing.
Code cleanup.
Adjusted the relevant example to show that it's possible.
Fixed some bugs.

Before:
non-symmetrical_texture_slice_before

After:
non-symmetrical_texture_slice

Testing

I tested these changes using the ui_texture_slice example. As far as my testing goes, it works as intended, but it is possible I missed some weird edge case.


Changelog

Changed the texture slicing algorithm.
Changed the ui_texture_slice example.
Added panel-border-020.png asset to showcase the changes.

Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 23, 2024
@JJJimbo1 JJJimbo1 closed this Jun 19, 2024
@rparrett
Copy link
Contributor

Assuming this was closed because #13921 fixed the issue?

@JJJimbo1
Copy link
Contributor Author

Yes.

@rparrett
Copy link
Contributor

rparrett commented Jun 19, 2024

Cool, thanks. Sorry this one seemingly got lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants