Transpiled version (2986L) is out of date.
1 | static Pt randomPt() { |
2 | ret randomPt(currentImage().getWidth(), currentImage().getHeight()); |
3 | } |
4 | |
5 | static Pt randomPt(BufferedImage img) { |
6 | ret img == null ? null : randomPt(img.getWidth(), img.getHeight()); |
7 | } |
8 | |
9 | static Pt randomPt(MakesBufferedImage img) { |
10 | ret img == null ? null : randomPt(img.getWidth(), img.getHeight()); |
11 | } |
12 | |
13 | static Pt randomPt(int w, int h default w) { |
14 | ret new Pt(random(w), random(h)); |
15 | } |
16 | |
17 | static Pt randomPt(Rect r) { |
18 | ret r == null ?: Pt(r.x+random(r.w), r.y+random(r.h)); |
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: | #1009140 |
Snippet name: | randomPt - random point in w/h, BufferedImage, Rect or currentImage() |
Eternal ID of this version: | #1009140/9 |
Text MD5: | bdb7915ea8c81a168df28052b7d5e44c |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-11-04 03:41:32 |
Source code size: | 517 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 482 / 619 |
Version history: | 8 change(s) |
Referenced in: | [show references] |