From Xojo Documentation

Class (inherits from Object)

The base class of any object that can be drawn in a vector graphics environment.

Border Fill Scale
BorderColor FillColor X
BorderWidth Rotation Y


Object2D is the base class for a group of subclasses that enable you to create vector (as opposed to bitmap) graphics. The subclasses are shown in the following table:

Class Description
ArcShape Draws an arc of a circle.
CurveShape Draws straight lines or curves using one or more "control points."
FigureShape Draws polygons that can (optionally) have curved sides.
OvalShape Draws circles and ovals.
PixMapShape Imports a bitmap picture into the image.
RectShape Draws a square or rectangle.
RoundRectShape Draws a square or rectangle with rounded corners (subclassed from RectShape).
StringShape Draws text strings in a specified font, font size, and style.

These basic shapes can be organized into a hierarchy using the Group2D class.

The Picture class has a property, Objects, that enables you to include a vector graphics drawing (a Group2D object) in a picture and the Graphics class has a new method, DrawObject, that enables you to draw a Group2D object within the Graphics object. Also, the Save method of the Picture class has an optional parameter that enables you to save a vector graphics picture in a format that retains the vector information. The OpenAsVectorPicture method of the FolderItem class attempts to open an existing image as a vector graphic and map the contents of the image into Object2D drawing primitives.


See the examples for ArcShape, CurveShape, FigureShape, OvalShape, PixmapShape, RectShape, RoundRectShape, and StringShape.

See Also

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