summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_gfx_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/efl/interfaces/efl_gfx_shape.c')
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index f5ebdab18e..fa3b718e1b 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -8,6 +8,8 @@
8 8
9#include <Efl.h> 9#include <Efl.h>
10 10
11#define ERR(...) EINA_LOG_DOM_ERR(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__)
12
11#define MY_CLASS EFL_GFX_SHAPE_MIXIN 13#define MY_CLASS EFL_GFX_SHAPE_MIXIN
12 14
13typedef struct _Efl_Gfx_Shape_Data 15typedef struct _Efl_Gfx_Shape_Data
@@ -142,6 +144,17 @@ EOLIAN static void
142_efl_gfx_shape_stroke_color_set(Eo *obj EINA_UNUSED, Efl_Gfx_Shape_Data *pd, 144_efl_gfx_shape_stroke_color_set(Eo *obj EINA_UNUSED, Efl_Gfx_Shape_Data *pd,
143 int r, int g, int b, int a) 145 int r, int g, int b, int a)
144{ 146{
147 Eina_Bool err = EINA_FALSE;
148 if (a > 255) { a = 255; err = EINA_TRUE; }
149 if (a < 0) { a = 0; err = EINA_TRUE; }
150 if (r > a) { r = a; err = EINA_TRUE; }
151 if (r < 0) { r = 0; err = EINA_TRUE; }
152 if (g > a) { g = a; err = EINA_TRUE; }
153 if (g < 0) { g = 0; err = EINA_TRUE; }
154 if (b > a) { b = a; err = EINA_TRUE; }
155 if (b < 0) { b = 0; err = EINA_TRUE; }
156 if (err)
157 ERR("Only handles premultiplied colors (0 <= R,G,B <= A <= 255)");
145 pd->public.stroke.color.r = r; 158 pd->public.stroke.color.r = r;
146 pd->public.stroke.color.g = g; 159 pd->public.stroke.color.g = g;
147 pd->public.stroke.color.b = b; 160 pd->public.stroke.color.b = b;