Rectangle (Interactive)
The Rectangle (Interactive) Control provides an environment to display or draw a rectangle by clicks. Mainly, the control is used within the Image Watch control; however, it can also be used stand-alone. Thus, for example, image regions can be selected to mark objects or define ROIs. In addition to a rectangle, you can also draw squares, circles or ellipses. To do this, the StrokeShape and AspectRatio attributes must be adjusted accordingly.
For all the following attributes, the control has a getter and a setter method. All further attributes, events and permissions provided by the base class Controls can be found in the TwinCAT HMI documentation. |
Category: Colors
Attribute | Type | Description |
---|---|---|
|
| Color of the contours of the drawn rectangle. |
|
| Color of the handles of the drawn rectangle. |
Category: Common
Attribute | Type | Description |
---|---|---|
|
| Contains the description of the rectangle. Can be used both to retrieve a drawn rectangle and to set a specific rectangle. |
|
| Specifies the aspect ratio that is enforced when drawing the rectangle. The |
Function | Description |
---|---|
| Deletes the drawn rectangle and description from the |
Category: Usage
Attribute | Type | Description |
---|---|---|
|
| Specifies whether the rectangle can be drawn with two clicks or with a sweeping motion, or using both options. |
|
| Displays an element in the center of the rectangle to move it. |
|
| Displays elements at the corners of the rectangle to change its size. |
|
| Displays elements on the edges of the rectangle to resize it. |
|
| Displays an element on the outside of the rectangle to rotate it. |
|
| Determines whether the rectangle can be moved at the edges. |
|
| Specifies the steps in which the rectangle can be rotated. At 0, the rectangle can be rotated as desired. |
|
| Defines an area in which the shape can be drawn and edited using the five properties "X", "Y", "Width", "Height" and "IsActive". The shape cannot leave this area. |
|
| Specifies whether ShapeData should be updated during "onChanged" or at the end "onConfirmed" of a graphical interaction. |
Category: Appearance
Attribute | Type | Description |
---|---|---|
|
| Line thickness of the rectangle. |
|
| Size of the elements to move and change the rectangle. |
|
| Specifies whether a rectangle or an ellipse is painted. The description is identical for both. To get a square or a circle, the AspectRatio can be set to 1. |
|
| Size of the clickable area around above elements to move and change the rectangle. This can simplify touch screen use without changing the appearance. |
|
| Specifies the offset with which the shape is to be displayed. |
|
| Specifies the scaling in which the shape is to be displayed. The value 1 corresponds to 100%. |
Events
Event | Description |
---|---|
| This event is triggered as soon as the attribute |
| This event is triggered when a shape is set or an interaction with it is completed. |