Пример #1
0
void BLF_default_set(int fontid)
{
	FontBLF *font = blf_get(fontid);
	if (font || fontid == -1) {
		global_font_default = fontid;
	}
}
Пример #2
0
void BLF_rotation_default(float angle)
{
	FontBLF *font = blf_get(global_font_default);

	if (font) {
		font->angle = angle;
	}
}
Пример #3
0
void BLF_buffer_col(int fontid, float r, float g, float b, float a)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		ARRAY_SET_ITEMS(font->buf_info.col_init, r, g, b, a);
	}
}
Пример #4
0
void BLF_size(int fontid, int size, int dpi)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		blf_font_size(font, size, dpi);
	}
}
Пример #5
0
void BLF_rotation(int fontid, float angle)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->angle = angle;
	}
}
Пример #6
0
void BLF_disable(int fontid, int option)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->flags &= ~option;
	}
}
Пример #7
0
void BLF_enable(int fontid, int option)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->flags |= option;
	}
}
Пример #8
0
void BLF_disable_default(int option)
{
	FontBLF *font = blf_get(global_font_default);

	if (font) {
		font->flags &= ~option;
	}
}
Пример #9
0
void BLF_unload_id(int fontid)
{
	FontBLF *font = blf_get(fontid);
	if (font) {
		blf_font_free(font);
		global_font[fontid] = NULL;
	}
}
Пример #10
0
void BLF_wordwrap(int fontid, int wrap_width)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->wrap_width = wrap_width;
	}
}
Пример #11
0
void BLF_blur(int fontid, int size)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->blur = size;
	}
}
Пример #12
0
void BLF_draw_buffer(int fontid, const char *str)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache && (font->buf_info.fbuf || font->buf_info.cbuf)) {
		blf_font_buffer(font, str);
	}
}
Пример #13
0
void BLF_boundbox(int fontid, const char *str, size_t len, rctf *box)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		blf_font_boundbox(font, str, len, box);
	}
}
Пример #14
0
void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		blf_font_attach_from_mem(font, mem, mem_size);
	}
}
Пример #15
0
void BLF_matrix(int fontid, const double m[16])
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		memcpy(font->m, m, sizeof(font->m));
	}
}
Пример #16
0
void BLF_shadow_offset(int fontid, int x, int y)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->shadow_x = x;
		font->shadow_y = y;
	}
}
Пример #17
0
float BLF_height(int fontid, const char *str, size_t len)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache) {
		return blf_font_height(font, str, len);
	}

	return 0.0f;
}
Пример #18
0
float BLF_ascender(int fontid)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache) {
		return font->glyph_cache->ascender;
	}

	return 0.0f;
}
Пример #19
0
float BLF_width_max(int fontid)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache) {
		return font->glyph_cache->max_glyph_width;
	}

	return 0.0f;
}
Пример #20
0
int BLF_height_max(int fontid)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache) {
		return font->glyph_cache->max_glyph_height;
	}

	return 0;
}
Пример #21
0
float BLF_fixed_width(int fontid)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache) {
		return blf_font_fixed_width(font);
	}

	return 0.0f;
}
Пример #22
0
void BLF_aspect(int fontid, float x, float y, float z)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->aspect[0] = x;
		font->aspect[1] = y;
		font->aspect[2] = z;
	}
}
Пример #23
0
void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->clip_rec.xmin = xmin;
		font->clip_rec.ymin = ymin;
		font->clip_rec.xmax = xmax;
		font->clip_rec.ymax = ymax;
	}
}
Пример #24
0
void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax)
{
	FontBLF *font = blf_get(global_font_default);

	if (font) {
		font->clip_rec.xmin = xmin;
		font->clip_rec.ymin = ymin;
		font->clip_rec.xmax = xmax;
		font->clip_rec.ymax = ymax;
	}
}
Пример #25
0
void BLF_width_and_height(int fontid, const char *str, size_t len, float *r_width, float *r_height)
{
	FontBLF *font = blf_get(fontid);

	if (font && font->glyph_cache) {
		blf_font_width_and_height(font, str, len, r_width, r_height, NULL);
	}
	else {
		*r_width = *r_height = 0.0f;
	}
}
Пример #26
0
void BLF_draw_ascii(int fontid, const char *str, size_t len)
{
	FontBLF *font = blf_get(fontid);
	GLint mode, param;

	if (font && font->glyph_cache) {
		blf_draw__start(font, &mode, &param);
		blf_font_draw_ascii(font, str, len);
		blf_draw__end(mode, param);
	}
}
Пример #27
0
void BLF_buffer_col(int fontid, float r, float g, float b, float a)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->buf_info.col[0] = r;
		font->buf_info.col[1] = g;
		font->buf_info.col[2] = b;
		font->buf_info.col[3] = a;
	}
}
Пример #28
0
void BLF_shadow(int fontid, int level, float r, float g, float b, float a)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->shadow = level;
		font->shadow_col[0] = r;
		font->shadow_col[1] = g;
		font->shadow_col[2] = b;
		font->shadow_col[3] = a;
	}
}
Пример #29
0
void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, struct ColorManagedDisplay *display)
{
	FontBLF *font = blf_get(fontid);

	if (font) {
		font->buf_info.fbuf = fbuf;
		font->buf_info.cbuf = cbuf;
		font->buf_info.w = w;
		font->buf_info.h = h;
		font->buf_info.ch = nch;
		font->buf_info.display = display;
	}
}
Пример #30
0
float BLF_height_ex(
        int fontid, const char *str, size_t len,
        struct ResultBLF *r_info)
{
	FontBLF *font = blf_get(fontid);

	BLF_RESULT_CHECK_INIT(r_info);

	if (font && font->glyph_cache) {
		return blf_font_height(font, str, len, r_info);
	}

	return 0.0f;
}