Changeset 361
- Timestamp:
- 10/29/07 23:49:49 (1 year ago)
- Files:
-
- trunk/py/ModestMaps/__init__.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/py/ModestMaps/__init__.py
r360 r361 18 18 def calculateMapCenter(provider, centerCoord): 19 19 """ Based on a center coordinate, returns the coordinate 20 of an initial tile and it 's point placement, relative to20 of an initial tile and its point placement, relative to 21 21 the map center. 22 22 """ … … 209 209 """ Draw map out to a PIL.Image and return it. 210 210 """ 211 coord = self.coordinate.copy() 211 212 corner = Core.Point(int(self.offset.x + self.dimensions.x/2), int(self.offset.y + self.dimensions.y/2)) 212 213 213 214 while corner.x > 0: 214 215 corner.x -= self.provider.tileWidth() 215 self.coordinate = self.coordinate.left()216 coord = coord.left() 216 217 217 218 while corner.y > 0: 218 219 corner.y -= self.provider.tileHeight() 219 self.coordinate = self.coordinate.up()220 coord = coord.up() 220 221 221 222 tiles = TileQueue() 222 223 223 rowCoord = self.coordinate.copy()224 rowCoord = coord.copy() 224 225 for y in range(corner.y, self.dimensions.y, self.provider.tileHeight()): 225 226 tileCoord = rowCoord.copy()
