rectangle

<script src="./point_src/rectangle"></script>

Rectangle presentation tools for:

  • Pointlist pen tools
  • Point pen tools
  • Rectangle Top Class

Pointlist tools

pointlist.pen.rectangles(ctx, [width, height, rotation]) #per point
pointlist.pen.squares(ctx, [width, rotation]) # per point

Point Tools

point.pen.rectangle(ctx, [width, height, rotation], rounded=true)
point.pen.square(ctx, [width, rotation])

Top Class

The top class new Rectangle is a lesser pointlist, 2 points, or 4 points. rectangle contains rectangle specific shaping and rendering

r = new Rectangle(...points)
r.rounded = true
r.rotation = 30
r.pen.fill(ctx)

Unlike a standard PointList or Point, top-level functions exist for rectangle rendering.

  • Rounded rect through point radii
  • Rect can be rotated
  • Has its own stroke and fill specific for rect
  • can anchor rotate
  • Draggable
  • rect bounding box
Meta Data
filepath_exists True
path rectangle
filepath rectangle.js
clean_files ()

  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])