Page MenuHomePhabricator

efl_canvas_vg_object: Support property change feature
AbandonedPublic

Authored by jsuya on Aug 23 2019, 4:36 AM.

Details

Summary

User can control properties on a specific target or the entire object.
The types of properties are as follows:

EFL_CANVAS_VG_PROPERTY_TYPE_FILL_COLOR
EFL_CANVAS_VG_PROPERTY_TYPE_FILL_OPACITY
EFL_CANVAS_VG_PROPERTY_TYPE_STROKE_COLOR
EFL_CANVAS_VG_PROPERTY_TYPE_STROKE_OPACITY
EFL_CANVAS_VG_PROPERTY_TYPE_STROKE_WIDTH
EFL_CANVAS_VG_PROPERTY_TYPE_TRANSFORM_ANCHOR
EFL_CANVAS_VG_PROPERTY_TYPE_TRANSFORM_POSITION
EFL_CANVAS_VG_PROPERTY_TYPE_TRANSFORM_SCALE
EFL_CANVAS_VG_PROPERTY_TYPE_TRANSFORM_ROTATION
EFL_CANVAS_VG_PROPERTY_TYPE_TRANSFORM_OPACITY

Each property can have one to three values.
Keypath is the target a specific content or a set of contents that will be updated.
Properties are managed by eina_list and values can be set or get.

Test Plan

int main(int argc, char **argv)
{

...
int r, g, b, op;

Evas_Object *svg = efl_add(EFL_CANVAS_VG_OBJECT_CLASS, container);
efl_gfx_entity_visible_set(svg, EINA_TRUE);

efl_canvas_vg_object_property_fill_color_set(svg, "**", 255, 200, 255);
efl_canvas_vg_object_property_fill_color_get(svg, "**", &r, &g, &b);
printf("%d %d %d\n", r, g, b);

efl_canvas_vg_object_property_fill_opacity_set(svg, "**", 123);
op = efl_canvas_vg_object_property_fill_opacity_get(svg, "**");
printf("%d\n", op);

efl_canvas_vg_object_property_stroke_color_set(svg, "SomeName:SomeParts", 55, 200, 255);
efl_canvas_vg_object_property_stroke_color_get(svg, "Somename:SomeParts", &r, &g, &b);
printf("%d %d %d\n", r, g, b);

r = 0; g = 0; b = 0;
efl_canvas_vg_object_property_stroke_color_set(svg, "", 55, 200, 255);
efl_canvas_vg_object_property_stroke_color_get(svg, "", &r, &g, &b);
printf("%d %d %d\n", r, g, b);

...
return 0;

}

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12951
Build 9221: arc lint + arc unit
jsuya created this revision.Aug 23 2019, 4:36 AM
jsuya requested review of this revision.Aug 23 2019, 4:36 AM
jsuya planned changes to this revision.Aug 23 2019, 4:37 AM
jsuya updated this revision to Diff 24486.Aug 26 2019, 2:26 AM

code update

jsuya updated this revision to Diff 24487.Aug 26 2019, 2:28 AM
jsuya retitled this revision from [WIP] efl_canvas_vg_object: Support property change feature to efl_canvas_vg_object: Support property change feature.
jsuya edited the summary of this revision. (Show Details)
jsuya edited the test plan for this revision. (Show Details)

summary update

Hermet added a comment.EditedAug 27 2019, 9:41 PM

Firstly,
we should not open these property apis.
These should be internal apis since there is no point to open them. Nobody could use this except efl_ui_animation_view.
So we could use some tricky method to communicate with efl_ui_animation_view.
I think we can efl_data_set()/get() to pass the data i.e.

Define Efl_Gfx_Vector_Propset as the interface.

By App:
Efl_Gfx_Vector_Propset prop;
prop.key_set();
prop.stroke_set();
prop.color_set();
prop.pos_set();
...
efl_ui_animation_view_property_override(anim, prop);

By efl_ui_animation_view:
efl_data_set(vg, "_vg_propset", data);

By efl_canvas_vg:
Efl_Gfx_Vector_Propset prop = efl_data_get(vg, "_vg_propset");

if (prop)
{

pass this prop to lottie module.
...

}

Hermet requested changes to this revision.Aug 27 2019, 10:08 PM
This revision now requires changes to proceed.Aug 27 2019, 10:08 PM
jsuya abandoned this revision.Sep 9 2019, 10:08 PM

I created new patch D9874