iink-ts - v5.0.0
    Preparing search index...

    Class Circle2d

    Hierarchy (View Summary)

    Index
    • get bounds(): TOBB

      The radius, doubled. Exact, and without touching a single vertex.

      Returns TOBB

    • get edges(): TSegment[]

      The segments between consecutive vertices, plus the closing one when isClosed.

      That closing edge is the whole of what isClosed changes here, and it is not cosmetic: without it a polygon's last side is missing from every edge-crossing test, so a query touching only that side would report no overlap.

      Returns TSegment[]

    • get length(): number

      Total length along the edges — a perimeter when isClosed, a path length otherwise.

      Returns number

    • get vertices(): TPoint[]

      Returns TPoint[]

    • Exact, by distance, where the base class would ask a polygon standing in for the circle.

      Parameters

      Returns boolean

    • Distance from point to this shape's outline. Zero on the outline, positive on either side.

      Parameters

      Returns number

    • Whether point hits this shape, allowing margin of slack around its outline.

      Inside a filled shape counts however far from the outline it is — that is what filled means.

      Parameters

      • point: TPoint
      • margin: number = 0

      Returns boolean

    • Exact: the circle sits inside the query, or one of the query's four sides crosses it, or — when filled — the query sits inside the circle.

      The sampled outline the base class would use is always a little inside the true curve, so a query grazing the circle near a chord's middle would be missed.

      Parameters

      Returns boolean

    center: TPoint
    frameAngle: number
    isClosed: boolean
    isFilled: boolean
    padding: number
    radius: number