Page MenuHomePhabricator

efl_gfx_shape: Stroke color use a premultiplied color.
ClosedPublic

Authored by jsuya on Jul 7 2019, 6:53 PM.

Details

Summary

R, G, and B must not be higher than alpha.

Test Plan

//test code
Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 600, 600, NULL);
ecore_evas_show(ee);

Evas *evas = ecore_evas_get(ee);
Evas_Object *vg,*bg;

bg = evas_object_rectangle_add(evas);
evas_object_color_set(bg, 0, 0, 255, 255);
evas_object_focus_set(bg, 1);
evas_object_show(bg);
int w, h;
ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
evas_object_resize(bg, w, h);

vg = evas_object_vg_add(evas);
evas_object_focus_set(vg, 1);
evas_object_show(vg);
evas_object_resize(vg, w, h);

Efl_VG *shape, *container;
container = evas_vg_container_add(vg);
shape = evas_vg_shape_add(container);

evas_vg_shape_append_rect(shape, 0, 0, 200 , 200, 10, 10);
evas_vg_shape_stroke_color_set(shape, 255, 255, 255, 10);
evas_vg_shape_stroke_width_set(shape, 20);
evas_vg_node_origin_set(shape, 200, 200);

evas_object_vg_root_node_set(vg, container);
ecore_main_loop_begin();
ecore_evas_shutdown();

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jsuya created this revision.Jul 7 2019, 6:53 PM
jsuya requested review of this revision.Jul 7 2019, 6:53 PM
Hermet accepted this revision.Jul 8 2019, 10:20 PM
This revision is now accepted and ready to land.Jul 8 2019, 10:20 PM
This revision was automatically updated to reflect the committed changes.