Add a "stretch fill" tool for rectangles (here's how it should work)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
A stretch fill tool (or maybe a stretch mode for the shape fill tool) would be very useful, as has been commented many times. It's not instantly obvious how it should work, so I gave it some thought and figured it would be good to write it down:
The behavior should depend on the dimensions of the currently selected stamp:
- If three or more columns are selected, the leftmost and rightmost columns should be drawn once on the left and right borders of the drawn rectangle, and the columns between should be repeated.
- If exactly two columns are selected, one of them should be used as the border, and the other as the fill. Which is which depends on which way the user is drawing the rectangle. If they're going rightwards, the left column should be used drawn once, and the right column should be repeated, and vice versa.
- If exactly one column is selected, it should be repeated.
- The exact same behavior applies to rows on the other axis.
This would mean that 3×3 stamp would draw a completely bordered rectangle, a 2×3 stamp would omit the border on one side, and 2×2 would omit it on two sides, and 2×1 would draw it only on one side.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the shape fill tool and the code that handles the currently selected stamp while drawing rectangles. Compare the implementation with the specified behavior for one-, two-, and three-or-more-column or row selections, including drawing direction; done means stretch fill produces the described borders and repeated interior tiles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100