Rect.Constructor(X As Double, Y As Double, Width As Double, Height As Double)
From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Creates a Rect object at X,Y and the passed width and height.
This example is from the Rects example that is covered in the Notes section of the Rect class. The Open event of the main window contains constructors that appear in the top-left and bottom-right corners of the main window.
// RectOne will be in the upper left. RectTwo will be in the lower right.
rectOne = New Rect(0, 0, 100, 75)
rectTwo = New Rect(Self.Width - 100, Self.Height - 75, 100, 75)
// Fill our point classes to avoid NilObjectException errors.
mousePosition = New Point(-1, -1)
mouseOffset = New Point(0, 0)