Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

37
LINES

< > BotCompany Repo | #1035713 // AbstractSSIList

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (15944L/94K).

1  
persistable asclass AbstractSSIList<MySSI extends AbstractSSI> extends NotifyingList<MySSI> is StringIO {
2  
  *() { init(); }
3  
  *(Cl<? extends AbstractSSI> l) { initAndAddAll(importSSIs(l)); }
4  
  
5  
  L<MySSI> importSSIs(Cl<? extends AbstractSSI> l) {
6  
    ret map importSSI(l);
7  
  }
8  
  
9  
  abstract MySSI importSSI(AbstractSSI ssi);
10  
  
11  
  BufferedImage render(WidthAndHeight size) {
12  
    ret renderAll(this, size);
13  
  }
14  
  
15  
  BufferedImage render(BufferedImage canvas) {
16  
    ret renderAll(this, canvas);
17  
  }
18  
  
19  
  BufferedImage renderOutlines(WidthAndHeight size) {
20  
    ret toSSIList().renderOutlines(size);
21  
  }
22  
  
23  
  SSIList toSSIList() {
24  
    ret new SSIList(map(this, -> .toSSI()));
25  
  }
26  
  
27  
  public void readWrite(StringHead head) {
28  
    head.exchangeAll(this);
29  
  }
30  
  
31  
  L<VectorSSI> vectorSSIs() { ret instancesOf VectorSSI(this); }
32  
  L<SSI> directSSIs aka literalSSIs() { ret instancesOf SSI(this); }
33  
  
34  
  Percent percentageVectorized() {
35  
    ret Percent.ratio(l(vectorSSIs()), l(this));
36  
  }
37  
}

Author comment

Began life as a copy of #1035711

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035713
Snippet name: AbstractSSIList
Eternal ID of this version: #1035713/8
Text MD5: 6deddca2b75f6d79a492ec0248ab02c3
Transpilation MD5: 50573023611012497bb532814b607a85
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-07-25 15:20:02
Source code size: 1018 bytes / 37 lines
Pitched / IR pitched: No / No
Views / Downloads: 105 / 171
Version history: 7 change(s)
Referenced in: [show references]