Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

A grid class with vertical and horizontal lines (or a raster).

Note that the PlotBoilerplate already has a Grid instance member. The Grid is not meant to be added to the canvas as a drawable as it encapsulates more an abstract concept of the canvas rather than a drawable object.

requires

Vertex

Hierarchy

  • Grid

Index

Constructors

Properties

Object literals

Constructors

constructor

  • The constructor.

    name

    Grid

    Parameters

    • center: Vertex

      The offset of the grid (default is [0,0]).

    • size: Vertex

      The x- and y-size of the grid.

    Returns Grid

Properties

center

center: Vertex
member

{Vertex}

memberof

Grid

instance

size

size: Vertex
member

{Vertex}

memberof

Grid

instance

Object literals

Static utils

utils: object
memberof

Grid

baseLog

  • baseLog(base: number, num: number): number
  • Calculate the logarithm of the given number (num) to a given base.

    This function returns the number l with

    num == Math.pow(base,l)

    member

    baseLog

    function
    memberof

    Grid

    inner

    Parameters

    • base: number

      The base to calculate the logarithm to.

    • num: number

      The number to calculate the logarithm for.

    Returns number

    log(base)/log(num)

mapRasterScale

  • mapRasterScale(adjustFactor: number, scale: number): number
  • Calculate the raster scale for a given logarithmic mapping.

    Example (with adjustFactor=2):

    If scale is 4.33, then the mapping is 1/2 (because 2^2 <= 4.33 <= 2^3)
    If scale is 0.33, then the mapping is 2 because (2^(1/2) >= 0.33 >= 2^(1/4)
    member

    mapRasterScale

    function
    memberof

    Grid

    inner

    Parameters

    • adjustFactor: number

      The base for the logarithmic raster scaling when zoomed.

    • scale: number

      The currently used scale factor.

    Returns number

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc