aboutsummaryrefslogtreecommitdiff
path: root/readme.md
blob: b9962b26e8912689c79454ff23b4f33326c5f00b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
A experimental mouse based 1-bit pixel art editor, written
in Rust and SDL2. It reads and writes to a homemade image
format, [OBI](https://git.peppe.rs/graphics/obi).

### Run

Requires SDL2 and SDL2_ttf. 

```shell
# creates a new file if it dosen't exist
cargo run -- <filename>.obi
```

### Usage

`z/c`: zoom in/out  
`w/a/s/d`: pan up/left/down/right  
`Shift-c`: fit iamge to window  
`q/e`: increase/decrease brush size  
`1/3`: increase/decrease dither level  
`x`: flip color  
`tab`: show/hide grid  
`i`: invert pixmap (breaks undo for now)  
`f`: draw line from last point of contact with grid  
`v`: cycle symmetry options, horizontal, vertical, radial, none  
`u/r`: undo/redo  

### Lisp REPL

Enter the REPL by pressing `(` on the keyboard. Complete the
lisp expression with a closing parenthesis and hit enter to
execute it. The REPL supports basic readline operations.

```lisp
(define (fac n) (if (<= n 1) 1 (* n (fac (- n 1)))))
(fac 5)
```

#### Supported commands:

`(toggle-grid)`: similar to pressing `tab` on the keyboard  
`(save <filename>)`: saves the current file. optional
argument to save to a different filename than the one opened
from.  
`(quit)`: quit the editor.