forked from enlightenment/efl
evas font draw - fix up some whitespace/indenting/formatting
This commit is contained in:
parent
755915a59b
commit
bd1d996545
|
@ -126,19 +126,17 @@ evas_common_font_rgba_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y,
|
|||
if (dc->font_ext.func.gl_image_new_from_data)
|
||||
{
|
||||
/* extension calls */
|
||||
fg->ext_dat = dc->font_ext.func.gl_image_new_from_data(dc->font_ext.data,
|
||||
(unsigned int)w, (unsigned int)h,
|
||||
(DATA32 *)fg->glyph_out->bitmap.buffer,
|
||||
EINA_TRUE,
|
||||
EVAS_COLORSPACE_ARGB8888);
|
||||
fg->ext_dat = dc->font_ext.func.gl_image_new_from_data
|
||||
(dc->font_ext.data, (unsigned int)w, (unsigned int)h,
|
||||
(DATA32 *)fg->glyph_out->bitmap.buffer, EINA_TRUE,
|
||||
EVAS_COLORSPACE_ARGB8888);
|
||||
fg->ext_dat_free = dc->font_ext.func.gl_image_free;
|
||||
}
|
||||
else
|
||||
{
|
||||
fg->ext_dat = _evas_font_image_new_from_data(w, h,
|
||||
(DATA32 *)fg->glyph_out->bitmap.buffer,
|
||||
EINA_TRUE,
|
||||
EVAS_COLORSPACE_ARGB8888);
|
||||
fg->ext_dat = _evas_font_image_new_from_data
|
||||
(w, h, (DATA32 *)fg->glyph_out->bitmap.buffer,
|
||||
EINA_TRUE, EVAS_COLORSPACE_ARGB8888);
|
||||
fg->ext_dat_free = _evas_font_image_free;
|
||||
}
|
||||
}
|
||||
|
@ -152,35 +150,25 @@ evas_common_font_rgba_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y,
|
|||
if (fg->glyph_out->rle)
|
||||
{
|
||||
if ((fg->ext_dat) && (dc->font_ext.func.gl_draw))
|
||||
{
|
||||
dc->font_ext.func.gl_draw(dc->font_ext.data, (void *)dst,
|
||||
dc, fg, chr_x, y - (chr_y - y));
|
||||
}
|
||||
dc->font_ext.func.gl_draw(dc->font_ext.data, dst,
|
||||
dc, fg,
|
||||
chr_x, y - (chr_y - y));
|
||||
else
|
||||
{
|
||||
evas_common_font_glyph_draw(fg, dc, dst, im_w,
|
||||
chr_x, y - (chr_y - y),
|
||||
ext_x, ext_y, ext_w, ext_h);
|
||||
}
|
||||
evas_common_font_glyph_draw(fg, dc, dst, im_w,
|
||||
chr_x, y - (chr_y - y),
|
||||
ext_x, ext_y,
|
||||
ext_w, ext_h);
|
||||
}
|
||||
else if ((fg->ext_dat) && FT_HAS_COLOR(fg->fi->src->ft.face))
|
||||
{
|
||||
if (dc->font_ext.func.gl_image_draw)
|
||||
{
|
||||
dc->font_ext.func.gl_image_draw(dc->font_ext.data,
|
||||
fg->ext_dat,
|
||||
0, 0, w, h,
|
||||
chr_x, y - (chr_y - y), w, h,
|
||||
EINA_TRUE);
|
||||
}
|
||||
dc->font_ext.func.gl_image_draw
|
||||
(dc->font_ext.data, fg->ext_dat, 0, 0, w, h,
|
||||
chr_x, y - (chr_y - y), w, h, EINA_TRUE);
|
||||
else
|
||||
{
|
||||
_evas_font_image_draw(dc, dst,
|
||||
fg->ext_dat,
|
||||
0, 0, w, h,
|
||||
chr_x, y - (chr_y - y), w, h,
|
||||
EINA_TRUE);
|
||||
}
|
||||
_evas_font_image_draw
|
||||
(dc, dst, fg->ext_dat, 0, 0, w, h,
|
||||
chr_x, y - (chr_y - y), w, h, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +249,9 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
|
|||
fi = text_props->font_instance;
|
||||
if (!fi) return;
|
||||
|
||||
if (!text_props->changed && text_props->generation == fi->generation && text_props->glyphs)
|
||||
if ((!text_props->changed) &&
|
||||
(text_props->generation == fi->generation) &&
|
||||
text_props->glyphs)
|
||||
return;
|
||||
|
||||
if (text_props->len < unit) unit = text_props->len;
|
||||
|
@ -319,9 +309,9 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
|
|||
if (evas_cserve2_use_get())
|
||||
evas_cserve2_font_glyph_ref(fg->glyph_out, EINA_TRUE);
|
||||
#endif
|
||||
|
||||
glyph = eina_inarray_grow(glyphs, 1);
|
||||
if (!glyph) goto error;
|
||||
|
||||
glyph = eina_inarray_grow(glyphs, 1);
|
||||
if (!glyph) goto error;
|
||||
|
||||
glyph->fg = fg;
|
||||
glyph->idx = idx;
|
||||
|
|
Loading…
Reference in New Issue