Rectangle Home

A rectangle is a quadrilateral shape with four right angles. It can be rotated around its center point. The corners can be smoothed with an arc or chamfer.

To add rectangles into a drawing use following functions:

Function Meaning
lcBlockAddRect By center point, width, height, rotation angle
lcBlockAddRect2 By corner point, width, height, corner radius

A rectangle has properties and functions derived from base class and the following specific properties:

Property Type Access Meaning
LC_PROP_RECT_X float RW Center X
LC_PROP_RECT_Y float RW Center Y
LC_PROP_RECT_W float RW Width
LC_PROP_RECT_H float RW Height
LC_PROP_RECT_ANGLE float RW Rotation angle
LC_PROP_RECT_RAD float RW Corners radius
LC_PROP_RECT_CHAMFER bool RW Chamfer at corners
LC_PROP_RECT_DIRCW bool RW Clockwise direction
LC_PROP_RECT_START int RW Start corner, 0: left-bottom, 1: left-top, 2: right-top, 3: right-bottom
LC_PROP_RECT_LEN float R Perimeter
LC_PROP_RECT_RESOL int RW Resolution of corner arcs

   Inner grid points
LC_PROP_RECT_GRID bool RW Enable grid points inside a rectangle
LC_PROP_RECT_GRNW int RW Number of cells along width
LC_PROP_RECT_GRNH int RW Number of cells along height
LC_PROP_RECT_GRDW float RW Cell size along width
LC_PROP_RECT_GRDH float RW Cell size along height

Rectangle specific functions:

Function Meaning
lcRectGetPolyline Retrieves a rectangle's outline


0 - center point
1 - rotation
2, 4, 6, 8 - width and height. With <Ctrl> - constrain proportions.
3, 7 - width
5, 9 - height

See also

  Retrieve objects