<s> import cv2 <EOL> class Shot : <EOL> def __init__ ( self , coord , canvas , marker_radius = <NUM_LIT:2> , marker_color = "<STR_LIT>" , timestamp = <NUM_LIT:0> ) : <EOL> self . _marker_color = marker_color <EOL> self . _marker_radius = marker_radius <EOL> self . _coord = coord <EOL> self . _canvas = canvas <EOL> self . _timestamp = timestamp <EOL> self . _canvas_id = None <EOL> self . _is_selected = False <EOL> def set_marker_color ( self , marker_color ) : <EOL> self . _marker_color = marker_color <EOL> self . _canvas . itemconfig ( self . _canvas_id , fill = marker_color ) <EOL> def set_marker_radius ( self , marker_radius ) : <EOL> self . _marker_radius = marker_radius <EOL> self . _canvas . delete ( self . _canvas_id ) <EOL> self . draw_marker ( ) <EOL> def get_color ( self ) : <EOL> return self . _marker_color <EOL> def get_coords ( self ) : <EOL> return self . _coord <EOL> def get_timestamp ( self ) : <EOL> return self . _timestamp <EOL> def draw_marker ( self ) : <EOL> x = self . _coord [ <NUM_LIT:0> ] <EOL> y = self . _coord [ <NUM_LIT:1> ] <EOL> self . _canvas_id = self . _canvas . create_oval ( <EOL> x - self . _marker_radius , <EOL> y - self . _marker_radius , <EOL> x + self . _marker_radius , <EOL> y + self . _marker_radius , <EOL> fill = self . _marker_color , outline = self . _marker_color , <EOL> tags = ( "<STR_LIT>" ) ) <EOL> def toggle_selected ( self ) : <EOL> self . _is_selected = not self . _is_selected <EOL> if self . _is_selected : <EOL> self . _canvas . itemconfig ( self . _canvas_id , fill = "<STR_LIT>" , outline = "<STR_LIT>" ) <EOL> self . _canvas . tag_raise ( self . _canvas_id ) <EOL> else : <EOL> self . _canvas . itemconfig ( self . _canvas_id , fill = self . _marker_color , <EOL> outline = self . _marker_color ) </s>
