< Previous | Contents | Next >

Description

The RectangleControl is an on screen preview control which displays a simple rectangle. The RectangleControl is added to an Input by adding the INPID_PreviewControl attribute to the AddInput function’s attribute table.

If you use the RCD_LockAspect attribute below, then the width and height are both determined by the same input, and no PC_ControlGroup is needed. Otherwise, a separate input is needed for both the width and height Both inputs should use the same PC_ControlGroup attribute. The input

with the attribute PC_ControlID = 0 will determine the width, and the one with PC_ControlID = 1 will determine the height of the Rectangle. Both inputs should have the INPID_PreviewControl set to "RectangleControl".

A slider set to PC_ControlID = 2 can optionally be used to determine the radius of the corners.