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

Use Tile::imageRect instead of cutting out tiles #3359

Merged
merged 1 commit into from
May 23, 2022

Conversation

bjorn
Copy link
Member

@bjorn bjorn commented May 17, 2022

Now that we're storing a sub-rectangle for each tile, we can use it to avoid actually cutting out the tiles from the tileset image.

Changing of a tile's image rect now also has its own undo command, and the tile image rect property is visible also for tiles from tileset-image based tilesets, though not editable for now.

@bjorn
Copy link
Member Author

bjorn commented May 17, 2022

@devnewton Since this is a follow-up on your PR #3339, I'd welcome any feedback. Apart from further simplifying the code, this is another step in the direction of resolving #1008.

@devnewton
Copy link
Contributor

The code looks fine. When multi sized tiles will be available, I can adapt my tileset to test it.

Now that we're storing a sub-rectangle for each tile, we can use it to
avoid actually cutting out the tiles from the tileset image.

Changing of a tile's image rect now also has its own undo command, and
the tile image rect property is visible also for tiles from
tileset-image based tilesets, though not editable for now.
@bjorn bjorn merged commit 7f7589e into mapeditor:master May 23, 2022
@bjorn bjorn deleted the subimage branch May 23, 2022 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants