Adds a painted rectangle to the current page.

 

   

Syntax
 

GraphicID = Doc.FillRect([RadiusX, [RadiusY]])

 

   

Params
 
Name Type Description
RadiusX Double The horizontal radius to use for rounded corners (optional).
RadiusY Double The vertical radius to use for rounded corners (optional).
GraphicID Long The Object ID of the newly added Graphic object.

 

   

Notes
 

Adds a painted rectangle to the current page. The rectangle location and size is determined by the current rectangle, the fill color is determined by the current color and any options are determined by the current options.

By specifying values for the horizontal and vertical radius parameters, you can draw rectangles with rounded corners. The values refer to the radii of the ellipse used to draw the corners.

By setting the horizontal radius parameter to half the width of the rect and the vertical radius parameter to half the height of the rect, you can draw filled ovals and circles.

The FillRect method returns the Object ID of the newly added Graphic object.

 

   

Example
 

The following code adds a blue filled rectangle to a document. The frame is inset from the edges of the document by 200 points horizontally and 100 points vertically.

Set theDoc = Server.CreateObject("ABCpdf12.Doc")
theDoc.Rect.Inset 200, 100
theDoc.Color.Blue = 255
theDoc.FillRect
theDoc.Save "c:\mypdfs\docfillrect.pdf"


docfillrect.pdf