aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-03-27 08:29:41 +0000
committerAkshay <[email protected]>2021-03-27 08:29:41 +0000
commitc7cc1acddc9ca327d9bcc29888e2322e3b60c134 (patch)
tree23e1e2888e0b5055a77772885906640653d370d0
parentc50233df5e66296453a0cb46a1fab53e512f359a (diff)
add basic usage doc
-rw-r--r--readme.md46
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 @@
1A experimental mouse based 1-bit pixel art editor, written
2in Rust and SDL2. It reads and writes to a homemade image
3format, [OBI](https://git.peppe.rs/graphics/obi).
4
5### Run
6
7Requires SDL2 and SDL2_ttf.
8
9```
10# creates a new file if it dosen't exist
11cargo 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
30Enter the REPL by pressing `(` on the keyboard. Complete the
31lisp expression with a closing parenthesis and hit enter to
32execute 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
43argument to save to a different filename than the one opened
44from.
45`(quit)`: quit the [editor](editor)
46