Creates a square grid based at a center point, with cells having spacing height and width.

It fits in as many cells as it can within width and height.

Returns a SVG group, consisting of horizontal and vertical lines

  • Parameters

    • parent: SVGElement

      Parent element

    • center: Point

      Center point of grid

    • spacing: number

      Width/height of cells

    • width: number

      How wide grid should be

    • height: number

      How high grid should be

    • opts: LineDrawingOpts = {}

    Returns SVGGElement