static void darkenBWImagePart(BWImage img, Rect r) { darkenBWImagePart(img, r, 0.8f); } static void darkenBWImagePart(BWImage img, Rect r, float factor) { int x2 = r.x2(), y2 = r.y2(); for (int y = r.y; y < y2; y++) for (int x = r.x; x < x2; x++) img.setPixel(x, y, img.getPixel(x, y)*factor); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005707 |
Snippet name: | darkenBWImagePart (in place) |
Eternal ID of this version: | #1005707/3 |
Text MD5: | 17e51d1c64099a6d43e9e8bf212bb6e7 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-15 02:50:14 |
Source code size: | 321 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 524 / 550 |
Version history: | 2 change(s) |
Referenced in: | #1005710 - darkenBWImageParts (in place) #1006654 - Standard functions list 2 (LIVE, continuation of #761) |