use of com.ait.lienzo.client.core.shape.wires.PickerPart in project lienzo-core by ahome-it.
the class ColorMapBackedPicker method findShapeAt.
public PickerPart findShapeAt(int x, int y) {
if (null != m_layer) {
final Point2D temp = new Point2D(x, y);
m_layer.getLayer().getViewport().getTransform().getInverse().transform(temp, temp);
x = (int) Math.round(temp.getX());
y = (int) Math.round(temp.getY());
}
final String color = BackingColorMapUtils.findColorAtPoint(m_imageData, x, y);
if (color != null) {
final PickerPart pickerPart = m_colorMap.get(color);
if (pickerPart != null) {
return pickerPart;
}
}
return null;
}
Aggregations