1 | // factor = 0.75 or something |
2 | static Rectangle centerScreenPart(double factor) { |
3 | int x = screenWidth(), y = screenHeight(); |
4 | int w = iround(x*factor), h = iround(y*factor); |
5 | ret new Rectangle((x-w)/2, (y-h)/2, w, h); |
6 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005663 |
Snippet name: | centerScreenPart |
Eternal ID of this version: | #1005663/1 |
Text MD5: | 77aae0f79f552c9b4cf9f4e6865b469e |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-02 15:44:30 |
Source code size: | 227 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 494 / 541 |
Referenced in: | [show references] |