Mercurial > boomslang
diff 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 |
line wrap: on
line diff
--- a/pyntnclick/tools/utils.py Mon Feb 13 18:24:08 2012 +0200 +++ b/pyntnclick/tools/utils.py Tue Feb 14 12:24:33 2012 +0200 @@ -10,3 +10,17 @@ 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)) +