comparison tools/rect_drawer.py @ 276:75f4ee46ac58

Better (and fixed) rect tool with toolbar overlay.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 27 Aug 2010 22:00:12 +0200
parents d78ce15bccc8
children c67a4a4d78f6
comparison
equal deleted inserted replaced
275:d78ce15bccc8 276:75f4ee46ac58
145 sub = surface.subsurface(cropped_rect) 145 sub = surface.subsurface(cropped_rect)
146 self.current_image.draw(sub) 146 self.current_image.draw(sub)
147 if self.draw_toolbar: 147 if self.draw_toolbar:
148 toolbar_rect = pygame.rect.Rect(0, 550, 800, 50) 148 toolbar_rect = pygame.rect.Rect(0, 550, 800, 50)
149 tb_surf = surface.subsurface(0, 550, 800, 50).convert_alpha() 149 tb_surf = surface.subsurface(0, 550, 800, 50).convert_alpha()
150 tb_surf.fill(Color(127, 0, 0, 127)) 150 tb_surf.fill(pygame.color.Color(127, 0, 0, 191))
151 surface.blit(tb_surf) 151 surface.blit(tb_surf, (0, 550))
152 frame_rect(surface, (127, 0, 0), toolbar_rect, 5) 152 # frame_rect(surface, (127, 0, 0), toolbar_rect, 2)
153 153
154 def _make_dict(self): 154 def _make_dict(self):
155 d = {} 155 d = {}
156 for col, rect in self.rects: 156 for col, rect in self.rects:
157 col = (col.r, col.g, col.b) 157 col = (col.r, col.g, col.b)