Sets the dimensions of DlxRect to the specified coordinates.

syntaxSyntax:
DlxRect.SetRect(l, b, r, t)
DlxRect.SetRect(point, width, height, mode=DlxApp.RECTPOINT_CENTER)

Parameters

Parameter Description
l Specifies the x-coordinate of the lower-left corner.
b Specifies the y-coordinate of the lower-left corner.
r Specifies the x-coordinate of the upper-right corner.
t Specifies the y-coordinate of the upper-right corner.
point A DlxPoint object that specifies a point in the rectangle. The position of the point in the rectangle is specified in the mode parameter.
width Specifies the width of the rectangle.
height Specify the height of the rectangle.
mode Specifies the position in the rectangle of the specified point. Specify one of the following values:
DlxApp.RECTPOINT_CENTER
DlxApp.RECTPOINT_BOTTOMLEFT
DlxApp.RECTPOINT_BOTTOMRIGHT
DlxApp.RECTPOINT_TOPLEFT
DlxApp.RECTPOINT_TOPRIGHT
DlxApp.RECTPOINT_BOTTOMCENTER
DlxApp.RECTPOINT_TOPCENTER
DlxApp.RECTPOINT_MIDDLELEFT
DlxApp.RECTPOINT_MIDDLERIGHT

Return Value

If the operation ends correctly, it returns true otherwise it returns false.

Example

  Copy codeCopy code
var r = new DlxRect(0, 0, 35, 35);
r.SetRect(50, 50, 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