summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-10-16 15:12:13 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2019-10-16 15:12:13 +0900
commit59419006b89cd304fa697627c968d6ea03482f60 (patch)
tree14bea22cb24849aa33a7e733c91300339041f6d0 /src
parent244f41402f9541099089d1118502255d5ade8466 (diff)
efl_canvas_vg : Propagates the alpha color of the parent
Summary: The current color is affected by the parent's opacity. If p_opacity is set, it will be applied to the current color. Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10399
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c12
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c4
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c4
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_image.c10
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c4
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c10
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h19
7 files changed, 43 insertions, 20 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index f4bf4d7..471ea3d 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -54,6 +54,8 @@ _prepare_comp(Evas_Object_Protected_Data *obj, //vector object
54 Ector_Surface *surface, 54 Ector_Surface *surface,
55 Eina_Matrix3 *ptransform, 55 Eina_Matrix3 *ptransform,
56 Eina_Matrix3 *ctransform, 56 Eina_Matrix3 *ctransform,
57 int p_opacity,
58 int c_opacity,
57 Ector_Buffer *comp, 59 Ector_Buffer *comp,
58 Efl_Gfx_Vg_Composite_Method comp_method) 60 Efl_Gfx_Vg_Composite_Method comp_method)
59{ 61{
@@ -127,7 +129,7 @@ _prepare_comp(Evas_Object_Protected_Data *obj, //vector object
127 src_pd = efl_data_scope_get(eina_list_nth(target_pd->comp.src, 0), MY_CLASS); 129 src_pd = efl_data_scope_get(eina_list_nth(target_pd->comp.src, 0), MY_CLASS);
128 _evas_vg_render_pre(obj, comp_target, 130 _evas_vg_render_pre(obj, comp_target,
129 engine, output, context, surface, 131 engine, output, context, surface,
130 ctransform, comp, src_pd->comp.method); 132 ctransform, c_opacity, comp, src_pd->comp.method);
131 } 133 }
132 } 134 }
133 135
@@ -135,7 +137,7 @@ _prepare_comp(Evas_Object_Protected_Data *obj, //vector object
135 _evas_vg_render_pre(obj, comp_target, 137 _evas_vg_render_pre(obj, comp_target,
136 engine, output, context, 138 engine, output, context,
137 surface, 139 surface,
138 ptransform, comp, comp_method); 140 ptransform, p_opacity, comp, comp_method);
139 141
140 //4. Generating Composite Image. 142 //4. Generating Composite Image.
141 ector_buffer_pixels_set(surface, pd->comp.pixels, size.w, size.h, pd->comp.stride, 143 ector_buffer_pixels_set(surface, pd->comp.pixels, size.w, size.h, pd->comp.stride,
@@ -153,6 +155,7 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
153 void *engine, void *output, void *context, 155 void *engine, void *output, void *context,
154 Ector_Surface *surface, 156 Ector_Surface *surface,
155 Eina_Matrix3 *ptransform, 157 Eina_Matrix3 *ptransform,
158 int p_opacity,
156 Ector_Buffer *comp, 159 Ector_Buffer *comp,
157 Efl_Gfx_Vg_Composite_Method comp_method, 160 Efl_Gfx_Vg_Composite_Method comp_method,
158 void *data) 161 void *data)
@@ -168,6 +171,7 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
168 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 171 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
169 172
170 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd); 173 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
174 EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, p_opacity, nd);
171 175
172 //Container may have composite target. 176 //Container may have composite target.
173 //FIXME : _prepare_comp() should only work in cases with matte or masking. 177 //FIXME : _prepare_comp() should only work in cases with matte or masking.
@@ -179,7 +183,7 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
179 comp_method = pd->comp.method; 183 comp_method = pd->comp.method;
180 comp = _prepare_comp(vg_pd, pd->comp_target, 184 comp = _prepare_comp(vg_pd, pd->comp_target,
181 engine, output, context, surface, 185 engine, output, context, surface,
182 ptransform, ctransform, comp, comp_method); 186 ptransform, ctransform, p_opacity, c_a, comp, comp_method);
183 } 187 }
184 188
185 EINA_LIST_FOREACH(pd->children, l, child) 189 EINA_LIST_FOREACH(pd->children, l, child)
@@ -204,7 +208,7 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
204 208
205 _evas_vg_render_pre(vg_pd, child, 209 _evas_vg_render_pre(vg_pd, child,
206 engine, output, context, surface, 210 engine, output, context, surface,
207 ctransform, comp, comp_method); 211 ctransform, c_a, comp, comp_method);
208 } 212 }
209} 213}
210 214
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
index 1d4eb6a..2781ce9 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
@@ -64,6 +64,7 @@ _efl_canvas_vg_gradient_linear_render_pre(Evas_Object_Protected_Data *vg_pd EINA
64 void *context EINA_UNUSED, 64 void *context EINA_UNUSED,
65 Ector_Surface *surface, 65 Ector_Surface *surface,
66 Eina_Matrix3 *ptransform, 66 Eina_Matrix3 *ptransform,
67 int p_opacity,
67 Ector_Buffer *comp, 68 Ector_Buffer *comp,
68 Efl_Gfx_Vg_Composite_Method comp_method, 69 Efl_Gfx_Vg_Composite_Method comp_method,
69 void *data) 70 void *data)
@@ -77,6 +78,7 @@ _efl_canvas_vg_gradient_linear_render_pre(Evas_Object_Protected_Data *vg_pd EINA
77 78
78 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS); 79 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS);
79 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd); 80 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
81 EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, p_opacity, nd);
80 82
81 if (!nd->renderer) 83 if (!nd->renderer)
82 { 84 {
@@ -87,7 +89,7 @@ _efl_canvas_vg_gradient_linear_render_pre(Evas_Object_Protected_Data *vg_pd EINA
87 89
88 ector_renderer_transformation_set(nd->renderer, ctransform); 90 ector_renderer_transformation_set(nd->renderer, ctransform);
89 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 91 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
90 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 92 ector_renderer_color_set(nd->renderer, c_r, c_g, c_b, c_a);
91 ector_renderer_visibility_set(nd->renderer, nd->visibility); 93 ector_renderer_visibility_set(nd->renderer, nd->visibility);
92 efl_gfx_gradient_stop_set(nd->renderer, gd->colors, gd->colors_count); 94 efl_gfx_gradient_stop_set(nd->renderer, gd->colors, gd->colors_count);
93 efl_gfx_gradient_spread_set(nd->renderer, gd->spread); 95 efl_gfx_gradient_spread_set(nd->renderer, gd->spread);
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
index e54df09..7e09e13 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
@@ -80,6 +80,7 @@ _efl_canvas_vg_gradient_radial_render_pre(Evas_Object_Protected_Data *vg_pd EINA
80 void *context EINA_UNUSED, 80 void *context EINA_UNUSED,
81 Ector_Surface *surface, 81 Ector_Surface *surface,
82 Eina_Matrix3 *ptransform, 82 Eina_Matrix3 *ptransform,
83 int p_opacity,
83 Ector_Buffer *comp, 84 Ector_Buffer *comp,
84 Efl_Gfx_Vg_Composite_Method comp_method, 85 Efl_Gfx_Vg_Composite_Method comp_method,
85 void *data) 86 void *data)
@@ -93,6 +94,7 @@ _efl_canvas_vg_gradient_radial_render_pre(Evas_Object_Protected_Data *vg_pd EINA
93 94
94 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS); 95 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS);
95 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd); 96 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
97 EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, p_opacity, nd);
96 98
97 if (!nd->renderer) 99 if (!nd->renderer)
98 { 100 {
@@ -103,7 +105,7 @@ _efl_canvas_vg_gradient_radial_render_pre(Evas_Object_Protected_Data *vg_pd EINA
103 105
104 ector_renderer_transformation_set(nd->renderer, ctransform); 106 ector_renderer_transformation_set(nd->renderer, ctransform);
105 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 107 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
106 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 108 ector_renderer_color_set(nd->renderer, c_r, c_g, c_b, c_a);
107 ector_renderer_visibility_set(nd->renderer, nd->visibility); 109 ector_renderer_visibility_set(nd->renderer, nd->visibility);
108 efl_gfx_gradient_stop_set(nd->renderer, gd->colors, gd->colors_count); 110 efl_gfx_gradient_stop_set(nd->renderer, gd->colors, gd->colors_count);
109 efl_gfx_gradient_spread_set(nd->renderer, gd->spread); 111 efl_gfx_gradient_spread_set(nd->renderer, gd->spread);
diff --git a/src/lib/evas/canvas/efl_canvas_vg_image.c b/src/lib/evas/canvas/efl_canvas_vg_image.c
index 80729bb..1d0ba17 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_image.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_image.c
@@ -21,21 +21,23 @@ _efl_canvas_vg_image_render_pre(Evas_Object_Protected_Data *vg_pd,
21 void *engine EINA_UNUSED, void *output EINA_UNUSED, void *context EINA_UNUSED, 21 void *engine EINA_UNUSED, void *output EINA_UNUSED, void *context EINA_UNUSED,
22 Ector_Surface *surface, 22 Ector_Surface *surface,
23 Eina_Matrix3 *ptransform, 23 Eina_Matrix3 *ptransform,
24 int p_opacity,
24 Ector_Buffer *comp, 25 Ector_Buffer *comp,
25 Efl_Gfx_Vg_Composite_Method comp_method, 26 Efl_Gfx_Vg_Composite_Method comp_method,
26 void *data) 27 void *data)
27{ 28{
28 Efl_Canvas_Vg_Image_Data *pd = data; 29 Efl_Canvas_Vg_Image_Data *pd = data;
30 int a;
29 31
30 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return; 32 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return;
31 33
32 int a;
33 efl_gfx_color_get(obj, NULL, NULL, NULL, &a); 34 efl_gfx_color_get(obj, NULL, NULL, NULL, &a);
34 if (a <= 0) return; 35 if (a <= 0) return;
35 36
36 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 37 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
37 38
38 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd); 39 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
40 EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, p_opacity, nd);
39 41
40 if (!nd->renderer) 42 if (!nd->renderer)
41 { 43 {
@@ -60,13 +62,9 @@ _efl_canvas_vg_image_render_pre(Evas_Object_Protected_Data *vg_pd,
60 } 62 }
61 ector_renderer_image_buffer_set(nd->renderer, pd->buffer); 63 ector_renderer_image_buffer_set(nd->renderer, pd->buffer);
62 ector_renderer_transformation_set(nd->renderer, ctransform); 64 ector_renderer_transformation_set(nd->renderer, ctransform);
63
64
65
66 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 65 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
67 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 66 ector_renderer_color_set(nd->renderer, c_r, c_g, c_b, c_a);
68 ector_renderer_visibility_set(nd->renderer, nd->visibility); 67 ector_renderer_visibility_set(nd->renderer, nd->visibility);
69
70 ector_renderer_comp_method_set(nd->renderer, comp, comp_method); 68 ector_renderer_comp_method_set(nd->renderer, comp, comp_method);
71 ector_renderer_prepare(nd->renderer); 69 ector_renderer_prepare(nd->renderer);
72} 70}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 800dbef..1027907 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -502,7 +502,7 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
502 502
503 //ector begin - end for drawing composite images. 503 //ector begin - end for drawing composite images.
504 //ENFN->ector_begin(engine, buffer, context, ector, 0, 0, EINA_FALSE, EINA_FALSE); 504 //ENFN->ector_begin(engine, buffer, context, ector, 0, 0, EINA_FALSE, EINA_FALSE);
505 _evas_vg_render_pre(obj, root, engine, buffer, context, ector, NULL, NULL, 0); 505 _evas_vg_render_pre(obj, root, engine, buffer, context, ector, NULL, 255, NULL, 0);
506 //ENFN->ector_end(engine, buffer, context, ector, EINA_FALSE); 506 //ENFN->ector_end(engine, buffer, context, ector, EINA_FALSE);
507 507
508 //Actual content drawing 508 //Actual content drawing
@@ -775,7 +775,7 @@ _efl_canvas_vg_object_render_pre(Evas_Object *eo_obj,
775 // FIXME: Move this render_pre to efl_canvas_vg_render() 775 // FIXME: Move this render_pre to efl_canvas_vg_render()
776 s = evas_ector_get(obj->layer->evas); 776 s = evas_ector_get(obj->layer->evas);
777 if (pd->root && s) 777 if (pd->root && s)
778 _evas_vg_render_pre(obj, pd->root, NULL, NULL, NULL, s, NULL, NULL, 0); 778 _evas_vg_render_pre(obj, pd->root, NULL, NULL, NULL, s, NULL, 255, NULL, 0);
779 779
780 /* now figure what changed and add draw rects */ 780 /* now figure what changed and add draw rects */
781 /* if it just became visible or invisible */ 781 /* if it just became visible or invisible */
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c
index 6ddec04..5ddff89 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c
@@ -81,6 +81,7 @@ _efl_canvas_vg_shape_render_pre(Evas_Object_Protected_Data *vg_pd,
81 void *engine, void *output, void *context, 81 void *engine, void *output, void *context,
82 Ector_Surface *surface, 82 Ector_Surface *surface,
83 Eina_Matrix3 *ptransform, 83 Eina_Matrix3 *ptransform,
84 int p_opacity,
84 Ector_Buffer *comp, 85 Ector_Buffer *comp,
85 Efl_Gfx_Vg_Composite_Method comp_method, 86 Efl_Gfx_Vg_Composite_Method comp_method,
86 void *data) 87 void *data)
@@ -93,16 +94,17 @@ _efl_canvas_vg_shape_render_pre(Evas_Object_Protected_Data *vg_pd,
93 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 94 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
94 95
95 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd); 96 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
97 EFL_CANVAS_VG_COMPUTE_ALPHA(c_r, c_g, c_b, c_a, p_opacity, nd);
96 98
97 fill = _evas_vg_render_pre(vg_pd, pd->fill, 99 fill = _evas_vg_render_pre(vg_pd, pd->fill,
98 engine, output, context, 100 engine, output, context,
99 surface, ctransform, comp, comp_method); 101 surface, ctransform, c_a, comp, comp_method);
100 stroke_fill = _evas_vg_render_pre(vg_pd, pd->stroke.fill, 102 stroke_fill = _evas_vg_render_pre(vg_pd, pd->stroke.fill,
101 engine, output, context, 103 engine, output, context,
102 surface, ctransform, comp, comp_method); 104 surface, ctransform, c_a, comp, comp_method);
103 stroke_marker = _evas_vg_render_pre(vg_pd, pd->stroke.marker, 105 stroke_marker = _evas_vg_render_pre(vg_pd, pd->stroke.marker,
104 engine, output, context, 106 engine, output, context,
105 surface, ctransform, comp, comp_method); 107 surface, ctransform, c_a, comp, comp_method);
106 108
107 if (!nd->renderer) 109 if (!nd->renderer)
108 { 110 {
@@ -112,7 +114,7 @@ _efl_canvas_vg_shape_render_pre(Evas_Object_Protected_Data *vg_pd,
112 } 114 }
113 ector_renderer_transformation_set(nd->renderer, ctransform); 115 ector_renderer_transformation_set(nd->renderer, ctransform);
114 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 116 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
115 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 117 ector_renderer_color_set(nd->renderer, c_r, c_g, c_b, c_a);
116 ector_renderer_visibility_set(nd->renderer, nd->visibility); 118 ector_renderer_visibility_set(nd->renderer, nd->visibility);
117 ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL); 119 ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL);
118 ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL); 120 ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL);
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index bbac468..036604b 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -70,7 +70,7 @@ struct _Efl_Canvas_Vg_Node_Data
70 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node, 70 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node,
71 Efl_Canvas_Vg_Node_Data *nd, 71 Efl_Canvas_Vg_Node_Data *nd,
72 void *engine, void *output, void *contenxt, Ector_Surface *surface, 72 void *engine, void *output, void *contenxt, Ector_Surface *surface,
73 Eina_Matrix3 *ptransform, Ector_Buffer *comp, Efl_Gfx_Vg_Composite_Method comp_method, void *data); 73 Eina_Matrix3 *ptransform, int opacity, Ector_Buffer *comp, Efl_Gfx_Vg_Composite_Method comp_method, void *data);
74 void *data; 74 void *data;
75 75
76 double x, y; 76 double x, y;
@@ -171,13 +171,14 @@ _evas_vg_render_pre(Evas_Object_Protected_Data *vg_pd, Efl_VG *child,
171 void *engine, void *output, void *context, 171 void *engine, void *output, void *context,
172 Ector_Surface *surface, 172 Ector_Surface *surface,
173 Eina_Matrix3 *transform, 173 Eina_Matrix3 *transform,
174 int opacity,
174 Ector_Buffer *comp, Efl_Gfx_Vg_Composite_Method comp_method) 175 Ector_Buffer *comp, Efl_Gfx_Vg_Composite_Method comp_method)
175{ 176{
176 if (!child) return NULL; 177 if (!child) return NULL;
177 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS); 178 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
178 if (nd) nd->render_pre(vg_pd, child, nd, 179 if (nd) nd->render_pre(vg_pd, child, nd,
179 engine, output, context, surface, 180 engine, output, context, surface,
180 transform, comp, comp_method, nd->data); 181 transform, opacity, comp, comp_method, nd->data);
181 return nd; 182 return nd;
182} 183}
183 184
@@ -202,5 +203,19 @@ _evas_vg_render_pre(Evas_Object_Protected_Data *vg_pd, Efl_VG *child,
202 } \ 203 } \
203 } 204 }
204 205
206#define EFL_CANVAS_VG_COMPUTE_ALPHA(Current_r, Current_g, Current_b, Current_a, Parent_Opacity, Nd) \
207 int Current_r = Nd->r; \
208 int Current_g = Nd->g; \
209 int Current_b = Nd->b; \
210 int Current_a = Nd->a; \
211 \
212 if (Parent_Opacity < 255) \
213 { \
214 double pa = (double)Parent_Opacity / 255.0; \
215 Current_r = (double)Current_r * pa; \
216 Current_g = (double)Current_g * pa; \
217 Current_b = (double)Current_b * pa; \
218 Current_a = (double)Current_a * pa; \
219 }
205 220
206#endif 221#endif