summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_text.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-09 16:04:26 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-09 16:20:03 +0900
commit0a2362fa69ebde8557f128e5b96a16f8b66a6fb9 (patch)
tree3122b34cab960fb8a1bf1d842ec557cfb453ffb4 /src/lib/edje/edje_text.c
parentfb58613e18c53541c03c956783798fef3ab73dde (diff)
Edje: Fix indentation after a clean-up commit
@zmike apparently wanted to beat the b0rker in chief, (see 172a0ccf0cd6) but edje_text.c came out worse than before :) eo_do() seems to totally mess with editors' auto-formatting in some cases.
Diffstat (limited to 'src/lib/edje/edje_text.c')
-rw-r--r--src/lib/edje/edje_text.c546
1 files changed, 273 insertions, 273 deletions
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index ec91e8e..b91db6b 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -479,285 +479,285 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
479 if (inlined_font) efl_text_properties_font_source_set(ed->path); 479 if (inlined_font) efl_text_properties_font_source_set(ed->path);
480 else efl_text_properties_font_source_set(NULL)); 480 else efl_text_properties_font_source_set(NULL));
481 481
482 text = _edje_text_fit_x(ed, ep, params, chosen_desc, 482 text = _edje_text_fit_x(ed, ep, params, chosen_desc,
483 text, font, size, 483 text, font, size,
484 sw, sh, &free_text); 484 sw, sh, &free_text);
485 } 485 }
486 /* when evas ellipsis support was added in efl 1.8 and used to replace 486 /* when evas ellipsis support was added in efl 1.8 and used to replace
487 * previous support, SOMEONE, who I shall call "cedric", borked ellipsis 487 * previous support, SOMEONE, who I shall call "cedric", borked ellipsis
488 * defaults. as a result, edje_cc continued using 0.0 (left-most) as its default value 488 * defaults. as a result, edje_cc continued using 0.0 (left-most) as its default value
489 * for ellipsis while evas used -1.0 (no ellipsizing). 489 * for ellipsis while evas used -1.0 (no ellipsizing).
490 * this was moderately okay for a time because nobody was using it or GROUP parts 490 * this was moderately okay for a time because nobody was using it or GROUP parts
491 * with text in them very frequently, and so nobody noticed that the mismatch was breaking 491 * with text in them very frequently, and so nobody noticed that the mismatch was breaking
492 * sizing in some cases when the edje ellipsis value failed to be applied, 492 * sizing in some cases when the edje ellipsis value failed to be applied,
493 * which occurred any time text.min_x was set; in this case, ellipsis would NEVER be 493 * which occurred any time text.min_x was set; in this case, ellipsis would NEVER be
494 * correctly applied, and instead the text object would only ever get the first 494 * correctly applied, and instead the text object would only ever get the first
495 * ellipsis_set(0), permanently breaking the part. 495 * ellipsis_set(0), permanently breaking the part.
496 * the only way to fix this while preserving previous behavior was to bump 496 * the only way to fix this while preserving previous behavior was to bump
497 * the edje file minor version and then check it here to ignore "unset" ellipsis 497 * the edje file minor version and then check it here to ignore "unset" ellipsis
498 * values from old file versions. 498 * values from old file versions.
499 * the downside is that this will break old files which have text.min_x set to 0...maybe. 499 * the downside is that this will break old files which have text.min_x set to 0...maybe.
500 * 500 *
501 * -zmike 501 * -zmike
502 * 22 April 2014 502 * 22 April 2014
503 */ 503 */
504 else if (((ed->file->version >= 3) && (ed->file->minor >= 6)) || 504 else if (((ed->file->version >= 3) && (ed->file->minor >= 6)) ||
505 params->type.text.ellipsis) 505 params->type.text.ellipsis)
506 evas_object_text_ellipsis_set(ep->object, 506 evas_object_text_ellipsis_set(ep->object,
507 chosen_desc->text.min_x ? -1 : params->type.text.ellipsis); 507 chosen_desc->text.min_x ? -1 : params->type.text.ellipsis);
508 508
509 eina_stringshare_replace(&ep->typedata.text->cache.out_str, text); 509 eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
510 ep->typedata.text->cache.in_w = sw; 510 ep->typedata.text->cache.in_w = sw;
511 ep->typedata.text->cache.in_h = sh; 511 ep->typedata.text->cache.in_h = sh;
512 ep->typedata.text->cache.in_font = font; 512 ep->typedata.text->cache.in_font = font;
513 ep->typedata.text->cache.out_size = size; 513 ep->typedata.text->cache.out_size = size;
514 ep->typedata.text->cache.align_x = params->type.text.align.x; 514 ep->typedata.text->cache.align_x = params->type.text.align.x;
515 ep->typedata.text->cache.align_y = params->type.text.align.y; 515 ep->typedata.text->cache.align_y = params->type.text.align.y;
516 ep->typedata.text->cache.ellipsis = params->type.text.ellipsis; 516 ep->typedata.text->cache.ellipsis = params->type.text.ellipsis;
517 ep->typedata.text->cache.fit_x = chosen_desc->text.fit_x; 517 ep->typedata.text->cache.fit_x = chosen_desc->text.fit_x;
518 ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y; 518 ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y;
519arrange_text: 519arrange_text:
520 520
521 eo_do(ep->object, 521 eo_do(ep->object,
522 if (inlined_font) efl_text_properties_font_source_set(ed->path); 522 if (inlined_font) efl_text_properties_font_source_set(ed->path);
523 else efl_text_properties_font_source_set(NULL); 523 else efl_text_properties_font_source_set(NULL);
524
525 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
526
527 efl_text_properties_font_set(font, size),
528 efl_text_set(text));
529 part_get_geometry(ep, &tw, &th);
530
531 /* filters */
532 eo_do(ep->object,
533 EINA_LIST_FOREACH(prev_sources, li, source_name)
534 evas_obj_text_filter_source_set(source_name, NULL);
535 524
536 EINA_LIST_FOREACH(filter_sources, li, source_name) 525 if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
537 {
538 Edje_Real_Part *rp = _edje_real_part_get(ed, source_name);
539 evas_obj_text_filter_source_set(source_name, rp ? rp->object : NULL);
540 }
541 evas_obj_text_filter_program_set(filter));
542 526
543 /* Handle alignment */ 527 efl_text_properties_font_set(font, size);
544 { 528 efl_text_set(text));
545 FLOAT_T align_x; 529 part_get_geometry(ep, &tw, &th);
546 if (params->type.text.align.x < FROM_INT(0))
547 {
548 if (evas_object_text_direction_get(ep->object) ==
549 EVAS_BIDI_DIRECTION_RTL)
550 {
551 align_x = FROM_INT(1);
552 }
553 else
554 {
555 align_x = FROM_INT(0);
556 }
557 }
558 else
559 {
560 align_x = params->type.text.align.x;
561 }
562 ep->typedata.text->offset.x = TO_INT(SCALE(align_x, (sw - tw)));
563 ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text.align.y, (sh - th)));
564 }
565 530
566 if (!calc_only) 531 /* filters */
567 { 532 eo_do(ep->object,
568 eo_do(ep->object, 533 EINA_LIST_FOREACH(prev_sources, li, source_name)
569 efl_gfx_position_set(ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x, 534 evas_obj_text_filter_source_set(source_name, NULL);
570 ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y); 535
536 EINA_LIST_FOREACH(filter_sources, li, source_name)
537 {
538 Edje_Real_Part *rp = _edje_real_part_get(ed, source_name);
539 evas_obj_text_filter_source_set(source_name, rp ? rp->object : NULL);
540 }
541 evas_obj_text_filter_program_set(filter));
542
543 /* Handle alignment */
544 {
545 FLOAT_T align_x;
546 if (params->type.text.align.x < FROM_INT(0))
547 {
548 if (evas_object_text_direction_get(ep->object) ==
549 EVAS_BIDI_DIRECTION_RTL)
550 {
551 align_x = FROM_INT(1);
552 }
553 else
554 {
555 align_x = FROM_INT(0);
556 }
557 }
558 else
559 {
560 align_x = params->type.text.align.x;
561 }
562 ep->typedata.text->offset.x = TO_INT(SCALE(align_x, (sw - tw)));
563 ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text.align.y, (sh - th)));
564 }
565
566 if (!calc_only)
567 {
568 eo_do(ep->object,
569 efl_gfx_position_set(ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
570 ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
571 571
572 efl_gfx_visible_set(params->visible)); 572 efl_gfx_visible_set(params->visible));
573 } 573 }
574 574
575 { 575 {
576 Evas_Text_Style_Type style; 576 Evas_Text_Style_Type style;
577 Edje_Text_Effect effect; 577 Edje_Text_Effect effect;
578 578
579 style = EVAS_TEXT_STYLE_PLAIN; 579 style = EVAS_TEXT_STYLE_PLAIN;
580 580
581 evas_object_color_set(ep->object, 581 evas_object_color_set(ep->object,
582 (params->color.r * params->color.a) / 255, 582 (params->color.r * params->color.a) / 255,
583 (params->color.g * params->color.a) / 255, 583 (params->color.g * params->color.a) / 255,
584 (params->color.b * params->color.a) / 255, 584 (params->color.b * params->color.a) / 255,
585 params->color.a); 585 params->color.a);
586 effect = ep->part->effect; 586 effect = ep->part->effect;
587 switch (effect & EDJE_TEXT_EFFECT_MASK_BASIC) 587 switch (effect & EDJE_TEXT_EFFECT_MASK_BASIC)
588 { 588 {
589 case EDJE_TEXT_EFFECT_NONE: 589 case EDJE_TEXT_EFFECT_NONE:
590 case EDJE_TEXT_EFFECT_PLAIN: 590 case EDJE_TEXT_EFFECT_PLAIN:
591 style = EVAS_TEXT_STYLE_PLAIN; 591 style = EVAS_TEXT_STYLE_PLAIN;
592 break; 592 break;
593 593
594 case EDJE_TEXT_EFFECT_OUTLINE: 594 case EDJE_TEXT_EFFECT_OUTLINE:
595 style = EVAS_TEXT_STYLE_OUTLINE; 595 style = EVAS_TEXT_STYLE_OUTLINE;
596 evas_object_text_outline_color_set(ep->object, 596 evas_object_text_outline_color_set(ep->object,
597 (params->type.text.color2.r * params->type.text.color2.a) / 255, 597 (params->type.text.color2.r * params->type.text.color2.a) / 255,
598 (params->type.text.color2.g * params->type.text.color2.a) / 255, 598 (params->type.text.color2.g * params->type.text.color2.a) / 255,
599 (params->type.text.color2.b * params->type.text.color2.a) / 255, 599 (params->type.text.color2.b * params->type.text.color2.a) / 255,
600 params->type.text.color2.a); 600 params->type.text.color2.a);
601 break; 601 break;
602 602
603 case EDJE_TEXT_EFFECT_SOFT_OUTLINE: 603 case EDJE_TEXT_EFFECT_SOFT_OUTLINE:
604 style = EVAS_TEXT_STYLE_SOFT_OUTLINE; 604 style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
605 evas_object_text_outline_color_set(ep->object, 605 evas_object_text_outline_color_set(ep->object,
606 (params->type.text.color2.r * params->type.text.color2.a) / 255, 606 (params->type.text.color2.r * params->type.text.color2.a) / 255,
607 (params->type.text.color2.g * params->type.text.color2.a) / 255, 607 (params->type.text.color2.g * params->type.text.color2.a) / 255,
608 (params->type.text.color2.b * params->type.text.color2.a) / 255, 608 (params->type.text.color2.b * params->type.text.color2.a) / 255,
609 params->type.text.color2.a); 609 params->type.text.color2.a);
610 break; 610 break;
611 611
612 case EDJE_TEXT_EFFECT_SHADOW: 612 case EDJE_TEXT_EFFECT_SHADOW:
613 style = EVAS_TEXT_STYLE_SHADOW; 613 style = EVAS_TEXT_STYLE_SHADOW;
614 evas_object_text_shadow_color_set(ep->object, 614 evas_object_text_shadow_color_set(ep->object,
615 (params->type.text.color3.r * params->type.text.color3.a) / 255, 615 (params->type.text.color3.r * params->type.text.color3.a) / 255,
616 (params->type.text.color3.g * params->type.text.color3.a) / 255, 616 (params->type.text.color3.g * params->type.text.color3.a) / 255,
617 (params->type.text.color3.b * params->type.text.color3.a) / 255, 617 (params->type.text.color3.b * params->type.text.color3.a) / 255,
618 params->type.text.color3.a); 618 params->type.text.color3.a);
619 break; 619 break;
620 620
621 case EDJE_TEXT_EFFECT_SOFT_SHADOW: 621 case EDJE_TEXT_EFFECT_SOFT_SHADOW:
622 style = EVAS_TEXT_STYLE_SOFT_SHADOW; 622 style = EVAS_TEXT_STYLE_SOFT_SHADOW;
623 evas_object_text_shadow_color_set(ep->object, 623 evas_object_text_shadow_color_set(ep->object,
624 (params->type.text.color3.r * params->type.text.color3.a) / 255, 624 (params->type.text.color3.r * params->type.text.color3.a) / 255,
625 (params->type.text.color3.g * params->type.text.color3.a) / 255, 625 (params->type.text.color3.g * params->type.text.color3.a) / 255,
626 (params->type.text.color3.b * params->type.text.color3.a) / 255, 626 (params->type.text.color3.b * params->type.text.color3.a) / 255,
627 params->type.text.color3.a); 627 params->type.text.color3.a);
628 break; 628 break;
629 629
630 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW: 630 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
631 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW; 631 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
632 eo_do(ep->object, 632 eo_do(ep->object,
633 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255, 633 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
634 (params->type.text.color2.g * params->type.text.color2.a) / 255, 634 (params->type.text.color2.g * params->type.text.color2.a) / 255,
635 (params->type.text.color2.b * params->type.text.color2.a) / 255, 635 (params->type.text.color2.b * params->type.text.color2.a) / 255,
636 params->type.text.color2.a), 636 params->type.text.color2.a),
637 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255, 637 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
638 (params->type.text.color3.g * params->type.text.color3.a) / 255, 638 (params->type.text.color3.g * params->type.text.color3.a) / 255,
639 (params->type.text.color3.b * params->type.text.color3.a) / 255, 639 (params->type.text.color3.b * params->type.text.color3.a) / 255,
640 params->type.text.color3.a)); 640 params->type.text.color3.a));
641 break; 641 break;
642 642
643 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW: 643 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
644 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW; 644 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
645 eo_do(ep->object, 645 eo_do(ep->object,
646 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255, 646 evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
647 (params->type.text.color2.g * params->type.text.color2.a) / 255, 647 (params->type.text.color2.g * params->type.text.color2.a) / 255,
648 (params->type.text.color2.b * params->type.text.color2.a) / 255, 648 (params->type.text.color2.b * params->type.text.color2.a) / 255,
649 params->type.text.color2.a), 649 params->type.text.color2.a),
650 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255, 650 evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
651 (params->type.text.color3.g * params->type.text.color3.a) / 255, 651 (params->type.text.color3.g * params->type.text.color3.a) / 255,
652 (params->type.text.color3.b * params->type.text.color3.a) / 255, 652 (params->type.text.color3.b * params->type.text.color3.a) / 255,
653 params->type.text.color3.a)); 653 params->type.text.color3.a));
654 break; 654 break;
655 655
656 case EDJE_TEXT_EFFECT_FAR_SHADOW: 656 case EDJE_TEXT_EFFECT_FAR_SHADOW:
657 style = EVAS_TEXT_STYLE_FAR_SHADOW; 657 style = EVAS_TEXT_STYLE_FAR_SHADOW;
658 evas_object_text_shadow_color_set(ep->object, 658 evas_object_text_shadow_color_set(ep->object,
659 (params->type.text.color3.r * params->type.text.color3.a) / 255, 659 (params->type.text.color3.r * params->type.text.color3.a) / 255,
660 (params->type.text.color3.g * params->type.text.color3.a) / 255, 660 (params->type.text.color3.g * params->type.text.color3.a) / 255,
661 (params->type.text.color3.b * params->type.text.color3.a) / 255, 661 (params->type.text.color3.b * params->type.text.color3.a) / 255,
662 params->type.text.color3.a); 662 params->type.text.color3.a);
663 break; 663 break;
664 664
665 case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW: 665 case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW:
666 style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; 666 style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
667 evas_object_text_shadow_color_set(ep->object, 667 evas_object_text_shadow_color_set(ep->object,
668 (params->type.text.color3.r * params->type.text.color3.a) / 255, 668 (params->type.text.color3.r * params->type.text.color3.a) / 255,
669 (params->type.text.color3.g * params->type.text.color3.a) / 255, 669 (params->type.text.color3.g * params->type.text.color3.a) / 255,
670 (params->type.text.color3.b * params->type.text.color3.a) / 255, 670 (params->type.text.color3.b * params->type.text.color3.a) / 255,
671 params->type.text.color3.a); 671 params->type.text.color3.a);
672 break; 672 break;
673 673
674 case EDJE_TEXT_EFFECT_GLOW: 674 case EDJE_TEXT_EFFECT_GLOW:
675 style = EVAS_TEXT_STYLE_GLOW; 675 style = EVAS_TEXT_STYLE_GLOW;
676 eo_do(ep->object, 676 eo_do(ep->object,
677 evas_obj_text_glow_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255, 677 evas_obj_text_glow_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
678 (params->type.text.color2.g * params->type.text.color2.a) / 255, 678 (params->type.text.color2.g * params->type.text.color2.a) / 255,
679 (params->type.text.color2.b * params->type.text.color2.a) / 255, 679 (params->type.text.color2.b * params->type.text.color2.a) / 255,
680 params->type.text.color2.a), 680 params->type.text.color2.a),
681 evas_obj_text_glow2_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255, 681 evas_obj_text_glow2_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
682 (params->type.text.color3.g * params->type.text.color3.a) / 255, 682 (params->type.text.color3.g * params->type.text.color3.a) / 255,
683 (params->type.text.color3.b * params->type.text.color3.a) / 255, 683 (params->type.text.color3.b * params->type.text.color3.a) / 255,
684 params->type.text.color3.a)); 684 params->type.text.color3.a));
685 break; 685 break;
686 686
687 default: 687 default:
688 style = EVAS_TEXT_STYLE_PLAIN; 688 style = EVAS_TEXT_STYLE_PLAIN;
689 break; 689 break;
690 } 690 }
691 691
692 switch (effect & EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) 692 switch (effect & EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION)
693 { 693 {
694 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT: 694 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT:
695 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 695 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
696 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT); 696 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT);
697 break; 697 break;
698 698
699 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM: 699 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM:
700 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 700 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
701 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM); 701 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM);
702 break; 702 break;
703 703
704 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT: 704 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT:
705 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 705 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
706 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT); 706 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT);
707 break; 707 break;
708 708
709 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT: 709 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT:
710 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 710 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
711 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT); 711 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT);
712 break; 712 break;
713 713
714 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT: 714 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT:
715 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 715 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
716 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT); 716 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT);
717 break; 717 break;
718 718
719 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP: 719 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP:
720 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 720 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
721 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP); 721 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP);
722 break; 722 break;
723 723
724 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT: 724 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT:
725 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 725 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
726 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT); 726 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT);
727 break; 727 break;
728 728
729 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT: 729 case EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT:
730 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET 730 EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET
731 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT); 731 (style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT);
732 break; 732 break;
733 733
734 default: 734 default:
735 break; 735 break;
736 } 736 }
737 evas_object_text_style_set(ep->object, style); 737 evas_object_text_style_set(ep->object, style);
738 } 738 }
739
740 if (free_text) free((char *)text);
741 if (font2) free(font2);
742 if (sfont) free(sfont);
743}
739 744
740 if (free_text) free((char *)text); 745Evas_Font_Size
741 if (font2) free(font2); 746_edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class * tc)
742 if (sfont) free(sfont); 747{
743 } 748 int val;
744 749
745 Evas_Font_Size 750 if (tc->size == 0)
746 _edje_text_size_calc(Evas_Font_Size size, Edje_Text_Class * tc) 751 {
747 { 752 val = size;
748 int val; 753 }
749 754 else if (tc->size > 0.0)
750 if (tc->size == 0) 755 {
751 { 756 val = tc->size;
752 val = size; 757 }
753 } 758 else
754 else if (tc->size > 0.0) 759 {
755 { 760 val = (size * -tc->size) / 100;
756 val = tc->size; 761 }
757 } 762 return val;
758 else 763}
759 {
760 val = (size * -tc->size) / 100;
761 }
762 return val;
763 }