Efl.Canvas.Object.clipper

Description

Clip one object to another.

This property will clip the object obj to the area occupied by the object clip. This means the object obj will only be visible within the area occupied by the clipping object (clip).

The color of the object being clipped will be multiplied by the color of the clipping one, so the resulting color for the former will be "RESULT = (OBJ * CLIP) / (255 * 255)", per color element (red, green, blue and alpha).

Clipping is recursive, so clipping objects may be clipped by others, and their color will in term be multiplied. You may not set up circular clipping lists (i.e. object 1 clips object 2, which clips object 1): the behavior of Evas is undefined in this case.

Objects which do not clip others are visible in the canvas as normal; those that clip one or more objects become invisible themselves, only affecting what they clip. If an object ceases to have other objects being clipped by it, it will become visible again.

The visibility of an object affects the objects that are clipped by it, so if the object clipping others is not shown (as in Efl.Gfx.Entity.visible), the objects clipped by it will not be shown either.

If obj was being clipped by another object when this function is called, it gets implicitly removed from the old clipper's domain and is made now to be clipped by its new clipper.

If clip is null, this call will disable clipping for the object i.e. its visibility and color get detached from the previous clipper. If it wasn't, this has no effect.

Only rectangle and image (masks) objects can be used as clippers. Anything else will result in undefined behaviour.

Since 1.22

Values

  • clipper - The object to clip obj by.

Signature

@property clipper {
    get {}
    set {}
    values {
        clipper: Efl.Canvas.Object;
    }
}

C signature

Implemented by