1 | static L<S> petRender_lookup = ll( |
2 | "!\"#$%&'()*+,-./0123456789:;<=>?@", |
3 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`", |
4 | "abcdefghijklmnopqrstuvwxyz{|}~ "); |
5 | static BufferedImage petRender_image; |
6 | |
7 | static void petRender(BufferedImage canvas, int x, int y, char c) { |
8 | if (petRender_image == null) |
9 | petRender_image = loadImage2(#1008951); |
10 | Pair<Int, Int> yx = indexOfIndexOf(petRender_lookup, c); |
11 | if (yx == null) yx = pair(0, 0); |
12 | copyBufferedImage(petRender_image, yx.b*16, yx.a*16, |
13 | canvas, x, y, 16, 16); |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008952 |
Snippet name: | petRender - render with PET font (16*16) |
Eternal ID of this version: | #1008952/3 |
Text MD5: | 2b5c460ddda1da306d306cf86132018b |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-20 01:15:34 |
Source code size: | 524 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 531 / 577 |
Version history: | 2 change(s) |
Referenced in: | [show references] |