comparison pyntnclick/tools/utils.py @ 690:4a933444c99b pyntnclick

The return of the rects to the rect drawer
author Neil Muller <neil@dip.sun.ac.za>
date Tue, 14 Feb 2012 12:24:33 +0200
parents ebc48b397fd5
children 60bf20849231
comparison
equal deleted inserted replaced
689:929b63589c96 690:4a933444c99b
8 for scene in state.scenes: 8 for scene in state.scenes:
9 print ' ', scene 9 print ' ', scene
10 print 'Available details are : ' 10 print 'Available details are : '
11 for detail in state.detail_views: 11 for detail in state.detail_views:
12 print ' ', detail 12 print ' ', detail
13
14 def draw_rect_image(surface, color, rect, thickness):
15 """Draw a rectangle with lines thickness wide"""
16 # top
17 surface.fill(color, (rect.left, rect.top, rect.width, thickness))
18 # bottom
19 surface.fill(color, (rect.left, rect.bottom - thickness, rect.width,
20 thickness))
21 # left
22 surface.fill(color, (rect.left, rect.top, thickness, rect.height))
23 # right
24 surface.fill(color, (rect.right - thickness, rect.top, thickness,
25 rect.height))
26