aboutsummaryrefslogtreecommitdiffstats
path: root/pages/develop/api/efl/canvas/group/property/color.txt
blob: 2fb0eaccc3d9d4cae6ba241d2b1ce39d9192aef4 (plain) (blame)
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
73
74
75
~~Title: Efl.Canvas.Group.color~~
===== Values =====

  * **r** - %%The red component of the given color.%%
  * **g** - %%The green component of the given color.%%
  * **b** - %%The blue component of the given color.%%
  * **a** - %%The alpha component of the given color.%%
===== Description =====




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

==== Getter ====

%%Retrieves the general/main color of the given Evas object.%%

%%Retrieves the main color's RGB component (and alpha channel) values, which range from 0 to 255. For the alpha channel, which defines the object's transparency level, 0 means totally transparent, while 255 means opaque. These color values are premultiplied by the alpha value.%%

%%Usually youll use this attribute for text and rectangle objects, where the main color is their unique one. If set for objects which themselves have colors, like the images one, those colors get modulated by this one.%%

%%All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).%%

%%Use null pointers on the components you're not interested in: they'll be ignored by the function.%%

%%See the full @ref Example_Evas_Object_Manipulation "example".%%


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

==== Setter ====

%%Sets the general/main color of the given Evas object to the given one.%%

%%See also %%[[:develop:api:efl:gfx:property:color|Efl.Gfx.color.get]]%% (for an example)%%

%%These color values are expected to be premultiplied by alpha.%%
{{page>:develop:api-include:efl:canvas:group:property:color:getter_description&nouser&nolink&nodate}}


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

<code>
@property color @pure_virtual {
    get {
        values {
            r: int;
            g: int;
            b: int;
            a: int;
        }
    }
    set {
        values {
            r: int;
            g: int;
            b: int;
            a: int;
        }
    }
}
</code>

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

<code c>
void efl_gfx_color_get(const Eo *obj, int *r, int *g, int *b, int *a);
void efl_gfx_color_set(Eo *obj, int r, int g, int b, int a);
</code>

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

  * [[:develop:api:efl:gfx:property:color|Efl.Gfx.color]]