Package: graphene

Function graphene:rect-inset

Lambda List

graphene:rect-inset (r dx dy)

Arguments

r -- a graphene:rect-t instance
dx -- a number coerced to a float with the horizontal inset
dy -- a number coerced to a float with the vertical inset

Return Value

The graphene:rect-t instance with the inset rectangle

Details

Changes the given rectangle to be smaller, or larger depending on the given inset parameters. To create an inset rectangle, use positive dx or dy values. To create a larger, encompassing rectangle, use negative dx or dy values.

The origin of the rectangle is offset by dx and dy, while the size is adjusted by (2 * dx, 2 * dy). If dx and dy are positive values, the size of the rectangle is decreased. If dx and dy are negative values, the size of the rectangle is increased.

If the size of the resulting inset rectangle has a negative width or height then the size will be set to zero.
 

See also

#2023-12-9