pointdraw

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

Meta Data
filepath_exists True
path pointdraw
filepath pointdraw.js
clean_files ()

  • ClassDeclaration
    class comments:
    Draw functions for the Point.draw
    • constructor

      constructor

      (
      point
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      methods.

    • method

      arc

      (
      ctx , radius = undefined , start , end , direction = 1
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      ellipse

      (
      ctx , rx , ry , radians , start , end
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      ctx.ellipse(p.x, p.y, r, start, end)

    • method

      circle

      (
      ctx , radius
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      line

      (
      ctx , distance
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      draw a line from the current point position to the length of the given distance.

    • method

      hair

      (
      ctx , length
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      draw a line in two antipose directions. Similar to two line call in opposite directions.

    • method

      crossHair

      (
      ctx , length , sqeeeze , rotation
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      Two hair() calls in a cross formation. With a squeeze factor, 0 for no change (cross) and 1 for full change (two lines drawn upon each other)

    • method

      lineTo

      (
      ctx , b
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      box

      (
      ctx , size , width , angle
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
              A box is a rectangle on the outside of radius.
              If an angle is given, the box cannot be a _rect_ and returns an ngon(4).
      
    • method

      rect

      (
      ctx , width , height , offset = {x: 0, y: 0}
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      rect(ctx, width=this.point.radius, height) {

      rect(x, y, width, height)

    • method

      roundRect

      (
      ctx , width , height , radii = [] , offset = {x: 0, y: 0}
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      Draw a standard roundRect using this point as the top left {x,y} The default width and height is the radus of the point, drawing a round rect to the size of the point.

              // ctx.roundRect(400, 150, 120, 120, [0, 30, 50, 60]);
              // point.draw.roundRect(width, height, radii)
              let point = new Point(400, 150, 120)
              point.draw.roundRect(ctx)
      
          Expanded:
      
              point.draw.roundRect(ctx, point.radius, point.radius, [10, 30, 50, 60])
      
    • method

      ngon

      (
      ctx , sides , radius , fromCenter = True , angle
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])

      Draw a polygon of n sides, with an optional radius.

                  polygonPoint.radius = 20
                  polygonPoint.draw.ngon(ctx, 7)
      
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

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

    :

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