Extensibility > Graphics Builder Automation Interface > Object Drawing and Property Functions > DrawRectangle

DrawRectangle

Draws a rectangle on the active page.

Syntax

DrawRectangle(FromXPosition, FromYPosition, ToXPosition, ToYPosition)

FromXPosition:

Distance from the left hand side of the page to top left hand corner of the rectangle to be drawn, measured in pixels.

FromYPosition:

Distance from the top of the page to the top left hand corner of the rectangle to be drawn, measured in pixels.

ToXPosition:

Distance from the left hand side of the page to the bottom right hand corner of the rectangle to be drawn, measured in pixels.

ToYPosition:

Distance from the top of the page to the bottom right hand corner of the rectangle to be drawn, measured in pixels.

Return Value

0 (zero) if successful, otherwise an error is returned.

Note: For details on handling return and error values, see Error Handling.

Related Functions

DrawLine, DrawEllipse, DrawPolygonStart, DrawPolygonLine, DrawPolygonEnd, DrawPipeStart, DrawPipeSection, DrawPipeEnd, DrawText, DrawNumber, DrawButton, DrawSymbolSet, DrawTrend, DrawCicodeObject

Example

GraphicsBuilder.DrawRectangle 50, 70, 400, 200

Published June 2018