1 | static bool rgbAllOneColor(RGBImage img, int x1, int y1, int w, int h) { |
2 | if (w == 0 || h == 0) true; |
3 | int color = img.getInt(x1, y1); |
4 | for y to h: for x to w: |
5 | if (img.getInt(x1+x, y1+y) != color) |
6 | false; |
7 | true; |
8 | } |
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: | #1006496 |
Snippet name: | rgbAllOneColor |
Eternal ID of this version: | #1006496/1 |
Text MD5: | 4c73a107380cebab0a4e70cc7c566b99 |
Author: | stefan |
Category: | javax / ocr |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-01-10 23:18:31 |
Source code size: | 233 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 432 / 453 |
Referenced in: | [show references] |