public boolean shouldTurnOn(int x, int y) {
        for (ShapeWithRelativeCoordinates component : shapes) {
            int relativeX = x - component.topX;
            int relativeY = y - component.topY;

            if (component.shape instanceof Circle) {
                if (((Circle) component.shape).isPixelActivated(relativeX, relativeY)) return true;
            }

            if (component.shape instanceof Rectangle) {
                if (((Rectangle) component.shape).isPixelOn(relativeX, relativeY)) return true;
            }

            if (component.shape instanceof CompositeShape) {
                if (((CompositeShape) component.shape).shouldTurnOn(relativeX, relativeY)) return true;
            }
        }

        return false;
    }