Package: gsk

Function gsk:rounded-rect-shrink

Lambda List

gsk:rounded-rect-shrink (rect top right bottom left)

Arguments

rect -- a gsk:rounded-rect instance
top -- a number coerced to a float how far to move the top side downwards
right -- a number coerced to a float how far to move the right side to the left
bottom -- a number coerced to a float how far to move the bottom side upwards
left -- a number coerced to a float how far to move the left side to the right

Return Value

The resized gsk:rounded-rect instance.

Details

Shrinks (or grows) the given 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 arguments.
 

See also

#2023-10-28