diff options
-rw-r--r-- | readme.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..1e1dccf --- /dev/null +++ b/readme.md | |||
@@ -0,0 +1,46 @@ | |||
1 | A experimental mouse based 1-bit pixel art editor, written | ||
2 | in Rust and SDL2. It reads and writes to a homemade image | ||
3 | format, [OBI](https://git.peppe.rs/graphics/obi). | ||
4 | |||
5 | ### Run | ||
6 | |||
7 | Requires SDL2 and SDL2_ttf. | ||
8 | |||
9 | ``` | ||
10 | # creates a new file if it dosen't exist | ||
11 | cargo run -- <filename>.obi | ||
12 | ``` | ||
13 | |||
14 | ### Usage | ||
15 | |||
16 | `z/c`: zoom in/out | ||
17 | `w/a/s/d`: pan up/left/down/right | ||
18 | `Shift-c`: fit iamge to window | ||
19 | `q/e`: increase/decrease brush size | ||
20 | `1/3`: increase/decrease dither level | ||
21 | `x`: flip color | ||
22 | `tab`: show/hide grid | ||
23 | `i`: invert pixmap (breaks undo for now) | ||
24 | `f`: draw line from last point of contact with grid | ||
25 | `v`: cycle symmetry options, horizontal, vertical, radial, none | ||
26 | `u/r`: undo/redo | ||
27 | |||
28 | ### Lisp REPL | ||
29 | |||
30 | Enter the REPL by pressing `(` on the keyboard. Complete the | ||
31 | lisp expression with a closing parenthesis and hit enter to | ||
32 | execute it. The REPL supports basic readline operations. | ||
33 | |||
34 | ``` | ||
35 | (define (fac n) (if (<= n 1) 1 (* n (fac (- n 1))))) | ||
36 | (fac 5) | ||
37 | ``` | ||
38 | |||
39 | #### Supported commands: | ||
40 | |||
41 | `(toggle-grid)`: similar to pressing `tab` on the keyboard | ||
42 | `(save <filename>)`: saves the current file. optional | ||
43 | argument to save to a different filename than the one opened | ||
44 | from. | ||
45 | `(quit)`: quit the [editor](editor) | ||
46 | |||