view.view module¶
Main world view.
-
class
view.view.View(surface)¶ Bases:
events.EventListenerView class.
-
agent_interaction= {}¶
-
created_renders_dir= False¶
-
draw(save_to_file)¶ Draw the world.
-
draw_entities()¶ Draw all the entities in the world onto the canvas.
-
draw_mouse_highlight()¶ Draw an indication of where the mouse is on the canvas.
-
get_cell_height()¶ Get the height of a cell on the canvas.
Returns: The height of a single cell on the canvas. Return type: int
-
get_cell_width()¶ Get the width of a cell on the canvas.
Returns: The width of a single cell on the canvas. Return type: int
-
notify(event)¶
-
save_surface_to_file()¶
-
sprites= {}¶
-
window_coords_to_world_coords(coords)¶ Transform window pixel coordinates to world coordinates.
Parameters: coords – Window pixel coords Returns: World coordinates
-
-
view.view.rot_center(image, angle)¶ Rotate a surface around its center