1 | static void rgbCopy(BufferedImage src, RGBImage dst, int dstX, int dstY) {
|
2 | rgbCopy(new RGBImage(src), dst, dstX, dstY); |
3 | } |
4 | |
5 | static void rgbCopy(RGBImage src, RGBImage dst, int dstX, int dstY) {
|
6 | int w = dst.getWidth()-dstX; |
7 | int h = dst.getHeight()-dstY; |
8 | w = min(w, src.getWidth()); |
9 | h = min(h, src.getHeight()); |
10 | for (int y = 0; y < h; y++) |
11 | for (int x = 0; x < w; x++) |
12 | dst.setPixel(dstX+x, dstY+y, src.getInt(x, y)); |
13 | } |
Began life as a copy of #1006079
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006675 |
| Snippet name: | rgbCopy - see copyRGBImage (could be merged) |
| Eternal ID of this version: | #1006675/2 |
| Text MD5: | d12218b6b32fd254af3650e105182574 |
| Author: | stefan |
| Category: | javax / images |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-02-21 13:37:37 |
| Source code size: | 452 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 770 / 818 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |