def draw_selection(self, surf):
    """Draw the selection rectange."""
    select_start = self._select_start  # Cache to avoid a race condition.
    if select_start:
      mouse_pos = self.get_mouse_pos()
      if (mouse_pos and mouse_pos.surf.surf_type & SurfType.SCREEN and
          mouse_pos.surf.surf_type == select_start.surf.surf_type):
        rect = point.Rect(select_start.world_pos, mouse_pos.world_pos)
        surf.draw_rect(colors.green, rect, 1)
def draw_selection ( self , surf ) : select_start = self . _select_start if select_start : mouse_pos = self . get_mouse_pos ( ) if ( mouse_pos and mouse_pos . surf . surf_type & SurfType . SCREEN and mouse_pos . surf . surf_type == select_start . surf . surf_type ) : rect = point . Rect ( select_start . world_pos , mouse_pos . world_pos ) surf . draw_rect ( colors . green , rect , 1 )
Draw the selection rectange.