Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

19
LINES

< > BotCompany Repo | #1006777 // rgbMarkPoint - modifies original image

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5121L/33K).

1  
static RGBImage rgbMarkPoint(RGBImage img, Pt p, Color color, int size) {
2  
  if (img != null &&p != null)
3  
    rgbFillRect(img, p.x-size/2, p.y-size/2, size, size, color);
4  
  ret img;
5  
}
6  
7  
static RGBImage rgbMarkPoint(RGBImage img, Pt p) {
8  
  ret rgbMarkPoint(img, p, Color.red, 3);
9  
}
10  
11  
static RGBImage rgbMarkPoint(RGBImage img, int x, int y) {
12  
  ret rgbMarkPoint(img, new Pt(x, y));
13  
}
14  
15  
static BufferedImage rgbMarkPoint(BufferedImage img, Pt p, Color color, int size default 3) {
16  
  if (img != null &&p != null)
17  
    rgbFillRect(img, p.x-size/2, p.y-size/2, size, size, color);
18  
  ret img;
19  
}

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: #1006777
Snippet name: rgbMarkPoint - modifies original image
Eternal ID of this version: #1006777/8
Text MD5: 8ff6be6444fb7fe6de4d34aae3259945
Transpilation MD5: c7f25350ba5061163e8b93d0e404a151
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-12 02:33:41
Source code size: 601 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 574 / 651
Version history: 7 change(s)
Referenced in: [show references]