glue-viz / bqplot-image-gl

Jupyter widget for displaying images with a focus on astronomy
MIT License
19 stars 13 forks source link

Angle (theta) support for some shapes #106

Open pllim opened 7 months ago

pllim commented 7 months ago

As mentioned in https://github.com/glue-viz/glue-jupyter/pull/396 , in Jdaviz, when one draws a shape like rectangle or ellipse, and then gives it a non-zero angle, when you click on the shape to drag, there is a gray shadow (AFAIK controlled by this package) that does not understand non-zero angle.

As a result, we see a "gray" shadow that isn't rotated as we drag, but when we finalize the selection, the final shape has the desired rotation. This behavior is very confusing.

Desired outcome: bqplot object in JS to also understand angle (theta).

Example file: https://github.com/glue-viz/bqplot-image-gl/blob/main/js/lib/BrushEllipseSelector.js

dhomeier commented 7 months ago

Adding to the confusion, if one wants to resize, the pointer needs to be positioned at the edges/corners of the shadow area, not the rotated shape.

RectangularROI