Sets the dimensions of DlxRect to the specified coordinates.
Syntax: |
DlxRect.SetCentered(center, width, height)
|
Parameters
Parameter |
Description |
center |
A DlxPoint object with the position of the center of the rectangle. |
width |
Specifies the width of the rectangle. |
height |
Specify the height of the rectangle. |
Return Value
If the operation ends correctly, it returns true otherwise it returns false.
Example
|
Copy code
|
var r = new DlxRect(0, 0, 35, 35);
r.SetCentered(new DlxPoint(80, 80), 100, 120);
DlxApp.Printf("r.left=%.2f, r.bottom=%.2f, r.right=%.2f, r.top=%.2f", r.left, r.bottom, r.right, r.top);
|
See also