From 685cf5900825b10c952f36301abbbd9968567435 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 3 Dec 2012 20:43:58 +1100 Subject: 9 segment bitmap drawing: Use %x9(id) to draw an image in the whole current viewport using the 9 segment drawer (which draws the corners as normal and *tiles* the middle segments to the needed width/height). Future work is to make it scale instead of tile Change-Id: Ic3ed1cad93f96091694801eb442e0da5a2401203 --- apps/gui/skin_engine/skin_parser.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/gui/skin_engine/skin_parser.c') diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 93f310df56..94adaf3116 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -344,6 +344,9 @@ static int parse_image_display(struct skin_element *element, token->type = SKIN_TOKEN_IMAGE_DISPLAY_LISTICON; } + if (token->type == SKIN_TOKEN_IMAGE_DISPLAY_9SEGMENT) + img->is_9_segment = true; + if (element->params_count > 1) { if (get_param(element, 1)->type == CODE) @@ -417,6 +420,7 @@ static int parse_image_load(struct skin_element *element, img->display = -1; img->using_preloaded_icons = false; img->buflib_handle = -1; + img->is_9_segment = false; /* save current viewport */ img->vp = PTRTOSKINOFFSET(skin_buffer, &curr_vp->vp); @@ -2181,6 +2185,7 @@ static int skin_element_callback(struct skin_element* element, void* data) token->value.data = get_param(element, 0)->data.text; break; case SKIN_TOKEN_IMAGE_PRELOAD_DISPLAY: + case SKIN_TOKEN_IMAGE_DISPLAY_9SEGMENT: function = parse_image_display; break; case SKIN_TOKEN_IMAGE_PRELOAD: -- cgit v1.2.3