Methods
draw()
- Source:
getCenter()
- Source:
getGridPositionFromPixels()
- Source:
getNeighbors()
- Source:
getPixelsFromGridPosition()
- Source:
getSnappedPosition()
- Source:
getTopLeft()
- Source:
highlightGridPosition()
- Source:
measureDistances()
- Source:
shiftPosition(x, y, dx, dy)
- Source:
Shift a pixel position [x,y] by some number of grid units dx and dy
Parameters:
Name | Type | Description |
---|---|---|
x |
number | The starting x-coordinate in pixels |
y |
number | The starting y-coordinate in pixels |
dx |
number | The number of grid positions to shift horizontally |
dy |
number | The number of grid positions to shift vertically |