Mercurial > pyntnclick
view pyntnclick/tools/utils.py @ 742:0d5ff96527da pyntnclick
Make build scripts a bit more configurable
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Wed, 16 Jan 2013 12:19:30 +0200 |
parents | 60bf20849231 |
children | f4853f817a7a |
line wrap: on
line source
# Misc utils I don't know where else to put def list_scenes(get_initial_state): """List the scenes in the state""" state = get_initial_state() print 'Available scenes are : ' for scene in state.scenes: print ' ', scene print 'Available details are : ' for detail in state.detail_views: print ' ', detail def draw_rect_image(surface, color, rect, thickness): """Draw a rectangle with lines thickness wide""" # top surface.fill(color, (rect.left, rect.top, rect.width, thickness)) # bottom surface.fill(color, (rect.left, rect.bottom - thickness, rect.width, thickness)) # left surface.fill(color, (rect.left, rect.top, thickness, rect.height)) # right surface.fill(color, (rect.right - thickness, rect.top, thickness, rect.height))