Trees | Indices | Help |
|
---|
|
A tool for displaying mosp-simulations.
Author: P. Tute
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Initialize the viewer.
|
Receive data from a given port and parse it to create drawable objects.
Author: P. Tute |
Calculate all coordinates necessary for drawing received points, rectangles and circles.
Author: P. Tute |
Load an image from the cache folder or download it. Try to load from cache-folder first, download and cache if no image was found. The image is placed in self.tiles by this method or by the TileLoader.load_images() after downloading.
|
Recalculate drawing_offset and number_of_tiles if necessary, update tiles. This is called by pyglet when the viewer is started or resized. See Also: http://pyglet.org/doc/api/pyglet.window.Window-class.html#on_resize |
Update the self.tiles and self.tiles_used dicts after changes. When necessary load new images and delete old ones. This should not be called to often since it causes all coordinates of all drawings to be recalculated. |
Calculate the number of pixels that equal the given distance in.
See Also: http://wiki.openstreetmap.org/wiki/Zoom_levels |
Draw the screen. This is periodically called by pyglet.
|
Zooms in or out of map by given factor.
|
This is called by pyglet whenever a key is pressed. See Also: http://pyglet.org/doc/api/pyglet.window.Window-class.html#on_key_press |
Called, when mouse-dragging is recognized. See Also: http://pyglet.org/doc/api/pyglet.window.Window-class.html#on_mouse_drag |
This is called by pyglet when a mouse button is released. See Also: http://pyglet.org/doc/api/pyglet.window.Window-class.html#on_mouse_release |
This is called by pyglet when the mouse-wheel is scrolled. See Also: http://pyglet.org/doc/api/pyglet.window.Window-class.html#on_mouse_scroll |
Check, if new tiles need to be loaded because of the current offset. If the offset is bigger than one tile, the appropriate tile will become the new center and the offset is changed accordingly.
|
Remove a drawing-object from the viewer. The object is specified by it's type (in hexadecimal, see MESSAGE_TYPES) and it's unique id.
|
Try to establish a new connection to the host and ports used when initialising. This is mainly used when a new simulation was started and the viewer is supposed to be restarted. |
This is called by pyglet when the viewer is closed. The screenshot folder is deleted, if no screenshots were taken. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Jul 6 13:59:53 2014 | http://epydoc.sourceforge.net |