Calculates the centerpoint of rectangle by adding the left and right values and dividing by two, and adding the top and bottom values and dividing by two.

syntaxSyntax:
DlxRect.CenterPoint()

Return Value

The coordinates of the centerpoint of the rectangle. The coordinates are returned as a DlxPoint object.

Example

  Copy codeCopy code
var r = new DlxRect(10, 20, 80, 100);
DlxApp.Printf("x=%.2f, y=%.2f", r.CenterPoint().x, r.CenterPoint().y);

See also