rectanglecenter(
LARGERECTANGLE
,
SMALLRECTANGLE
)

The rectanglecenter( function adjusts a rectangle so that it is centered inside of another rectangle.


Parameters

This function has two parameters:

largerectangle – the larger rectangle.

smallrectangle – the smaller rectangle.


Description

This function adjusts a rectangle so that it is centered inside of another rectangle. The procedure below creates a 1 inch square rectangle that is centered within the current screen dimensions.

MyRectangle=rectanglecenter(info("screenrectangle"),rectanglesize(0,0,72,72))

It’s actually possible for the “small” rectangle to be larger than the “large” rectangle. In that case, the “small” rectangle will be centered on the vertical and horizontal centers of the “large” rectangle. For example, this procedure will create a 2 inch rectangle that is centered on the currently pressed button.

MyRectangle=rectanglecenter(info("buttonrectangle"),rectanglesize(0,0,144,144)

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0