summaryrefslogtreecommitdiff
path: root/pages/develop/api/efl/canvas/group/property/clip.txt
blob: fc9d023ae69776236c160b78b4d6fba4af378e41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
~~Title: Efl.Canvas.Group.clip~~
===== Description =====




{{page>:develop:api-include:efl:canvas:group:property:clip:description&nouser&nolink&nodate}}

===== Values =====

  * **clip** - %%The object to clip %%''obj''%% by.%%
==== Getter ====

%%Get the object clipping %%''obj''%% (if any).%%

%%This function returns the object clipping %%''obj''%%. If %%''obj''%% is not being clipped at all, %%''null''%% is returned. The object %%''obj''%% must be a valid Evas_Object.%%


{{page>:develop:api-include:efl:canvas:group:property:clip:getter_description&nouser&nolink&nodate}}

==== Setter ====

%%Clip one object to another.%%

%%This function 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 @ref evas_object_show), 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.%%

<note>
%%Only rectangle and image (masks) objects can be used as clippers. Anything else will result in undefined behaviour.%%
</note>
{{page>:develop:api-include:efl:canvas:group:property:clip:getter_description&nouser&nolink&nodate}}


//Overridden from [[:develop:api:efl:canvas:object:property:clip|Efl.Canvas.Object.clip]] **(set)**.//===== Signature =====

<code>
@property clip {
    get {
        values {
            clip: free(Efl.Canvas.Object, efl_del) @nonull;
        }
    }
    set {
        values {
            clip: free(Efl.Canvas.Object, efl_del) @nonull;
        }
    }
}
</code>

===== C signature =====

<code c>
Efl_Canvas_Object *efl_canvas_object_clip_get(const Eo *obj);
void efl_canvas_object_clip_set(Eo *obj, Efl_Canvas_Object *clip);
</code>

===== Implemented by =====

  * [[:develop:api:efl:canvas:object:property:clip|Efl.Canvas.Object.clip]]