summaryrefslogtreecommitdiff
path: root/legacy/evas/src/lib/engines/common/evas_scale_sample.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/lib/engines/common/evas_scale_sample.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/legacy/evas/src/lib/engines/common/evas_scale_sample.c b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
index 54d255f31c..c8aef859a6 100644
--- a/legacy/evas/src/lib/engines/common/evas_scale_sample.c
+++ b/legacy/evas/src/lib/engines/common/evas_scale_sample.c
@@ -30,9 +30,10 @@ evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
30 int dst_region_x, int dst_region_y, 30 int dst_region_x, int dst_region_y,
31 int dst_region_w, int dst_region_h) 31 int dst_region_w, int dst_region_h)
32{ 32{
33 int c, cx, cy, cw, ch; 33 Cutout_Rects *rects;
34 Cutout_Rect *rects, *r; 34 Cutout_Rect *r;
35 Evas_Object_List *l; 35 int c, cx, cy, cw, ch;
36 int i;
36 /* handle cutouts here! */ 37 /* handle cutouts here! */
37 38
38 if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; 39 if ((dst_region_w <= 0) || (dst_region_h <= 0)) return;
@@ -59,9 +60,9 @@ evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
59 return; 60 return;
60 } 61 }
61 rects = evas_common_draw_context_apply_cutouts(dc); 62 rects = evas_common_draw_context_apply_cutouts(dc);
62 for (l = (Evas_Object_List *)rects; l; l = l->next) 63 for (i = 0; i < rects->active; ++i)
63 { 64 {
64 r = (Cutout_Rect *)l; 65 r = rects->rects + i;
65 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); 66 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
66 scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, 67 scale_rgba_in_to_out_clip_sample_internal(src, dst, dc,
67 src_region_x, src_region_y, 68 src_region_x, src_region_y,
@@ -70,7 +71,7 @@ evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
70 dst_region_w, dst_region_h); 71 dst_region_w, dst_region_h);
71 72
72 } 73 }
73 evas_common_draw_context_apply_free_cutouts(rects); 74 evas_common_draw_context_apply_clear_cutouts(rects);
74 /* restore clip info */ 75 /* restore clip info */
75 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; 76 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
76} 77}