diff options
author | se.osadchy <se.osadchy@samsung.com> | 2016-01-05 20:41:12 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-01-06 13:50:34 +0900 |
commit | 996d17bcc5a08e75febb952586b6a87f48b990e4 (patch) | |
tree | 5d4c961881b0b88ac896cc541fefbf1efdee3a5b /src/lib/ector | |
parent | d2bb0eefc4a2eb640027334a88f0d9581bafe263 (diff) |
evas: Update Ector_Color structure.
Summary: Add a field at the end of the structure for defining the color encoding.
Reviewers: cedric, Hermet, raster, jpeg
Reviewed By: jpeg
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D3530
Diffstat (limited to 'src/lib/ector')
-rw-r--r-- | src/lib/ector/ector_util.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/ector/ector_util.h b/src/lib/ector/ector_util.h index 6cf4e0ae8b..426c9a8a74 100644 --- a/src/lib/ector/ector_util.h +++ b/src/lib/ector/ector_util.h | |||
@@ -7,12 +7,20 @@ | |||
7 | 7 | ||
8 | typedef struct _Ector_Color Ector_Color; | 8 | typedef struct _Ector_Color Ector_Color; |
9 | 9 | ||
10 | typedef enum _Ector_Color_Type | ||
11 | { | ||
12 | ECTOR_COLOR, | ||
13 | ECTOR_COLOR16 | ||
14 | } Ector_Color_Type; | ||
15 | |||
10 | struct _Ector_Color | 16 | struct _Ector_Color |
11 | { | 17 | { |
12 | unsigned short r; | 18 | unsigned short r; |
13 | unsigned short g; | 19 | unsigned short g; |
14 | unsigned short b; | 20 | unsigned short b; |
15 | unsigned short a; | 21 | unsigned short a; |
22 | |||
23 | Ector_Color_Type type; | ||
16 | }; | 24 | }; |
17 | 25 | ||
18 | static inline void | 26 | static inline void |
@@ -51,6 +59,8 @@ ector_color_set(Ector_Color *color, unsigned char r, unsigned char g, | |||
51 | color->g = ECTOR_COLOR_SET(g); | 59 | color->g = ECTOR_COLOR_SET(g); |
52 | color->b = ECTOR_COLOR_SET(b); | 60 | color->b = ECTOR_COLOR_SET(b); |
53 | color->a = ECTOR_COLOR_SET(a); | 61 | color->a = ECTOR_COLOR_SET(a); |
62 | |||
63 | color->type = ECTOR_COLOR; | ||
54 | } | 64 | } |
55 | 65 | ||
56 | static inline void | 66 | static inline void |
@@ -61,6 +71,14 @@ ector_color16_set(Ector_Color *color, unsigned short r, unsigned short g, | |||
61 | color->g = ECTOR_COLOR16_SET(g); | 71 | color->g = ECTOR_COLOR16_SET(g); |
62 | color->b = ECTOR_COLOR16_SET(b); | 72 | color->b = ECTOR_COLOR16_SET(b); |
63 | color->a = ECTOR_COLOR16_SET(a); | 73 | color->a = ECTOR_COLOR16_SET(a); |
74 | |||
75 | color->type = ECTOR_COLOR16; | ||
76 | } | ||
77 | |||
78 | static inline Ector_Color_Type | ||
79 | ector_color_type_get(Ector_Color *color) | ||
80 | { | ||
81 | return color->type; | ||
64 | } | 82 | } |
65 | 83 | ||
66 | #endif | 84 | #endif |