1 | static Rect rescaleRect(Rect r, int w1, int h1, int w2, int h2) { |
2 | if (r == null) null; |
3 | double x = doubleRatio(w2, w1), y = doubleRatio(h2, h1); |
4 | ret rectFromPoints(iround(r.x*x), iround(r.y*y), |
5 | iround(r.x2()*x), iround(r.y2()*y)); |
6 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018812 |
Snippet name: | rescaleRect |
Eternal ID of this version: | #1018812/3 |
Text MD5: | 9b5dcbf4605ea943f1daccbf9e84474c |
Author: | stefan |
Category: | javax / maths |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-27 14:09:17 |
Source code size: | 246 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 480 / 525 |
Version history: | 2 change(s) |
Referenced in: | [show references] |