1 | static Rect shrinkRect(Rect r, int pixels default 1) { |
2 | ret shrinkRect(pixels, pixels, r); |
3 | } |
4 | |
5 | static Rect shrinkRect(int x, int y, Rect r) { |
6 | ret new Rect(r.x+x, r.y+y, r.w-x*2, r.h-y*2); |
7 | } |
8 | |
9 | static Rect shrinkRect(int x, int y, int w, int h, int pixels) { |
10 | ret shrinkRect(Rect(x, y, w, h), pixels); |
11 | } |
Began life as a copy of #1006163
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: | #1010286 |
Snippet name: | shrinkRect - shrink on all sides |
Eternal ID of this version: | #1010286/5 |
Text MD5: | 54e20eb6fe7b6f0fdf5e712e80e6e0a6 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-28 23:51:40 |
Source code size: | 313 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 376 / 471 |
Version history: | 4 change(s) |
Referenced in: | [show references] |