- (int)gridSize
- Returns the ratio of pixels to position (i.e., the height/width of a grid square). Defaults to 50.
- (CPRect)viewableRegion
- Returns the viewable rectangle (in grid square position) currently being displayed on the map view.
- (CPRect)displayFrame
- Returns the viewable rectangle (in pixels) currently being displayed on the map view.
- (CPPoint)pixelForPosition:(CPPoint)pos
- Transform the specified position on the battlemap grid to the corresponding pixel on the battlemap frame. The returned pixel is translated based on the viewable area -- the upper left hand corner of the viewable area (whatever its position) will be transformed to the pixel (0,0).
- (CPPoint)globalPixelForPosition:(CPPoint)pos
- Transform the specified position on the battlemap grid to the corresponding pixel in the viewable area without translating with respect to the viewable area.
- (CPPoint)positionForPixel:(CPPoint)pix
- Transform the specified pixel on the battlemap frame to the corresponding position on the battlemap.
- (CPSize)sizeFromPixelSize:(CPSize)pSize;
- Transform the provided size in pixels to the corresponding size in grid square position.
- (CPSize)pixelSizeFromSize:(CPSize)size;
- Transform the provided size in grid square position to the corresponding size in pixels
- (CPRect)pixelRectFromRect:(CPRect)frame
- Transform the provided rectangle in pixels to the corresponding rectangle in grid square position
- (CPRect)rectFromPixelRect:(CPRect)frame
- Transform the provided rectangle in grid square position to the corresponding rectangle in pixels
- (CPPoint)positionForEvent:(CPEvent)evt
- Transform the specified event's location to the corresponding grid square position.
- (void)setViewableOriginToPosition:(CPPoint)pos
- Set the upper left hand corner of the viewable area to the specified position.
- (void)offsetViewableByPosition:(CPPoint)delta
- Move the viewable area by the specified amount (in terms of grid square position)
- (void)offsetViewableByPixels:(CPPoint)delta
- Move the viewable area by the specified amount (in terms of pixels)