Minor cleanup on software_16, evas_soft16_rectangle.c
SVN revision: 32175
This commit is contained in:
parent
6513f67cad
commit
f553a7fab5
|
@ -83,7 +83,7 @@ soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
|
||||||
Evas_Rectangle dr;
|
Evas_Rectangle dr;
|
||||||
Cutout_Rects *rects;
|
Cutout_Rects *rects;
|
||||||
Cutout_Rect *r;
|
Cutout_Rect *r;
|
||||||
int c, cx, cy, cw, ch;
|
struct RGBA_Draw_Context_clip c_bkp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* handle cutouts here! */
|
/* handle cutouts here! */
|
||||||
|
@ -103,14 +103,14 @@ soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* save out clip info */
|
c_bkp = dc->clip;
|
||||||
c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
|
|
||||||
evas_common_draw_context_clip_clip(dc, 0, 0, dst->w, dst->h);
|
evas_common_draw_context_clip_clip(dc, 0, 0, dst->w, dst->h);
|
||||||
evas_common_draw_context_clip_clip(dc, x, y, w, h);
|
evas_common_draw_context_clip_clip(dc, x, y, w, h);
|
||||||
/* our clip is 0 size.. abort */
|
/* our clip is 0 size.. abort */
|
||||||
if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
|
if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
|
||||||
{
|
{
|
||||||
dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
|
dc->clip = c_bkp;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rects = evas_common_draw_context_apply_cutouts(dc);
|
rects = evas_common_draw_context_apply_cutouts(dc);
|
||||||
|
@ -121,7 +121,6 @@ soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
|
||||||
_soft16_rectangle_draw_int(dst, dc, dr);
|
_soft16_rectangle_draw_int(dst, dc, dr);
|
||||||
}
|
}
|
||||||
evas_common_draw_context_apply_clear_cutouts(rects);
|
evas_common_draw_context_apply_clear_cutouts(rects);
|
||||||
/* restore clip info */
|
dc->clip = c_bkp;
|
||||||
dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue