comparison tools/area_editor.py @ 441:707d06a77f39

Also scale current line
author Neil Muller <drnlmuller@gmail.com>
date Sat, 07 Sep 2013 14:36:31 +0200
parents 4c60df80b91b
children a99e5e724545 0f8945232e54
comparison
equal deleted inserted replaced
440:9eee96966d88 441:707d06a77f39
147 line_width) 147 line_width)
148 if index == mouse_poly and mouse_pos: 148 if index == mouse_poly and mouse_pos:
149 endpoint = self.point_to_pymunk(mouse_pos) 149 endpoint = self.point_to_pymunk(mouse_pos)
150 pygame.draw.line(self._surface, color, 150 pygame.draw.line(self._surface, color,
151 self.point_to_pygame(polygon[-1]), 151 self.point_to_pygame(polygon[-1]),
152 self.point_to_pygame(endpoint)) 152 self.point_to_pygame(endpoint),
153 line_width // 2)
153 line_found = False # Hack for sane behaviour if lines overlap 154 line_found = False # Hack for sane behaviour if lines overlap
154 for line in self.lines: 155 for line in self.lines:
155 pointlist = [self.point_to_pygame(p) for p in line] 156 pointlist = [self.point_to_pygame(p) for p in line]
156 if move_point_mode and not self._move_poly and not line_found: 157 if move_point_mode and not self._move_poly and not line_found:
157 if move_point in line: 158 if move_point in line: