{
SelectionLayer selection = getSelectionLayer();
if (selection != null)
{
ImageDataPixelColor rgba = selection.getContext().getImageDataPixelColor(x, y); // x,y is adjusted to canvas coordinates in event dispatch
if (rgba != null)
{
if (rgba.getA() != 255)
{
return null;
}
String ckey = rgba.toBrowserRGB();
Shape<?> shape = m_shape_color_map.get(ckey);
if ((shape != null) && (ckey.equals(shape.getColorKey())) && (shape.isVisible()))
{