Grid Unit Width
Grid Unit Height
Draw the grid. Subclasses are expected to override this method to perform their type-specific drawing logic.
Highlight a grid position for a certain coordinate
The highlight layer to use
Additional options to configure behaviour.
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)
Given a pair of coordinates (x, y), return the center of the grid square which contains that point
The x-coordinate
The y-coordinate
An array [cx, cy] of the central point of the grid space which contains (x, y)
Given a pair of coordinates (x1,y1), return the grid coordinates (x2,y2) which represent the snapped position Under a "gridless" system, every pixel position is a valid snapping position
The exact target location x
The exact target location y
An object containing the coordinates of the snapped location
Given a pair of pixel coordinates, return the grid position as an Array. Always round down to the nearest grid position so the pixels are within the grid space (from top-left).
The x-coordinate pixel position
The y-coordinate pixel position
An array representing the position in grid units
Given a pair of grid coordinates, return the pixel position as an Array. Always round up to a whole pixel so the pixel is within the grid space (from top-left).
The x-coordinate grid position
The y-coordinate grid position
An array representing the position in pixels
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
Measure the distance traversed over an array of measured segments
An Array of measured movement segments
Additional options which modify the measurement
An Array of distance measurements for each segment
Get the grid row and column positions which are neighbors of a certain position
The grid row coordinate against which to test for neighbors
The grid column coordinate against which to test for neighbors
An array of grid positions which are neighbors of the row and column
Determine a placeable's bounding box based on the size of the grid.
The width in grid spaces.
The height in grid spaces.
Tests whether the given co-ordinates at the center of a grid space are contained within a given shape.
The X co-ordinate.
The Y co-ordinate.
The shape.
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.
The base grid class. This double-dips to implement the "gridless" option