Package arcmap :: Module tilemap :: Class TileMap
[hide private]
[frames] | no frames]

Class TileMap

source code

Instance Methods [hide private]
 
__init__(self) source code
 
resize(self, width, height, xoffset, yoffset)
Resizes the map
source code
 
addTile(self, t, x, y, z)
Adds a tile to the map...
source code
 
removeTile(self, x, y, z)
Removes a tile from the map...
source code
 
addLayer(self, name, visible, z=-1)
Brief Description
source code
 
removeLayer(self, index)
Brief Description
source code
 
swapLayers(self, index1, index2)
Brief Description
source code
 
getParallaxes(self) source code
 
setParallaxes(self, parallaxes) source code
graphics.RGBA
getBGColor(self)
Returns: the map's background color
source code
 
setBGColor(self, color) source code
 
addShape(self, s)
Brief Description
source code
 
delShape(self, s) source code
 
getShapes(self) source code
 
addLight(self, l)
Brief Description
source code
 
addImage(self, fileName, index) source code
 
writeToFile(self, fileName)
Brief Description
source code
Static Methods [hide private]
 
createMap(tileSize, width, height) source code
 
readFromFile(fileName)
Brief Description
source code
Method Details [hide private]

resize(self, width, height, xoffset, yoffset)

source code 

Resizes the map

Parameters:
  • width (int) - The new width
  • height (int) - The new height
  • xoffset (int) - the number of tiles that the existing tiles sholuld be shifted right. This number can be negative.
  • yoffset (int) - the number of tiles that the existing tiles should be shifted down. This number can be negative.

addTile(self, t, x, y, z)

source code 

Adds a tile to the map
@type t: Tile
@param t: The tile
@type x: int
@param x: x-coordinate
@type y: int
@param y: y-coordinate
@type z: int
@param z: layer index
@rtype: (int, int, int)
@return: The x-coordinate, y-coordinate, and index of the image of the
    tile that used to be at the coordinates (x, y), or None if there
        was no tile there before

removeTile(self, x, y, z)

source code 

Removes a tile from the map
@type x: int
@param x: x-coordinate
@type y: int
@param y: y-coordinate
@type z: int
@param z: layer index
@rtype: (int, int, int)
@return: The x-coordinate, y-coordinate, and index of the image of the
    tile that used to be at the coordinates (x, y, z), or None if there
        was no tile there before

addLayer(self, name, visible, z=-1)

source code 

Brief Description

Parameters:
  • name (string) - Placeholder
  • visible (bool) - whether or not the layer is visible
  • z (int) - index of the new layer

removeLayer(self, index)

source code 

Brief Description

Parameters:
  • index (int) - Placeholder

swapLayers(self, index1, index2)

source code 

Brief Description

Parameters:
  • index1 (int) - Placeholder
  • index2 (int) - Placeholder

getBGColor(self)

source code 
Returns: graphics.RGBA
the map's background color

addShape(self, s)

source code 

Brief Description

Parameters:
  • s (Shape) - Placeholder

delShape(self, s)

source code 
Parameters:
  • s (shapes.Shape) - the shape to remove

addLight(self, l)

source code 

Brief Description

Parameters:
  • l (Light) - Placeholder

addImage(self, fileName, index)

source code 
Parameters:
  • fileName (string) - file name of the image to add
  • index (int) - index of the image

createMap(tileSize, width, height)
Static Method

source code 
Parameters:
  • tileSize (placeholder) - placeholder
  • width (placeholder) - placeholder
  • height (placeholder) - placeholder

readFromFile(fileName)
Static Method

source code 

Brief Description

Parameters:
  • fileName (string) - Placeholder

writeToFile(self, fileName)

source code 

Brief Description

Parameters:
  • fileName (string) - Placeholder