}
EAPI void
-evas_common_draw_context_cutouts_del(Cutout_Rects* rects,
- int index)
+evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
{
- if ((index >= 0) && (index < rects->active))
+ if ((idx >= 0) && (idx < rects->active))
{
- Cutout_Rect* rect;
+ Cutout_Rect *rect;
- rect = rects->rects + index;
+ rect = rects->rects + idx;
memmove(rect, rect + 1,
- sizeof(Cutout_Rect) * (rects->active - index - 1));
+ sizeof(Cutout_Rect) * (rects->active - idx - 1));
rects->active--;
}
}
}
int
-evas_common_draw_context_cutout_split(Cutout_Rects* res, int index, Cutout_Rect *split)
+evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split)
{
/* 1 input rect, multiple out */
- Cutout_Rect in = res->rects[index];
+ Cutout_Rect in = res->rects[idx];
/* this is to save me a LOT of typing */
#define INX1 (in.x)
R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
/* out => (in.x, SPY2, in.w, INY2 - SPY2) */
- res->rects[index].h = INY2 - SPY2;
- res->rects[index].y = SPY2;
+ res->rects[idx].h = INY2 - SPY2;
+ res->rects[idx].y = SPY2;
return 1;
}
/* SSSSSSS
*/
if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
{
- evas_common_draw_context_cutouts_del(res, index);
+ evas_common_draw_context_cutouts_del(res, idx);
return 0;
}
/* SSS
if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN)
{
/* in => (SPX2, in.y, INX2 - SPX2, in.h) */
- res->rects[index].w = INX2 - SPX2;
- res->rects[index].x = SPX2;
+ res->rects[idx].w = INX2 - SPX2;
+ res->rects[idx].x = SPX2;
return 1;
}
/* S
{
R_NEW(res, in.x, in.y, SPX1 - in.x, in.h);
/* in => (SPX2, in.y, INX2 - SPX2, in.h) */
- res->rects[index].w = INX2 - SPX2;
- res->rects[index].x = SPX2;
+ res->rects[idx].w = INX2 - SPX2;
+ res->rects[idx].x = SPX2;
return 1;
}
/* SSS
if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
{
/* in => (in.x, in.y, SPX1 - in.x, in.h) */
- res->rects[index].w = SPX1 - in.x;
+ res->rects[idx].w = SPX1 - in.x;
return 1;
}
/* SSSSSSS
if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN)
{
/* in => (in.x, SPY2, in.w, INY2 - SPY2) */
- res->rects[index].h = INY2 - SPY2;
- res->rects[index].y = SPY2;
+ res->rects[idx].h = INY2 - SPY2;
+ res->rects[idx].y = SPY2;
return 1;
}
/*
{
R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
/* in => (in.x, in.y, in.w, SPY1 - in.y) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
/*
if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN)
{
/* in => (in.x, in.y, in.w, SPY1 - in.y) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
/* SSS
{
R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
/* in => (in.x, SPY2, in.w, INY2 - SPY2) */
- res->rects[index].h = INY2 - SPY2;
- res->rects[index].y = SPY2;
+ res->rects[idx].h = INY2 - SPY2;
+ res->rects[idx].y = SPY2;
return 1;
}
/* S
R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
/* in => (in.x, SPY2, in.w, INY2 - SPY2) */
- res->rects[index].h = INY2 - SPY2;
- res->rects[index].y = SPY2;
+ res->rects[idx].h = INY2 - SPY2;
+ res->rects[idx].y = SPY2;
return 1;
}
/* SSS
{
R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
/* in => (in.x, SPY2, in.w, INY2 - SPY2) */
- res->rects[index].h = INY2 - SPY2;
- res->rects[index].y = SPY2;
+ res->rects[idx].h = INY2 - SPY2;
+ res->rects[idx].y = SPY2;
return 1;
}
/*
R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
/* in => (in.x, SPY2, in.w, INY2 - SPY2) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
/*
R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
/* in => (in.x, in.y, in.w, SPY1 - in.y) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
/*
{
R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
/* in => (in.x, in.y, in.w, SPY1 - in.y) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
/*
R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
/* in => (in.x, in.y, in.w, SPY1 - in.y) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
/*
{
R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
/* in => (in.x, in.y, in.w, SPY1 - in.y) */
- res->rects[index].h = SPY1 - in.y;
+ res->rects[idx].h = SPY1 - in.y;
return 1;
}
- evas_common_draw_context_cutouts_del(res, index);
+ evas_common_draw_context_cutouts_del(res, idx);
return 0;
#undef INX1
#undef INX2
}
static void
-_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int index)
+_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int idx)
{
int grp, maj, min;
fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
- fash->bucket[grp]->bucket[maj]->item[min].index = index;
+ fash->bucket[grp]->bucket[maj]->item[min].index = idx;
}
static void
}
EAPI RGBA_Font_Glyph *
-evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt index)
+evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
{
RGBA_Font_Glyph *fg;
FT_UInt hindex;
evas_common_font_int_promote(fi);
if (fi->fash)
{
- fg = _fash_gl_find(fi->fash, index);
+ fg = _fash_gl_find(fi->fash, idx);
if (fg == (void *)(-1)) return NULL;
else if (fg) return fg;
}
- hindex = index + (fi->hinting * 500000000);
+ hindex = idx + (fi->hinting * 500000000);
// fg = eina_hash_find(fi->glyphs, &hindex);
// if (fg) return fg;
evas_common_font_int_reload(fi);
FTLOCK();
- error = FT_Load_Glyph(fi->src->ft.face, index,
+ error = FT_Load_Glyph(fi->src->ft.face, idx,
FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP |
hintflags[fi->hinting]);
FTUNLOCK();
if (error)
{
if (!fi->fash) fi->fash = _fash_gl_new();
- if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1));
+ if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
return NULL;
}
{
free(fg);
if (!fi->fash) fi->fash = _fash_gl_new();
- if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1));
+ if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
return NULL;
}
FTUNLOCK();
free(fg);
if (!fi->fash) fi->fash = _fash_gl_new();
- if (fi->fash) _fash_gl_add(fi->fash, index, (void *)(-1));
+ if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
return NULL;
}
FTUNLOCK();
fg->fi = fi;
if (!fi->fash) fi->fash = _fash_gl_new();
- if (fi->fash) _fash_gl_add(fi->fash, index, fg);
+ if (fi->fash) _fash_gl_add(fi->fash, idx, fg);
/* This '+ 200' is just an estimation of how much memory freetype will use
* on it's size. This value is not really used anywhere in code - it's
* only for statistics. */
for (l = fn->fonts; l; l = l->next)
{
RGBA_Font_Int *fi;
- int index;
+ int idx;
fi = l->data;
/*
if (fi->src->charmap) // Charmap loaded, FI/FS blank
{
- index = evas_array_hash_search(fi->src->charmap, gl);
- if (index != 0)
+ idx = evas_array_hash_search(fi->src->charmap, gl);
+ if (idx != 0)
{
evas_common_font_source_load_complete(fi->src);
evas_common_font_int_load_complete(fi);
fi->src->charmap = NULL;
*fi_ret = fi;
- return index;
+ return idx;
}
}
else
}
if (fi->src->ft.face)
{
- index = evas_common_get_char_index(fi, gl);
- if (index != 0)
+ idx = evas_common_get_char_index(fi, gl);
+ if (idx != 0)
{
if (!fi->ft.size)
evas_common_font_int_load_complete(fi);
if (!fn->fash) fn->fash = _fash_int_new();
- if (fn->fash) _fash_int_add(fn->fash, gl, fi, index);
+ if (fn->fash) _fash_int_add(fn->fash, gl, fi, idx);
*fi_ret = fi;
- return index;
+ return idx;
}
else
{
}
return 0;
}
-