WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

A minimal rendering context for a GeoPath generator. The minimum implemented methods are a subset of the CanvasRenderingContext2D API.

For reference to the CanvasRenderingContext2D see https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D

Hierarchy

  • GeoContext

Index

Methods

arc

  • arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void
  • Adds an arc to the path with center point (x, y) and radius r starting at startAngle and ending at endAngle. The arc is drawn in clockwise directio by default.

    Parameters

    • x: number

      x-coordinate of arc center point.

    • y: number

      y-coordinate of arc center point.

    • radius: number

      Radius of arc.

    • startAngle: number

      The starting angle of the arc, measured clockwise from the positive x axis and expressed in radians.

    • endAngle: number

      The end angle of the arc, measured clockwise from the positive x axis and expressed in radians.

    • Optional anticlockwise: boolean

      Optional boolean flag, if true the arc is drawn counter-clockwise between the two angles.

    Returns void

beginPath

  • beginPath(): void
  • Start a new path by emptying the list of sub-paths.

    Returns void

closePath

  • closePath(): void
  • Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.

    Returns void

lineTo

  • lineTo(x: number, y: number): void
  • Connects the last point in the sub-path to the x, y coordinates with a straight line (but does not actually draw it).

    Parameters

    • x: number

      The x-coordinate for the end of the line.

    • y: number

      The y-coordinate for the end of the line.

    Returns void

moveTo

  • moveTo(x: number, y: number): void
  • Move the starting point of a new sub-path to the (x, y) coordinates.

    Parameters

    • x: number

      The x-coordinate for the new starting point.

    • y: number

      The y-coordinate for the new starting point.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc