summaryrefslogtreecommitdiff
path: root/unsorted/evas/evas-vg-simple.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 15:47:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 16:09:14 +0000
commit6a210da20c2eeaef6ec4b1e88a433f4ba143a75d (patch)
treebb3d18b62db751c318773b41b76576ac2d21e354 /unsorted/evas/evas-vg-simple.c
parent0dcde7d3ea24b1810ae1b94647a1977aff72f93b (diff)
Automatic migration to the new eo_add syntax.
Diffstat (limited to 'unsorted/evas/evas-vg-simple.c')
-rw-r--r--unsorted/evas/evas-vg-simple.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/unsorted/evas/evas-vg-simple.c b/unsorted/evas/evas-vg-simple.c
index 2c0c702..9d22907 100644
--- a/unsorted/evas/evas-vg-simple.c
+++ b/unsorted/evas/evas-vg-simple.c
@@ -449,15 +449,19 @@ vector_set(int x, int y, int w, int h)
449 root = evas_object_vg_root_node_get(d.vg); 449 root = evas_object_vg_root_node_get(d.vg);
450 //evas_vg_node_transformation_set(root, &matrix); 450 //evas_vg_node_transformation_set(root, &matrix);
451 451
452 Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "bg")); 452 Efl_VG *bg = NULL;
453 eo_add(&bg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(bg, "bg"));
453 _rect_add(bg, 0, 0 , vg_w, vg_h); 454 _rect_add(bg, 0, 0 , vg_w, vg_h);
454 evas_vg_node_origin_set(bg, 0,0); 455 evas_vg_node_origin_set(bg, 0,0);
455 evas_vg_shape_stroke_width_set(bg, 1.0); 456 evas_vg_shape_stroke_width_set(bg, 1.0);
456 evas_vg_node_color_set(bg, 80, 80, 80, 80); 457 evas_vg_node_color_set(bg, 80, 80, 80, 80);
457 458
458 Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "shape")); 459 Efl_VG *shape = NULL;
459 Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(eoid, "rgradient")); 460 eo_add(&shape, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(shape, "shape"));
460 Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(eoid, "lgradient")); 461 Efl_VG *rgradient = NULL;
462 eo_add(&rgradient, EFL_VG_GRADIENT_RADIAL_CLASS, NULL, efl_vg_name_set(rgradient, "rgradient"));
463 Efl_VG *lgradient = NULL;
464 eo_add(&lgradient, EFL_VG_GRADIENT_LINEAR_CLASS, NULL, efl_vg_name_set(lgradient, "lgradient"));
461 465
462 _arcto(shape, 0, 0, 100, 100, 25, 330); 466 _arcto(shape, 0, 0, 100, 100, 25, 330);
463 467
@@ -498,7 +502,8 @@ vector_set(int x, int y, int w, int h)
498 evas_vg_node_color_set(shape, 0, 0, 255, 255); 502 evas_vg_node_color_set(shape, 0, 0, 255, 255);
499 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128); 503 evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
500 504
501 Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect")); 505 Efl_VG *rect = NULL;
506 eo_add(&rect, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect, "rect"));
502 _rect_add(rect, 0, 0, 100, 100); 507 _rect_add(rect, 0, 0, 100, 100);
503 evas_vg_node_origin_set(rect, 100, 100); 508 evas_vg_node_origin_set(rect, 100, 100);
504 evas_vg_shape_fill_set(rect, lgradient); 509 evas_vg_shape_fill_set(rect, lgradient);
@@ -506,7 +511,8 @@ vector_set(int x, int y, int w, int h)
506 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND); 511 evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
507 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255); 512 evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
508 513
509 Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "rect1")); 514 Efl_VG *rect1 = NULL;
515 eo_add(&rect1, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(rect1, "rect1"));
510 _rect_add(rect1, 0, 0, 70, 70); 516 _rect_add(rect1, 0, 0, 70, 70);
511 evas_vg_node_origin_set(rect1, 50, 70); 517 evas_vg_node_origin_set(rect1, 50, 70);
512 evas_vg_shape_stroke_scale_set(rect1, 2); 518 evas_vg_shape_stroke_scale_set(rect1, 2);
@@ -514,7 +520,8 @@ vector_set(int x, int y, int w, int h)
514 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND); 520 evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
515 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100); 521 evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
516 522
517 Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "circle")); 523 Efl_VG *circle = NULL;
524 eo_add(&circle, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(circle, "circle"));
518 _arcto(circle, 0, 0, 250, 100, 30, 300); 525 _arcto(circle, 0, 0, 250, 100, 30, 300);
519 evas_vg_shape_fill_set(circle, lgradient); 526 evas_vg_shape_fill_set(circle, lgradient);
520 //evas_vg_node_transformation_set(&matrix), 527 //evas_vg_node_transformation_set(&matrix),
@@ -522,27 +529,30 @@ vector_set(int x, int y, int w, int h)
522 evas_vg_node_color_set(circle, 50, 0, 0, 50); 529 evas_vg_node_color_set(circle, 50, 0, 0, 50);
523 530
524 // Foreground 531 // Foreground
525 Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "fg")); 532 Efl_VG *fg = NULL;
533 eo_add(&fg, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(fg, "fg"));
526 _rect_add(fg, 0, 0, vg_w, vg_h); 534 _rect_add(fg, 0, 0, vg_w, vg_h);
527 evas_vg_node_origin_set(fg, 0, 0); 535 evas_vg_node_origin_set(fg, 0, 0);
528 evas_vg_shape_stroke_width_set(fg, 5.0); 536 evas_vg_shape_stroke_width_set(fg, 5.0);
529 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND); 537 evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
530 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70); 538 evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
531 539
532 Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "tst")); 540 Efl_VG *tst = NULL;
541 eo_add(&tst, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(tst, "tst"));
533 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5); 542 evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
534 evas_vg_node_color_set(tst, 0, 0, 200, 200); 543 evas_vg_node_color_set(tst, 0, 0, 200, 200);
535 evas_vg_shape_stroke_width_set(tst, 2); 544 evas_vg_shape_stroke_width_set(tst, 2);
536 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255); 545 evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
537 546
538 Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(eoid, "vc")); 547 Efl_VG *vc = NULL;
548 eo_add(&vc, EFL_VG_SHAPE_CLASS, root, efl_vg_name_set(vc, "vc"));
539 evas_vg_shape_shape_append_circle(vc, 100, 100, 23); 549 evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
540 evas_vg_node_color_set(vc, 0, 200, 0, 255); 550 evas_vg_node_color_set(vc, 0, 200, 0, 255);
541 evas_vg_shape_stroke_width_set(vc, 4); 551 evas_vg_shape_stroke_width_set(vc, 4);
542 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255); 552 evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
543 553
544 beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root)); 554 eo_add(&beginning, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(beginning, root));
545 end = eo_add(EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(eoid, root)); 555 eo_add(&end, EFL_VG_CONTAINER_CLASS, NULL, efl_vg_dup(end, root));
546 556
547 circle = efl_vg_container_child_get(end, "circle"); 557 circle = efl_vg_container_child_get(end, "circle");
548 efl_vg_transformation_set(circle, &matrix); 558 efl_vg_transformation_set(circle, &matrix);