diff --git a/s340/2224.png b/s340/2224.png new file mode 100644 index 00000000..e8d305fb Binary files /dev/null and b/s340/2224.png differ diff --git a/s340/3302.png b/s340/3302.png new file mode 100644 index 00000000..10087edc Binary files /dev/null and b/s340/3302.png differ diff --git a/s340/3516.png b/s340/3516.png new file mode 100644 index 00000000..65bef06d Binary files /dev/null and b/s340/3516.png differ diff --git a/s340/3895.png b/s340/3895.png new file mode 100644 index 00000000..36617e46 Binary files /dev/null and b/s340/3895.png differ diff --git a/s340/data/unifont-11.0.02.bmp b/s340/data/unifont-11.0.02.bmp new file mode 100644 index 00000000..f56c2fa5 Binary files /dev/null and b/s340/data/unifont-11.0.02.bmp differ diff --git a/s340/data/unifont-11.0.02.png b/s340/data/unifont-11.0.02.png new file mode 100644 index 00000000..04fb6f2d Binary files /dev/null and b/s340/data/unifont-11.0.02.png differ diff --git a/s340/data/unifont_upper-11.0.02.bmp b/s340/data/unifont_upper-11.0.02.bmp new file mode 100644 index 00000000..a5c4136f Binary files /dev/null and b/s340/data/unifont_upper-11.0.02.bmp differ diff --git a/s340/s340.pyde b/s340/s340.pyde new file mode 100644 index 00000000..65cf8c6e --- /dev/null +++ b/s340/s340.pyde @@ -0,0 +1,42 @@ +from java.awt import Toolkit + +xo, yo = 100, 100 +xio, yio = 0, 0 +grid_size = 50 +s = 10 + +def setup(): + size(500, 500) + global img + img = loadImage("unifont-11.0.02.bmp") + +def draw(): + # KeyEvent.VK_CAPS_LOCK is 20 + capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(20) + if capsLocked: + image(img, xio, yio) + noFill() + rect(xio + xo, yio + yo, grid_size, grid_size) + else: + for x in range(grid_size): + for y in range(grid_size): + c = img.get(xo + x, yo + y) + fill(c) + rect(x * s, y * s, s, s) + +def keyPressed(): + global xo, yo, xio, yio + if keyCode == RIGHT and xo < img.width - 11: + xo += 10 + if keyCode == LEFT and xo > 10: + xo -= 10 + if keyCode == DOWN and yo < img.height - 11: + yo += 10 + if keyCode == UP and yo > 10: + yo -= 10 + if xo > width - grid_size: + xio = width - grid_size - xo + if yo > height - grid_size: + yio = height - grid_size - yo + if key == "s" or key == "S": + saveFrame("###.png")