-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Stamps with different sizes make trouble when using Shape Fill Tool #3533
Comments
I think the shape fill tool currently just fills the area with a grid based on the largest variation of the stamp. Since you're using it to draw lines in this case, could you try whether line drawing with the Stamp Brush works better (Shift modifier)? That one should not leave gaps, even with there are variations of different size. |
Thanks @bjorn for your quick reply. |
Ah, I think what's happening is, it iterates along the line you want to draw, and each time it tries to place a variation, it does an overlap check first. If the variation overlaps with previously placed tiles, it will skip the current location, and try again at the next location. This way, it can happen that a location gets skipped because of a larger variation, after which it can end up choosing a smaller variation at the next location, leaving a gap. I think for line drawing the fix is simple. Just don't choose a new variation at each point on the line, but only after actually placing a variation. |
This is also a small optimization since it avoids calling MapDocument::unifyTilesets when the stamp stays the same (which is usually the case, since drawing with multiple variations is rare). See issue #3533
Both the line drawing and filling should work much nicer now when variations have different sizes. There may still be gaps in some cases, as outlined in c4c165f. |
Describe the bug
When combining Stamps of different sizes like 3x2, 4x2, 6x2 (see screenshot below), and then using the Shape Fill Tool causes gaps like shown in the GIF below.
Expected behavior
One consistent stream of stamps with no gaps.
Media
![SHift](https://user-images.githubusercontent.com/1249266/204090890-9851162b-0a00-4e4d-a39c-a1a9330ac708.gif)
Specifications:
The text was updated successfully, but these errors were encountered: