with Center At
Creates a Rect around a center position.
This is equal to:
val cx = position.x.
val cy = position.y
val rect = RectF(cx - x, cy - y, cx + x, cy + y)
Content copied to clipboard
Parameters
position
The central position.
x
The distance from the center position to the right and left side.
y
The distance from the center position to the top and bottom side.
Creates a Rect around a center position.
This is equal to:
val cx = position.x.
val cy = position.y
val rect = RectF(cx - side, cy - side, cx + side, cy + side)
Content copied to clipboard
Parameters
position
The central position.
side
The distance from the center position to each rect side.