shrink
Description:
Shrinks (or grows) a rounded rectangle by moving the 4 sides according to the offsets given.
The corner radii will be changed in a way that tries to keep the center of the corner circle intact. This emulates CSS behavior.
This function also works for growing rounded rectangles if you pass negative values for the top
, right
, bottom
or left
.
Parameters:
this |
the rounded rectangle to shrink or grow |
top |
how far to move the top side downwards |
right |
how far to move the right side to the left |
bottom |
how far to move the bottom side upwards |
left |
how far to move the left side to the right |
Returns:
the resized rounded rectangle |