Difference between revisions of "Rect.Constructor(origin as Point, size as Size)"

From Xojo Documentation

(Sample Code)
 
Line 14: Line 14:
 
Create a rect at 100, 100 that is 50 tall and 50 wide.
 
Create a rect at 100, 100 that is 50 tall and 50 wide.
 
<rbcode>
 
<rbcode>
Var p as New Point(100,100)
+
Var p As New Point(100, 100)
Var s as New Size(50, 50)
+
Var s As New Size(50, 50)
 
Var myRect As New Rect(p, s)
 
Var myRect As New Rect(p, s)
 
</rbcode>
 
</rbcode>

Latest revision as of 18:57, 12 November 2019

Constructor

Rect.Constructor(origin as Point, size as Size)

New in 2019r2

Creates a Rect object given the origin and size passed.

Sample Code

Create a rect at 100, 100 that is 50 tall and 50 wide.

Var p As New Point(100, 100)
Var s As New Size(50, 50)
Var myRect As New Rect(p, s)