22 lines
1.0 KiB
Markdown
22 lines
1.0 KiB
Markdown
|
|
# Generated figures — do not edit
|
||
|
|
|
||
|
|
**Every PNG in this directory is output, not an asset.** Each one is produced by running
|
||
|
|
the BASIC listing shown immediately above it in the chapter, through
|
||
|
|
`tools/screenshot.c`, and it is checked in only because a reader on the forge has no
|
||
|
|
build tree to generate it from.
|
||
|
|
|
||
|
|
To change a picture, **change the listing** and regenerate:
|
||
|
|
|
||
|
|
```sh
|
||
|
|
cmake --build build-akgl --target docs_screenshots
|
||
|
|
```
|
||
|
|
|
||
|
|
Editing a PNG here by hand puts the picture out of step with the code it illustrates,
|
||
|
|
which is the exact failure this arrangement exists to prevent — and the `docs_screenshots`
|
||
|
|
test will fail on it, because it re-renders every figure and compares byte for byte.
|
||
|
|
|
||
|
|
The tag that ties a figure to its listing is `screenshot=NAME` in the fence info string,
|
||
|
|
and `MAINTENANCE.md` documents it along with `size=WxH` for a figure that needs a surface
|
||
|
|
other than 320 by 200. A tagged block with no image here fails `docs_examples` in both
|
||
|
|
build configurations, so a figure cannot be added to a chapter and then forgotten.
|