          return var.get()
  
      def _on_mask_type_change(self):
          """ Update the displayed mask on a mask type change """
          mask_type = self._control_vars["display"]["MaskType"].get()
          if mask_type == self._mask_type:
 
</s> remove 
 </s> add         self._add_control(ControlPanelOption("Cursor Shape",
                                             str,
                                             group="Display",
                                             choices=["Circle", "Rectangle"],
                                             default="Circle",
                                             is_radio=True,
                                             helptext=_("Select a shape for masking cursor."))) </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         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
 </s> add 
    def _set_tk_cursor_shape_change_callback(self):
        """ Add a trace to change the displayed cursor on a cursor shape type change. """
        var = self._control_vars["display"]["CursorShape"]
        var.trace("w", lambda *e: self._on_cursor_shape_change())
        return var.get()

    def _on_cursor_shape_change(self):
        self._mouse_location[0] = self._get_cursor_shape()

          return var.get()
  
    def _set_tk_cursor_shape_change_callback(self):
        """ Add a trace to change the displayed cursor on a cursor shape type change. """
        var = self._control_vars["display"]["CursorShape"]
        var.trace("w", lambda *e: self._on_cursor_shape_change())
        return var.get()

    def _on_cursor_shape_change(self):
        self._mouse_location[0] = self._get_cursor_shape()

      def _on_mask_type_change(self):
          """ Update the displayed mask on a mask type change """
          mask_type = self._control_vars["display"]["MaskType"].get()
          if mask_type == self._mask_type:
keep add 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