Libraryless. Click here for Pure Java version (10659L/62K).
1 | // NotifyingList is our new go-to way to wrap a list |
2 | // with additional functions. |
3 | persistable sclass SSIList extends NotifyingList<SSI> is ByteIO {
|
4 | *() { init(); }
|
5 | *(Cl<SSI> l) { initAndAddAll(l); }
|
6 | |
7 | public void readWrite(ByteHead head) {
|
8 | head.exchangeInt(-> size(), size -> addAll(repF(size, -> new SSI))); |
9 | head.exchangeAll(this); |
10 | } |
11 | |
12 | BufferedImage render(WidthAndHeight size) {
|
13 | ret renderAll(this, size); |
14 | } |
15 | |
16 | BufferedImage render(BufferedImage canvas) {
|
17 | ret renderAll(this, canvas); |
18 | } |
19 | |
20 | BufferedImage renderOutlines(WidthAndHeight size) {
|
21 | ret main render(size, g -> {
|
22 | g.setColor(Color.black); |
23 | for (ssi : this) ssi.drawOutline(g); |
24 | }); |
25 | } |
26 | } |
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035634 |
| Snippet name: | SSIList |
| Eternal ID of this version: | #1035634/12 |
| Text MD5: | a06ea515f5ae136461cda49cf61ca8e4 |
| Transpilation MD5: | 6571dbe9d178461c0a7f3a20839b668f |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-06-27 10:02:35 |
| Source code size: | 726 bytes / 26 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 651 / 835 |
| Version history: | 11 change(s) |
| Referenced in: | [show references] |