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).

static RGBImage rgbMarkPoint(RGBImage img, Pt p, Color color, int size) {
  if (img != null &&p != null)
    rgbFillRect(img, p.x-size/2, p.y-size/2, size, size, color);
  ret img;
}

static RGBImage rgbMarkPoint(RGBImage img, Pt p) {
  ret rgbMarkPoint(img, p, Color.red, 3);
}

static RGBImage rgbMarkPoint(RGBImage img, int x, int y) {
  ret rgbMarkPoint(img, new Pt(x, y));
}

static BufferedImage rgbMarkPoint(BufferedImage img, Pt p, Color color, int size default 3) {
  if (img != null &&p != null)
    rgbFillRect(img, p.x-size/2, p.y-size/2, size, size, color);
  ret img;
}

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: 497 / 553
Version history: 7 change(s)
Referenced in: [show references]