Draw the grid. Subclasses are expected to override this method to perform their type-specific drawing logic.
Shift a pixel position [x,y] by some number of grid units dx and dy
The starting x-coordinate in pixels
The starting y-coordinate in pixels
The number of grid positions to shift horizontally
The number of grid positions to shift vertically
Given a pair of coordinates (x, y) - return the top-left of the grid square which contains that point
An Array [x, y] of the top-left coordinate of the square which contains (x, y)
Determine a placeable's bounding box based on the size of the grid.
The width in grid spaces.
The height in grid spaces.
Returns the class responsible for the implementation of a given grid type.
The grid type. {@see CONST.GRID_TYPES}
(typeof BaseGrid) A constructor for a grid of the given type.
Calculate the total size of the canvas with padding applied, as well as the top-left co-ordinates of the inner rectangle that houses the scene.
The grid type to calculate padding for. {@see CONST.GRID_TYPES}
The width of the scene.
The height of the scene.
The grid size.
The percentage of padding.
Grid Unit Width
Grid Unit Height
Construct a square grid container