          if not self._drag_data:
              return
          face_idx = self._mouse_location[1]
          location = np.array(((event.x, event.y), ))
          color = 0 if self._edit_mode == "erase" else 255
          # Reverse action on control click
          color = abs(color - 255) if self._drag_data["control_click"] else color
          if np.array_equal(self._drag_data["starting_location"], location[0]):
              points, scale = self._transform_points(face_idx, location)
              brush_radius = int(round(self._brush_radius * scale))
              cv2.circle(self._meta["mask"][face_idx], tuple(points), brush_radius, color,
                         thickness=-1)
 
</s> remove             points, scale = self._transform_points(face_idx, location)
            brush_radius = int(round(self._brush_radius * scale))
            cv2.circle(self._meta["mask"][face_idx], tuple(points), brush_radius, color,
                       thickness=-1)
 </s> add             self._get_cursor_shape_mark(self._meta["mask"][face_idx], location, face_idx) </s> remove             self._canvas.create_oval(0, 0, 0, 0, outline="black", state="hidden"), False]
 </s> add             self._get_cursor_shape(), False]
          if not self._drag_data:
              return
          face_idx = self._mouse_location[1]
          location = np.array(((event.x, event.y), ))



          if np.array_equal(self._drag_data["starting_location"], location[0]):
              points, scale = self._transform_points(face_idx, location)
              brush_radius = int(round(self._brush_radius * scale))
              cv2.circle(self._meta["mask"][face_idx], tuple(points), brush_radius, color,
                         thickness=-1)
keep keep keep keep replace replace replace keep keep keep keep keep
 feat: add support for rectangle cursor shape for masking (#1189)

* feat: add support for rectangle cursor shape for masking
* formatting update
* fix bug with initial rectangular point

Co-authored-by: markus <markus@helmes.com> 
tools/manual/frameviewer/editor/mask.py