From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from Object2D)

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

BorderColor FillOpacity Width
BorderOpacity Height X
BorderWidth Rotation Y
FillColor Scale



The following code in the Canvas.Paint event handler draws a diamond shaped rectangle:

Var r As New RectShape
r.Width = 75
r.Height = 75
r.BorderOpacity = 100
r.BorderColor = RGB(0, 0, 0) // black
r.FillColor = RGB(0, 127, 127) // teal
r.BorderWidth = 2.5
r.Rotation = -0.78
g.DrawObject(r, 100, 100)

See Also

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