ImageData id = gctx.getImageData(x, y, 1, 1);
Color c = new Color(id.getRedAt(posX, posY), id.getGreenAt(posX, posY), id.getBlueAt(posX, posY), id.getAlphaAt(posX, posY));
if (objectsIndex.containsKey(c.getRGB()));
{
if (objectsIndex.get(c.getRGB()) != null) {
DrawableElement de = objectsIndex.get(c.getRGB());
if (de instanceof DrawableObject) {
return (DrawableObject) de;
}
}
}