static RGBImage renderColorPredicate(F1<Int, Bool> predicate, RGBImage img) { int w = img.getWidth(), h = img.getHeight(); RGBImage out = new(w, h); for y to h: for x to w: if (callF(predicate, img.getInt(x, y))) out.setPixel(x, y, Color.white); ret out; }
Began life as a copy of #1022943
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022944 |
Snippet name: | renderColorPredicate |
Eternal ID of this version: | #1022944/1 |
Text MD5: | 34d80960fa1c7cef0e6589f447a4fcaf |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-15 02:58:38 |
Source code size: | 290 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 267 / 303 |
Referenced in: | [show references] |