1 | static BWImage clipBWImage(BWImage img, int x1, int y1, int w, int h) { |
2 | if (x1 == 0 && y1 == 0 && w == img.getWidth() && h == img.getHeight()) ret img; |
3 | BWImage img2 = new(w, h); |
4 | copyBWImage(img, x1, y1, img2, 0, 0, w, h); |
5 | ret img2; |
6 | } |
7 | |
8 | static BWImage clipBWImage(BWImage img, Rect r) { |
9 | ret clipBWImage(img, r.x, r.y, r.w, r.h); |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018779 |
Snippet name: | clipBWImage |
Eternal ID of this version: | #1018779/3 |
Text MD5: | d773b9fdccd5b62b4bab38e5383b5b49 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-14 13:36:41 |
Source code size: | 347 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 381 / 430 |
Version history: | 2 change(s) |
Referenced in: | [show references] |