Reference Manual: (offline | online) Quickstart: (offline | online)

# Frame

Function: Frame( | image, xborder, yborder, tile=False)

Returns a displayable that is a frame, based on the supplied image filename. A frame is an image that is automatically rescaled to the size allocated to it. The image has borders that are only scaled in one axis. The region within xborder pixels of the left and right borders is only scaled in the y direction, while the region within yborder pixels of the top and bottom axis is scaled only in the x direction. The corners are not scaled at all, while the center of the image is scaled in both x and y directions.

image - The image (which may be a filename or image object) that will be scaled.

xborder - The number of pixels in the x direction to use as a border.

yborder - The number of pixels in the y direction to use as a border.

tile - If true, then tiling is performed rather then scaling.

For better performance, have the image share a dimension length in common with the size the frame will be rendered at. We detect this and avoid scaling if possible.

## Example

    init:
        $ style.frame.background = Frame("frame.png", 12, 12)

Reference Manual: (offline | online) Quickstart: (offline | online)