README: Add cookbook section

This commit is contained in:
Starbeamrainbowlabs 2020-09-28 01:46:35 +01:00
parent 9a6b43c87d
commit 2e2e209ceb
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -71,6 +71,22 @@ Users who have sh (Bash works too) installed can use the `maze` wrapper script i
./maze maze -w 25 -h 25 ./maze maze -w 25 -h 25
``` ```
### Cookbook
#### Make an (almost) seamless texture
```
./maze maze_svg --scale 40 -w 31 -h 31 -f maze.svg
inkscape -o maze.png maze.svg
convert maze.png -crop 1080x1080+80+80 extract.png
```
The formula here for the crop is:
- **width:** w * scale - (scale * 4)
- **height:** h * scale - (scale * 4)
- **x offset:** scale * 2
- **y offset:** scale * 2
![(Horizontal line)](https://starbeamrainbowlabs.com/blog/images/20200831-mazes/hr.png) ![(Horizontal line)](https://starbeamrainbowlabs.com/blog/images/20200831-mazes/hr.png)
## Contributing ## Contributing