From: sunghyun kim Date: Tue, 16 Jul 2024 04:55:19 +0000 (+0900) Subject: [Tizen] Add patch for CUSTOM_SCALING_FACTOR so that it can be used without limitation X-Git-Tag: accepted/tizen/unified/20240717.060615^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F314597%2F1;p=platform%2Fcore%2Fgraphics%2Fcairo.git [Tizen] Add patch for CUSTOM_SCALING_FACTOR so that it can be used without limitation Change-Id: If144273142f00c047821e1ea0fc236e2c48fa281 --- diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 7a79896c7..76dfa22ba 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -1409,35 +1409,45 @@ _cairo_image_surface_shadow_surface (void *surface, if (width < MIN_IMAGE_SHADOW_SIZE) shadow_width = width; else if (has_blur) { - if (width < MIN_IMAGE_SHADOW_SIZE * 2) - shadow_width = MIN_IMAGE_SHADOW_SIZE; - else if (width > MAX_IMAGE_SHADOW_SIZE * 2) - shadow_width = MAX_IMAGE_SHADOW_SIZE; - else - shadow_width = width * shadow_scaling_factor; + if(shadow_scaling_factor != 0.5f){ + shadow_width = width * shadow_scaling_factor; + } + else{ + if (width < MIN_IMAGE_SHADOW_SIZE * 2) + shadow_width = MIN_IMAGE_SHADOW_SIZE; + else if (width > MAX_IMAGE_SHADOW_SIZE * 2) + shadow_width = MAX_IMAGE_SHADOW_SIZE; + else + shadow_width = width * shadow_scaling_factor; + } } else { - if (width > MAX_IMAGE_SHADOW_SIZE) - shadow_width = MAX_IMAGE_SHADOW_SIZE; - else - shadow_width = width; + if (width > MAX_IMAGE_SHADOW_SIZE) + shadow_width = MAX_IMAGE_SHADOW_SIZE; + else + shadow_width = width; } if (height < MIN_IMAGE_SHADOW_SIZE) shadow_height = height; else if (has_blur) { - if (height < MIN_IMAGE_SHADOW_SIZE * 2) - shadow_height = MIN_IMAGE_SHADOW_SIZE; - else if (height > MAX_IMAGE_SHADOW_SIZE * 2) - shadow_height = MAX_IMAGE_SHADOW_SIZE; - else - shadow_height = height * shadow_scaling_factor; + if(shadow_scaling_factor != 0.5f){ + shadow_height = height * shadow_scaling_factor; + } + else{ + if (height < MIN_IMAGE_SHADOW_SIZE * 2) + shadow_height = MIN_IMAGE_SHADOW_SIZE; + else if (height > MAX_IMAGE_SHADOW_SIZE * 2) + shadow_height = MAX_IMAGE_SHADOW_SIZE; + else + shadow_height = height * shadow_scaling_factor; + } } else { - if (height > MAX_IMAGE_SHADOW_SIZE) - shadow_height = MAX_IMAGE_SHADOW_SIZE; - else - shadow_height = height; + if (height > MAX_IMAGE_SHADOW_SIZE) + shadow_height = MAX_IMAGE_SHADOW_SIZE; + else + shadow_height = height; } shadow_surface = (cairo_image_surface_t *)