summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-09-06 16:47:36 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-09-06 16:47:36 +0900
commit797ad7528f1d3fb90e66c4e45f7cd349321da9f9 (patch)
tree58857e577da0d5092962a2f8889bc7f3e6d4fa61
parent19fa6862c5a90d80ec983ae6044b1f01f8f7d5a8 (diff)
edje: add border linked to Image sets.
It is quite common that in an image sets each image has different border size. This patch permit to define the border value on a per image basis in the set.
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/bin/edje/edje_cc_handlers.c210
-rw-r--r--src/lib/edje/edje_calc.c19
-rw-r--r--src/lib/edje/edje_data.c5
-rw-r--r--src/lib/edje/edje_private.h5
6 files changed, 190 insertions, 54 deletions
diff --git a/ChangeLog b/ChangeLog
index f115014244..048348a73b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-09-06 Cedric Bail
2
3 * Edje: Add border information to Image sets.
4
12013-09-05 Cedric Bail 52013-09-05 Cedric Bail
2 6
3 * Evas: Add evas_object_smart_iterator_new(). 7 * Evas: Add evas_object_smart_iterator_new().
diff --git a/NEWS b/NEWS
index 0794a9efc7..35a7f1d6e6 100644
--- a/NEWS
+++ b/NEWS
@@ -131,6 +131,7 @@ Additions:
131 - Reduce load time of Edje_Object using Evas_Object_Textblock and many styles. 131 - Reduce load time of Edje_Object using Evas_Object_Textblock and many styles.
132 - Add edje_object_mmap_set. 132 - Add edje_object_mmap_set.
133 - Fix play sample parameter checking. 133 - Fix play sample parameter checking.
134 - Add border information to Image sets.
134 * Eeze: 135 * Eeze:
135 - Add a dummy libmount replacement for when libmount is not there. 136 - Add a dummy libmount replacement for when libmount is not there.
136 * Ecore_Con: 137 * Ecore_Con:
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index aa943cd2d4..7548f159bd 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -161,6 +161,8 @@ static void st_images_set_name(void);
161static void ob_images_set_image(void); 161static void ob_images_set_image(void);
162static void st_images_set_image_image(void); 162static void st_images_set_image_image(void);
163static void st_images_set_image_size(void); 163static void st_images_set_image_size(void);
164static void st_images_set_image_border(void);
165static void st_images_set_image_border_scale_by(void);
164 166
165static void st_fonts_font(void); 167static void st_fonts_font(void);
166 168
@@ -401,6 +403,8 @@ New_Statement_Handler statement_handlers[] =
401 {"images.set.name", st_images_set_name}, 403 {"images.set.name", st_images_set_name},
402 {"images.set.image.image", st_images_set_image_image}, 404 {"images.set.image.image", st_images_set_image_image},
403 {"images.set.image.size", st_images_set_image_size}, 405 {"images.set.image.size", st_images_set_image_size},
406 {"images.set.image.border", st_images_set_image_border},
407 {"images.set.image.scale_by", st_images_set_image_border_scale_by},
404 {"fonts.font", st_fonts_font}, 408 {"fonts.font", st_fonts_font},
405 {"data.item", st_data_item}, 409 {"data.item", st_data_item},
406 {"data.file", st_data_file}, 410 {"data.file", st_data_file},
@@ -416,10 +420,14 @@ New_Statement_Handler statement_handlers[] =
416 {"collections.set.name", st_images_set_name}, /* dup */ 420 {"collections.set.name", st_images_set_name}, /* dup */
417 {"collections.set.image.image", st_images_set_image_image}, /* dup */ 421 {"collections.set.image.image", st_images_set_image_image}, /* dup */
418 {"collections.set.image.size", st_images_set_image_size}, /* dup */ 422 {"collections.set.image.size", st_images_set_image_size}, /* dup */
423 {"collections.set.image.border", st_images_set_image_border}, /* dup */
424 {"collections.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
419 {"collections.images.image", st_images_image}, /* dup */ 425 {"collections.images.image", st_images_image}, /* dup */
420 {"collections.images.set.name", st_images_set_name}, /* dup */ 426 {"collections.images.set.name", st_images_set_name}, /* dup */
421 {"collections.images.set.image.image", st_images_set_image_image}, /* dup */ 427 {"collections.images.set.image.image", st_images_set_image_image}, /* dup */
422 {"collections.images.set.image.size", st_images_set_image_size}, /* dup */ 428 {"collections.images.set.image.size", st_images_set_image_size}, /* dup */
429 {"collections.images.set.image.border", st_images_set_image_border}, /* dup */
430 {"collections.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
423 {"collections.font", st_fonts_font}, /* dup */ 431 {"collections.font", st_fonts_font}, /* dup */
424 {"collections.fonts.font", st_fonts_font}, /* dup */ 432 {"collections.fonts.font", st_fonts_font}, /* dup */
425 {"collections.styles.style.name", st_styles_style_name}, /* dup */ 433 {"collections.styles.style.name", st_styles_style_name}, /* dup */
@@ -451,13 +459,17 @@ New_Statement_Handler statement_handlers[] =
451 {"collections.group.limits.vertical", st_collections_group_limits_vertical}, 459 {"collections.group.limits.vertical", st_collections_group_limits_vertical},
452 {"collections.group.externals.external", st_externals_external}, /* dup */ 460 {"collections.group.externals.external", st_externals_external}, /* dup */
453 {"collections.group.image", st_images_image}, /* dup */ 461 {"collections.group.image", st_images_image}, /* dup */
454 {"collections.group.set.name", st_images_set_name}, 462 {"collections.group.set.name", st_images_set_name}, /* dup */
455 {"collections.group.set.image.image", st_images_set_image_image}, 463 {"collections.group.set.image.image", st_images_set_image_image}, /* dup */
456 {"collections.group.set.image.size", st_images_set_image_size}, 464 {"collections.group.set.image.size", st_images_set_image_size}, /* dup */
465 {"collections.group.set.image.border", st_images_set_image_border}, /* dup */
466 {"collections.group.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
457 {"collections.group.images.image", st_images_image}, /* dup */ 467 {"collections.group.images.image", st_images_image}, /* dup */
458 {"collections.group.images.set.name", st_images_set_name}, 468 {"collections.group.images.set.name", st_images_set_name}, /* dup */
459 {"collections.group.images.set.image.image", st_images_set_image_image}, 469 {"collections.group.images.set.image.image", st_images_set_image_image}, /* dup */
460 {"collections.group.images.set.image.size", st_images_set_image_size}, 470 {"collections.group.images.set.image.size", st_images_set_image_size}, /* dup */
471 {"collections.group.images.set.image.border", st_images_set_image_border}, /* dup */
472 {"collections.group.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
461 {"collections.group.font", st_fonts_font}, /* dup */ 473 {"collections.group.font", st_fonts_font}, /* dup */
462 {"collections.group.fonts.font", st_fonts_font}, /* dup */ 474 {"collections.group.fonts.font", st_fonts_font}, /* dup */
463 {"collections.group.styles.style.name", st_styles_style_name}, /* dup */ 475 {"collections.group.styles.style.name", st_styles_style_name}, /* dup */
@@ -469,13 +481,17 @@ New_Statement_Handler statement_handlers[] =
469 {"collections.group.color_classes.color_class.color3", st_color_class_color3}, /* dup */ 481 {"collections.group.color_classes.color_class.color3", st_color_class_color3}, /* dup */
470 {"collections.group.parts.alias", st_collections_group_parts_alias }, 482 {"collections.group.parts.alias", st_collections_group_parts_alias },
471 {"collections.group.parts.image", st_images_image}, /* dup */ 483 {"collections.group.parts.image", st_images_image}, /* dup */
472 {"collections.group.parts.set.name", st_images_set_name}, 484 {"collections.group.parts.set.name", st_images_set_name}, /* dup */
473 {"collections.group.parts.set.image.image", st_images_set_image_image}, 485 {"collections.group.parts.set.image.image", st_images_set_image_image}, /* dup */
474 {"collections.group.parts.set.image.size", st_images_set_image_size}, 486 {"collections.group.parts.set.image.size", st_images_set_image_size}, /* dup */
487 {"collections.group.parts.set.image.border", st_images_set_image_border}, /* dup */
488 {"collections.group.parts.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
475 {"collections.group.parts.images.image", st_images_image}, /* dup */ 489 {"collections.group.parts.images.image", st_images_image}, /* dup */
476 {"collections.group.parts.images.set.name", st_images_set_name}, 490 {"collections.group.parts.images.set.name", st_images_set_name}, /* dup */
477 {"collections.group.parts.images.set.image.image", st_images_set_image_image}, 491 {"collections.group.parts.images.set.image.image", st_images_set_image_image}, /* dup */
478 {"collections.group.parts.images.set.image.size", st_images_set_image_size}, 492 {"collections.group.parts.images.set.image.size", st_images_set_image_size}, /* dup */
493 {"collections.group.parts.images.set.image.border", st_images_set_image_border}, /* dup */
494 {"collections.group.parts.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
479 {"collections.group.parts.font", st_fonts_font}, /* dup */ 495 {"collections.group.parts.font", st_fonts_font}, /* dup */
480 {"collections.group.parts.fonts.font", st_fonts_font}, /* dup */ 496 {"collections.group.parts.fonts.font", st_fonts_font}, /* dup */
481 {"collections.group.parts.styles.style.name", st_styles_style_name}, /* dup */ 497 {"collections.group.parts.styles.style.name", st_styles_style_name}, /* dup */
@@ -521,13 +537,17 @@ New_Statement_Handler statement_handlers[] =
521 {"collections.group.parts.part.multiline", st_collections_group_parts_part_multiline}, 537 {"collections.group.parts.part.multiline", st_collections_group_parts_part_multiline},
522 {"collections.group.parts.part.access", st_collections_group_parts_part_access}, 538 {"collections.group.parts.part.access", st_collections_group_parts_part_access},
523 {"collections.group.parts.part.image", st_images_image}, /* dup */ 539 {"collections.group.parts.part.image", st_images_image}, /* dup */
524 {"collections.group.parts.part.set.name", st_images_set_name}, 540 {"collections.group.parts.part.set.name", st_images_set_name}, /* dup */
525 {"collections.group.parts.part.set.image.image", st_images_set_image_image}, 541 {"collections.group.parts.part.set.image.image", st_images_set_image_image}, /* dup */
526 {"collections.group.parts.part.set.image.size", st_images_set_image_size}, 542 {"collections.group.parts.part.set.image.size", st_images_set_image_size}, /* dup */
543 {"collections.group.parts.part.set.image.border", st_images_set_image_border}, /* dup */
544 {"collections.group.parts.part.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
527 {"collections.group.parts.part.images.image", st_images_image}, /* dup */ 545 {"collections.group.parts.part.images.image", st_images_image}, /* dup */
528 {"collections.group.parts.part.images.set.name", st_images_set_name}, 546 {"collections.group.parts.part.images.set.name", st_images_set_name}, /* dup */
529 {"collections.group.parts.part.images.set.image.image", st_images_set_image_image}, 547 {"collections.group.parts.part.images.set.image.image", st_images_set_image_image}, /* dup */
530 {"collections.group.parts.part.images.set.image.size", st_images_set_image_size}, 548 {"collections.group.parts.part.images.set.image.size", st_images_set_image_size}, /* dup */
549 {"collections.group.parts.part.images.set.image.border", st_images_set_image_border}, /* dup */
550 {"collections.group.parts.part.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
531 {"collections.group.parts.part.font", st_fonts_font}, /* dup */ 551 {"collections.group.parts.part.font", st_fonts_font}, /* dup */
532 {"collections.group.parts.part.fonts.font", st_fonts_font}, /* dup */ 552 {"collections.group.parts.part.fonts.font", st_fonts_font}, /* dup */
533 {"collections.group.parts.part.styles.style.name", st_styles_style_name}, /* dup */ 553 {"collections.group.parts.part.styles.style.name", st_styles_style_name}, /* dup */
@@ -591,13 +611,17 @@ New_Statement_Handler statement_handlers[] =
591 {"collections.group.parts.part.description.image.normal", st_collections_group_parts_part_description_image_normal}, 611 {"collections.group.parts.part.description.image.normal", st_collections_group_parts_part_description_image_normal},
592 {"collections.group.parts.part.description.image.tween", st_collections_group_parts_part_description_image_tween}, 612 {"collections.group.parts.part.description.image.tween", st_collections_group_parts_part_description_image_tween},
593 {"collections.group.parts.part.description.image.image", st_images_image}, /* dup */ 613 {"collections.group.parts.part.description.image.image", st_images_image}, /* dup */
594 {"collections.group.parts.part.description.image.set.name", st_images_set_name}, 614 {"collections.group.parts.part.description.image.set.name", st_images_set_name}, /* dup */
595 {"collections.group.parts.part.description.image.set.image.image", st_images_set_image_image}, 615 {"collections.group.parts.part.description.image.set.image.image", st_images_set_image_image}, /* dup */
596 {"collections.group.parts.part.description.image.set.image.size", st_images_set_image_size}, 616 {"collections.group.parts.part.description.image.set.image.size", st_images_set_image_size}, /* dup */
617 {"collections.group.parts.part.description.images.set.image.border", st_images_set_image_border}, /* dup */
618 {"collections.group.parts.part.description.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
597 {"collections.group.parts.part.description.image.images.image", st_images_image}, /* dup */ 619 {"collections.group.parts.part.description.image.images.image", st_images_image}, /* dup */
598 {"collections.group.parts.part.description.image.images.set.name", st_images_set_name}, 620 {"collections.group.parts.part.description.image.images.set.name", st_images_set_name}, /* dup */
599 {"collections.group.parts.part.description.image.images.set.image.image", st_images_set_image_image}, 621 {"collections.group.parts.part.description.image.images.set.image.image", st_images_set_image_image}, /* dup */
600 {"collections.group.parts.part.description.image.images.set.image.size", st_images_set_image_size}, 622 {"collections.group.parts.part.description.image.images.set.image.size", st_images_set_image_size}, /* dup */
623 {"collections.group.parts.part.description.image.images.set.image.border", st_images_set_image_border}, /* dup */
624 {"collections.group.parts.part.description.image.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
601 {"collections.group.parts.part.description.image.border", st_collections_group_parts_part_description_image_border}, 625 {"collections.group.parts.part.description.image.border", st_collections_group_parts_part_description_image_border},
602 {"collections.group.parts.part.description.image.middle", st_collections_group_parts_part_description_image_middle}, 626 {"collections.group.parts.part.description.image.middle", st_collections_group_parts_part_description_image_middle},
603 {"collections.group.parts.part.description.image.border_scale", st_collections_group_parts_part_description_image_border_scale}, 627 {"collections.group.parts.part.description.image.border_scale", st_collections_group_parts_part_description_image_border_scale},
@@ -681,9 +705,11 @@ New_Statement_Handler statement_handlers[] =
681 {"collections.group.parts.part.description.params.bool", st_collections_group_parts_part_description_params_bool}, 705 {"collections.group.parts.part.description.params.bool", st_collections_group_parts_part_description_params_bool},
682 {"collections.group.parts.part.description.params.choice", st_collections_group_parts_part_description_params_choice}, 706 {"collections.group.parts.part.description.params.choice", st_collections_group_parts_part_description_params_choice},
683 {"collections.group.parts.part.description.images.image", st_images_image}, /* dup */ 707 {"collections.group.parts.part.description.images.image", st_images_image}, /* dup */
684 {"collections.group.parts.part.description.images.set.name", st_images_set_name}, 708 {"collections.group.parts.part.description.images.set.name", st_images_set_name}, /* dup */
685 {"collections.group.parts.part.description.images.set.image.image", st_images_set_image_image}, 709 {"collections.group.parts.part.description.images.set.image.image", st_images_set_image_image}, /* dup */
686 {"collections.group.parts.part.description.images.set.image.size", st_images_set_image_size}, 710 {"collections.group.parts.part.description.images.set.image.size", st_images_set_image_size}, /* dup */
711 {"collections.group.parts.part.description.images.set.image.border", st_images_set_image_border}, /* dup */
712 {"collections.group.parts.part.description.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
687 {"collections.group.parts.part.description.font", st_fonts_font}, /* dup */ 713 {"collections.group.parts.part.description.font", st_fonts_font}, /* dup */
688 {"collections.group.parts.part.description.fonts.font", st_fonts_font}, /* dup */ 714 {"collections.group.parts.part.description.fonts.font", st_fonts_font}, /* dup */
689 {"collections.group.parts.part.description.styles.style.name", st_styles_style_name}, /* dup */ 715 {"collections.group.parts.part.description.styles.style.name", st_styles_style_name}, /* dup */
@@ -694,13 +720,17 @@ New_Statement_Handler statement_handlers[] =
694 {"collections.group.parts.part.description.color_classes.color_class.color2", st_color_class_color2}, /* dup */ 720 {"collections.group.parts.part.description.color_classes.color_class.color2", st_color_class_color2}, /* dup */
695 {"collections.group.parts.part.description.color_classes.color_class.color3", st_color_class_color3}, /* dup */ 721 {"collections.group.parts.part.description.color_classes.color_class.color3", st_color_class_color3}, /* dup */
696 {"collections.group.parts.part.description.programs.image", st_images_image}, /* dup */ 722 {"collections.group.parts.part.description.programs.image", st_images_image}, /* dup */
697 {"collections.group.parts.part.description.programs.set.name", st_images_set_name}, 723 {"collections.group.parts.part.description.programs.set.name", st_images_set_name}, /* dup */
698 {"collections.group.parts.part.description.programs.set.image.image", st_images_set_image_image}, 724 {"collections.group.parts.part.description.programs.set.image.image", st_images_set_image_image}, /* dup */
699 {"collections.group.parts.part.description.programs.set.image.size", st_images_set_image_size}, 725 {"collections.group.parts.part.description.programs.set.image.size", st_images_set_image_size}, /* dup */
726 {"collections.group.parts.part.description.programs.set.image.border", st_images_set_image_border}, /* dup */
727 {"collections.group.parts.part.description.programs.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
700 {"collections.group.parts.part.description.programs.images.image", st_images_image}, /* dup */ 728 {"collections.group.parts.part.description.programs.images.image", st_images_image}, /* dup */
701 {"collections.group.parts.part.description.programs.images.set.name", st_images_set_name}, 729 {"collections.group.parts.part.description.programs.images.set.name", st_images_set_name}, /* dup */
702 {"collections.group.parts.part.description.programs.images.set.image.image", st_images_set_image_image}, 730 {"collections.group.parts.part.description.programs.images.set.image.image", st_images_set_image_image}, /* dup */
703 {"collections.group.parts.part.description.programs.images.set.image.size", st_images_set_image_size}, 731 {"collections.group.parts.part.description.programs.images.set.image.size", st_images_set_image_size}, /* dup */
732 {"collections.group.parts.part.description.programs.images.set.image.border", st_images_set_image_border}, /* dup */
733 {"collections.group.parts.part.description.programs.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
704 {"collections.group.parts.part.description.programs.font", st_fonts_font}, /* dup */ 734 {"collections.group.parts.part.description.programs.font", st_fonts_font}, /* dup */
705 {"collections.group.parts.part.description.programs.fonts.font", st_fonts_font}, /* dup */ 735 {"collections.group.parts.part.description.programs.fonts.font", st_fonts_font}, /* dup */
706 {"collections.group.parts.part.description.programs.program.name", st_collections_group_programs_program_name}, /* dup */ 736 {"collections.group.parts.part.description.programs.program.name", st_collections_group_programs_program_name}, /* dup */
@@ -722,13 +752,17 @@ New_Statement_Handler statement_handlers[] =
722 {"collections.group.parts.part.description.program.after", st_collections_group_programs_program_after}, /* dup */ 752 {"collections.group.parts.part.description.program.after", st_collections_group_programs_program_after}, /* dup */
723 {"collections.group.parts.part.description.program.api", st_collections_group_programs_program_api}, /* dup */ 753 {"collections.group.parts.part.description.program.api", st_collections_group_programs_program_api}, /* dup */
724 {"collections.group.parts.part.programs.image", st_images_image}, /* dup */ 754 {"collections.group.parts.part.programs.image", st_images_image}, /* dup */
725 {"collections.group.parts.part.programs.set.name", st_images_set_name}, 755 {"collections.group.parts.part.programs.set.name", st_images_set_name}, /* dup */
726 {"collections.group.parts.part.programs.set.image.image", st_images_set_image_image}, 756 {"collections.group.parts.part.programs.set.image.image", st_images_set_image_image}, /* dup */
727 {"collections.group.parts.part.programs.set.image.size", st_images_set_image_size}, 757 {"collections.group.parts.part.programs.set.image.size", st_images_set_image_size}, /* dup */
758 {"collections.group.parts.part.programs.set.image.border", st_images_set_image_border}, /* dup */
759 {"collections.group.parts.part.programs.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
728 {"collections.group.parts.part.programs.images.image", st_images_image}, /* dup */ 760 {"collections.group.parts.part.programs.images.image", st_images_image}, /* dup */
729 {"collections.group.parts.part.programs.images.set.name", st_images_set_name}, 761 {"collections.group.parts.part.programs.images.set.name", st_images_set_name}, /* dup */
730 {"collections.group.parts.part.programs.images.set.image.image", st_images_set_image_image}, 762 {"collections.group.parts.part.programs.images.set.image.image", st_images_set_image_image}, /* dup */
731 {"collections.group.parts.part.programs.images.set.image.size", st_images_set_image_size}, 763 {"collections.group.parts.part.programs.images.set.image.size", st_images_set_image_size}, /* dup */
764 {"collections.group.parts.part.programs.images.set.image.border", st_images_set_image_border}, /* dup */
765 {"collections.group.parts.part.programs.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
732 {"collections.group.parts.part.programs.font", st_fonts_font}, /* dup */ 766 {"collections.group.parts.part.programs.font", st_fonts_font}, /* dup */
733 {"collections.group.parts.part.programs.fonts.font", st_fonts_font}, /* dup */ 767 {"collections.group.parts.part.programs.fonts.font", st_fonts_font}, /* dup */
734 {"collections.group.parts.part.programs.program.name", st_collections_group_programs_program_name}, /* dup */ 768 {"collections.group.parts.part.programs.program.name", st_collections_group_programs_program_name}, /* dup */
@@ -750,13 +784,17 @@ New_Statement_Handler statement_handlers[] =
750 {"collections.group.parts.part.program.after", st_collections_group_programs_program_after}, /* dup */ 784 {"collections.group.parts.part.program.after", st_collections_group_programs_program_after}, /* dup */
751 {"collections.group.parts.part.program.api", st_collections_group_programs_program_api}, /* dup */ 785 {"collections.group.parts.part.program.api", st_collections_group_programs_program_api}, /* dup */
752 {"collections.group.parts.programs.image", st_images_image}, /* dup */ 786 {"collections.group.parts.programs.image", st_images_image}, /* dup */
753 {"collections.group.parts.programs.set.name", st_images_set_name}, 787 {"collections.group.parts.programs.set.name", st_images_set_name}, /* dup */
754 {"collections.group.parts.programs.set.image.image", st_images_set_image_image}, 788 {"collections.group.parts.programs.set.image.image", st_images_set_image_image}, /* dup */
755 {"collections.group.parts.programs.set.image.size", st_images_set_image_size}, 789 {"collections.group.parts.programs.set.image.size", st_images_set_image_size}, /* dup */
790 {"collections.group.parts.programs.set.image.border", st_images_set_image_border}, /* dup */
791 {"collections.group.parts.programs.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
756 {"collections.group.parts.programs.images.image", st_images_image}, /* dup */ 792 {"collections.group.parts.programs.images.image", st_images_image}, /* dup */
757 {"collections.group.parts.programs.images.set.name", st_images_set_name}, 793 {"collections.group.parts.programs.images.set.name", st_images_set_name}, /* dup */
758 {"collections.group.parts.programs.images.set.image.image", st_images_set_image_image}, 794 {"collections.group.parts.programs.images.set.image.image", st_images_set_image_image}, /* dup */
759 {"collections.group.parts.programs.images.set.image.size", st_images_set_image_size}, 795 {"collections.group.parts.programs.images.set.image.size", st_images_set_image_size}, /* dup */
796 {"collections.group.parts.programs.images.set.image.border", st_images_set_image_border}, /* dup */
797 {"collections.group.parts.programs.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
760 {"collections.group.parts.programs.font", st_fonts_font}, /* dup */ 798 {"collections.group.parts.programs.font", st_fonts_font}, /* dup */
761 {"collections.group.parts.programs.fonts.font", st_fonts_font}, /* dup */ 799 {"collections.group.parts.programs.fonts.font", st_fonts_font}, /* dup */
762 {"collections.group.parts.programs.program.name", st_collections_group_programs_program_name}, /* dup */ 800 {"collections.group.parts.programs.program.name", st_collections_group_programs_program_name}, /* dup */
@@ -806,13 +844,17 @@ New_Statement_Handler statement_handlers[] =
806 {"collections.group.programs.program.after", st_collections_group_programs_program_after}, 844 {"collections.group.programs.program.after", st_collections_group_programs_program_after},
807 {"collections.group.programs.program.api", st_collections_group_programs_program_api}, 845 {"collections.group.programs.program.api", st_collections_group_programs_program_api},
808 {"collections.group.programs.image", st_images_image}, /* dup */ 846 {"collections.group.programs.image", st_images_image}, /* dup */
809 {"collections.group.programs.set.name", st_images_set_name}, 847 {"collections.group.programs.set.name", st_images_set_name}, /* dup */
810 {"collections.group.programs.set.image.image", st_images_set_image_image}, 848 {"collections.group.programs.set.image.image", st_images_set_image_image}, /* dup */
811 {"collections.group.programs.set.image.size", st_images_set_image_size}, 849 {"collections.group.programs.set.image.size", st_images_set_image_size}, /* dup */
850 {"collections.group.programs.set.image.border", st_images_set_image_border}, /* dup */
851 {"collections.group.programs.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
812 {"collections.group.programs.images.image", st_images_image}, /* dup */ 852 {"collections.group.programs.images.image", st_images_image}, /* dup */
813 {"collections.group.programs.images.set.name", st_images_set_name}, 853 {"collections.group.programs.images.set.name", st_images_set_name}, /* dup */
814 {"collections.group.programs.images.set.image.image", st_images_set_image_image}, 854 {"collections.group.programs.images.set.image.image", st_images_set_image_image}, /* dup */
815 {"collections.group.programs.images.set.image.size", st_images_set_image_size}, 855 {"collections.group.programs.images.set.image.size", st_images_set_image_size}, /* dup */
856 {"collections.group.programs.images.set.image.border", st_images_set_image_border}, /* dup */
857 {"collections.group.programs.images.set.image.scale_by", st_images_set_image_border_scale_by}, /* dup */
816 {"collections.group.programs.font", st_fonts_font}, /* dup */ 858 {"collections.group.programs.font", st_fonts_font}, /* dup */
817 {"collections.group.programs.fonts.font", st_fonts_font} /* dup */ 859 {"collections.group.programs.fonts.font", st_fonts_font} /* dup */
818}; 860};
@@ -1697,6 +1739,72 @@ st_images_set_image_size(void)
1697} 1739}
1698 1740
1699/** 1741/**
1742 @page edcref
1743 @property
1744 border
1745 @parameters
1746 [left] [right] [top] [bottom]
1747 @since 1.8
1748 @effect
1749 If set, the area (in pixels) of each side of the image will be
1750 displayed as a fixed size border, from the side -> inwards, preventing
1751 the corners from being changed on a resize.
1752 @endproperty
1753*/
1754static void
1755st_images_set_image_border(void)
1756{
1757 Edje_Image_Directory_Set_Entry *entry;
1758 Edje_Image_Directory_Set *set;
1759
1760 set = edje_file->image_dir->sets + edje_file->image_dir->sets_count - 1;
1761 entry = eina_list_data_get(eina_list_last(set->entries));
1762
1763 entry->border.l = parse_int_range(0, 0, 0x7fffffff);
1764 entry->border.r = parse_int_range(1, 0, 0x7fffffff);
1765 entry->border.t = parse_int_range(2, 0, 0x7fffffff);
1766 entry->border.b = parse_int_range(3, 0, 0x7fffffff);
1767}
1768
1769
1770/**
1771 @page edcref
1772 @property
1773 border_scale_by
1774 @parameters
1775 0.0 or bigger (0.0 or 1.0 to turn it off)
1776 @since 1.8
1777 @effect
1778 If border scaling is enabled then normally the OUTPUT border sizes
1779 (e.g. if 3 pixels on the left edge are set as a border, then normally
1780 at scale 1.0, those 3 columns will always be the exact 3 columns of
1781 output, or at scale 2.0 they will be 6 columns, or 0.33 they will merge
1782 into a single column). This property multiplies the input scale
1783 factor by this multiplier, allowing the creation of "supersampled"
1784 borders to make much higher resolution outputs possible by always using
1785 the highest resolution artwork and then runtime scaling it down.
1786 @endproperty
1787*/
1788static void
1789st_images_set_image_border_scale_by(void)
1790{
1791 Edje_Part_Description_Image *ed;
1792
1793 check_arg_count(1);
1794
1795 if (current_part->type != EDJE_PART_TYPE_IMAGE)
1796 {
1797 ERR("parse error %s:%i. image attributes in non-IMAGE part.",
1798 file_in, line - 1);
1799 exit(-1);
1800 }
1801
1802 ed = (Edje_Part_Description_Image*) current_desc;
1803
1804 ed->image.border.scale_by = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
1805}
1806
1807/**
1700 @edcsubsection{toplevel_fonts,Fonts} 1808 @edcsubsection{toplevel_fonts,Fonts}
1701 */ 1809 */
1702 1810
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 0967a3702c..4ef7f48b9f 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -9,7 +9,7 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Real_Part *ep,
9 Edje_Real_Part *rel1_to_x, Edje_Real_Part *rel1_to_y, 9 Edje_Real_Part *rel1_to_x, Edje_Real_Part *rel1_to_y,
10 Edje_Real_Part *rel2_to_x, Edje_Real_Part *rel2_to_y, 10 Edje_Real_Part *rel2_to_x, Edje_Real_Part *rel2_to_y,
11 Edje_Real_Part *confine_to, Edje_Real_Part *threshold, 11 Edje_Real_Part *confine_to, Edje_Real_Part *threshold,
12 Edje_Calc_Params *params, 12 Edje_Calc_Params *params, Edje_Real_Part_Set *set,
13 Evas_Coord mmw, Evas_Coord mmh, 13 Evas_Coord mmw, Evas_Coord mmh,
14 FLOAT_T pos); 14 FLOAT_T pos);
15 15
@@ -2239,6 +2239,7 @@ _edje_part_recalc_single(Edje *ed,
2239 Edje_Real_Part *confine_to, 2239 Edje_Real_Part *confine_to,
2240 Edje_Real_Part *threshold, 2240 Edje_Real_Part *threshold,
2241 Edje_Calc_Params *params, 2241 Edje_Calc_Params *params,
2242 Edje_Real_Part_Set *set,
2242 Evas_Coord mmw, Evas_Coord mmh, 2243 Evas_Coord mmw, Evas_Coord mmh,
2243 FLOAT_T pos) 2244 FLOAT_T pos)
2244{ 2245{
@@ -2445,6 +2446,18 @@ _edje_part_recalc_single(Edje *ed,
2445 params->type.common.spec.image.b = img_desc->image.border.b; 2446 params->type.common.spec.image.b = img_desc->image.border.b;
2446 2447
2447 params->type.common.spec.image.border_scale_by = img_desc->image.border.scale_by; 2448 params->type.common.spec.image.border_scale_by = img_desc->image.border.scale_by;
2449
2450 if (set && set->set)
2451 {
2452#define SET_BORDER_DEFINED(Result, Value) Result = Value ? Value : Result;
2453 SET_BORDER_DEFINED(params->type.common.spec.image.l, set->entry->border.l);
2454 SET_BORDER_DEFINED(params->type.common.spec.image.r, set->entry->border.r);
2455 SET_BORDER_DEFINED(params->type.common.spec.image.t, set->entry->border.t);
2456 SET_BORDER_DEFINED(params->type.common.spec.image.b, set->entry->border.b);
2457
2458 SET_BORDER_DEFINED(params->type.common.spec.image.border_scale_by, set->entry->border.scale_by);
2459 }
2460
2448 break; 2461 break;
2449 } 2462 }
2450 case EDJE_PART_TYPE_TEXT: 2463 case EDJE_PART_TYPE_TEXT:
@@ -3356,7 +3369,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3356 _edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc, center[0], light[0], persp[0], 3369 _edje_part_recalc_single(ed, ep, ep->param1.description, chosen_desc, center[0], light[0], persp[0],
3357 rp1[Rel1X], rp1[Rel1Y], rp1[Rel2X], rp1[Rel2Y], 3370 rp1[Rel1X], rp1[Rel1Y], rp1[Rel2X], rp1[Rel2Y],
3358 confine_to, threshold, 3371 confine_to, threshold,
3359 p1, mmw, mmh, pos); 3372 p1, ep->param1.set, mmw, mmh, pos);
3360#ifdef EDJE_CALC_CACHE 3373#ifdef EDJE_CALC_CACHE
3361 if (flags == FLAG_XY) 3374 if (flags == FLAG_XY)
3362 ep->param1.state = ed->state; 3375 ep->param1.state = ed->state;
@@ -3426,7 +3439,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3426 rp2[Rel2X], 3439 rp2[Rel2X],
3427 rp2[Rel2Y], 3440 rp2[Rel2Y],
3428 confine_to, threshold, 3441 confine_to, threshold,
3429 p2, mmw, mmh, pos); 3442 p2, ep->param2->set, mmw, mmh, pos);
3430#ifdef EDJE_CALC_CACHE 3443#ifdef EDJE_CALC_CACHE
3431 if (flags == FLAG_XY) 3444 if (flags == FLAG_XY)
3432 ep->param2->state = ed->state; 3445 ep->param2->state = ed->state;
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 20725a06f8..f9e48eef82 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -311,6 +311,11 @@ _edje_edd_init(void)
311 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "min.h", size.min.h, EET_T_INT); 311 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "min.h", size.min.h, EET_T_INT);
312 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "max.w", size.max.w, EET_T_INT); 312 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "max.w", size.max.w, EET_T_INT);
313 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "max.h", size.max.h, EET_T_INT); 313 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "max.h", size.max.h, EET_T_INT);
314 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "border.l", border.l, EET_T_INT);
315 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "border.r", border.r, EET_T_INT);
316 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "border.t", border.t, EET_T_INT);
317 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "border.b", border.b, EET_T_INT);
318 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_image_directory_set_entry, Edje_Image_Directory_Set_Entry, "border.scale_by", border.scale_by, EDJE_T_FLOAT);
314 319
315 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Image_Directory_Set); 320 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Image_Directory_Set);
316 _edje_edd_edje_image_directory_set = 321 _edje_edd_edje_image_directory_set =
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index b850992ec8..b1c199f6ae 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -580,6 +580,11 @@ struct _Edje_Image_Directory_Set_Entry
580 int h; 580 int h;
581 } min, max; 581 } min, max;
582 } size; 582 } size;
583
584 struct {
585 int l, r, t, b;
586 FLOAT_T scale_by;
587 } border;
583}; 588};
584 589
585struct _Edje_Sound_Sample /*Sound Sample*/ 590struct _Edje_Sound_Sample /*Sound Sample*/