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

4
LINES

< > BotCompany Repo | #1006813 // randomScreenRect

JavaX fragment (include)

1  
static Rect randomScreenRect(int w, int h) {
2  
  Dimension screen = screenSize();
3  
  ret new Rect(random(screen.width-w), random(screen.height-h), min(w, screen.width), min(h, screen.height));
4  
}

Author comment

Began life as a copy of #1005345

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: #1006813
Snippet name: randomScreenRect
Eternal ID of this version: #1006813/1
Text MD5: ff747537c15d275d3a9bf37af1d29f7b
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-05 03:18:17
Source code size: 194 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 540 / 571
Referenced in: [show references]