def render(self): ''' Draw the path, open or closed, using the current pen colour. ''' # draw base line egi.blue_pen() if self.looped: egi.closed_shape(self._pts) else: egi.polyline(self._pts) # draw current waypoint egi.orange_pen() wp = self.current_pt() egi.circle(pos=wp, radius=5, slices=32)
def render(self): ''' Draw the path, open or closed, using the current pen colour. ''' for index, wp in enumerate(self._way_pts): egi.blue_pen() filled = False if(index < self._cur_pt_idx): egi.green_pen() if(index == self._cur_pt_idx): egi.orange_pen() filled = True egi.circle(pos=wp, radius=5, filled=filled, slices=32) egi.blue_pen() if self.looped: egi.closed_shape(self._way_pts) else: egi.polyline(self._way_pts)
def render(self): ''' Draw the path, open or closed, using the current pen colour. ''' for index, wp in enumerate(self._way_pts): egi.blue_pen() filled = False if (index < self._cur_pt_idx): egi.green_pen() if (index == self._cur_pt_idx): egi.orange_pen() filled = True egi.circle(pos=wp, radius=5, filled=filled, slices=32) egi.blue_pen() if self.looped: egi.closed_shape(self._way_pts) else: egi.polyline(self._way_pts)