astrowidgets
astrowidgets copied to clipboard
Add API to deal with astropy regions
Similar to what @eteq laid out in spacetelescope/jdaviz#622 . But if he has something more specific than that for astrowidgets, feel free to clarify here. Thanks!
xref #51
https://github.com/astropy/astrowidgets/blob/50258f22d13326c307f252928cc0a691fe139d13/astrowidgets/interface_definition.py#L40
and
https://github.com/astropy/astrowidgets/blob/50258f22d13326c307f252928cc0a691fe139d13/astrowidgets/ginga.py#L131
are analogous to regions.RegionVisual in purpose, but the regions implementation seems to be very specific to Matplotlib. For instance, it has no concept of alpha because Matplotlib embeds that into its color as RGBA (https://stackoverflow.com/questions/15928539/matplotlib-how-to-make-the-marker-face-color-transparent-without-making-the-li).
Therefore, I am not sure if RegionVisual is useful for backend-agnostic implementation.
We can look at an exploratory concrete implementation at https://github.com/spacetelescope/jdaviz/pull/2410 to discuss this further.