RectShape

From Xojo Documentation

Revision as of 18:56, 19 November 2009 by WikiSysop (talk) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Description

Draws a (two-dimensional) rectangle in a vector graphics environment.


Super Class

Object2D

Properties

Name Type Description
Height Double The height of the rectangle.
Width Double The width of the rectangle.


Methods

Name Parameters Return Type Description
Contains X as Double, Y as Double Boolean Tests whether the object contains the point X,Y. Returns True if the rectangle contains the point specified by X,Y.


Examples

The following code in the Paint event of a window draws a diamond shaped rectangle.

Dim r as New RectShape
r.width=75
r.height=75
r.border=100
r.bordercolor=RGB(0,0,0) //black
r.fillcolor=RGB(0,127,127) // teal
r.borderwidth=2.5
r.rotation=-.78
g.DrawObject r,100,100


See Also

ArcShape, CurveShape, FigureShape, FolderItem, Group2D, Graphics, OvalShape, Picture, PixmapShape, RoundRectShape, StringShape classes.