Next: , Previous: CADAddPolyLine, Up: CAD areas and methods


6.20 CADAddRectangle

CADAddRectangle adds a Rectangle to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theX1 real Left side X-coordinate of the unrotated rectangle
in theY1 real Bottom Y-coordinate of the unrotated rectangle
in theX2 real Right side X-coordinate of the unrotated rectangle
in theY2 real Top Y-coordinate of the unrotated rectangle
in theRotation real Angle of rotation around the rectangle’s center
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddSquare, CADObjRectangle, CADGetRectangle, CADSetRectangle, CADPointInRect, CADRectAndRect, CADLineAndRect.