Instant properties: point2

The instant property point2 corresponds to the position of the bottom-right corner stored within a rect operand and is expressed as a point value.

Declaration

point rect.point2

Discussion

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

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

Usage in Inspector

When working with Inspector you can easily access, evaluate and modify the point2 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 x2 and y2: