labelme icon indicating copy to clipboard operation
labelme copied to clipboard

[Feature] shape rotation

Open ndgnuh opened this issue 1 year ago • 1 comments

What has changed

  • Add rotateCenter and rotateCenterBreak to Shape. rotateCenter rotate and keeps the shape, while rotateCenterBreak breaks the rectangle to create a quadrangle, then rotate it. The rotate action is a no-op on circles and points.
  • Modify the canvas to rotate the shape when the mouse scroll and there are selected shapes. If the condition is not met, the scrolling falls back to the previous behavior.
  • Add undo for scroll actions.
  • Modify canvas and app to block the scrolling when rotating the shapes.

The shortcut:

  • No modifier: rotate the shape 5deg.
  • Shift modifier: rotate and break the shape.
  • Ctrl modifier: rotate 30deg.

Screencap example:

https://github.com/wkentaro/labelme/assets/33273948/f6d68cba-026d-4505-9e04-d6cc3a4cb546

ndgnuh avatar Aug 01 '23 11:08 ndgnuh

LGTM

VShawn avatar Apr 08 '24 12:04 VShawn