Instant properties: point1

The instant property point1 corresponds to the position of the top-left corner stored within a rect operand and is expressed as a point value.

Declaration

point rect.point1

Discussion

The read access to this property returns the coordinate of the top-left corner of a rect operand. The write access modifies the coordinate of the top-left corner of a rect operand. The position of the bottom-right corner is not affected by the modification, which results in a rectangle with changed origin position and size. For example:

var rect r = <100,200,110,220>; // Read the point1 position var point result = r.point1; // result = <100,200> // Modify the point1 position r.point1 = <50,150>; // r = <50,150,110,220>

Usage in Inspector

When working with Inspector you can easily access, evaluate and modify the point1 position. For this purpose select in Inspector the desired rect property or attribute and click on the small triangle on its left side to expand and display the subordinated values. The position is displayed in Inspector as two individual values x1 and y1: