Blender V2.61 - r43446
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ft2build.h>
#include "MEM_guardedalloc.h"
#include "DNA_vec_types.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BIF_gl.h"
#include "BLF_api.h"
#include "blf_internal_types.h"
#include "blf_internal.h"
Go to the source code of this file.
Functions | |
GlyphCacheBLF * | blf_glyph_cache_find (FontBLF *font, int size, int dpi) |
GlyphCacheBLF * | blf_glyph_cache_new (FontBLF *font) |
void | blf_glyph_cache_clear (FontBLF *font) |
void | blf_glyph_cache_free (GlyphCacheBLF *gc) |
static void | blf_glyph_cache_texture (FontBLF *font, GlyphCacheBLF *gc) |
GlyphBLF * | blf_glyph_search (GlyphCacheBLF *gc, unsigned int c) |
GlyphBLF * | blf_glyph_add (FontBLF *font, unsigned int index, unsigned int c) |
void | blf_glyph_free (GlyphBLF *g) |
static void | blf_texture_draw (float uv[2][2], float dx, float y1, float dx1, float y2) |
static void | blf_texture5_draw (const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2) |
static void | blf_texture3_draw (const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2) |
int | blf_glyph_render (FontBLF *font, GlyphBLF *g, float x, float y) |
Definition in file blf_glyph.c.
Definition at line 209 of file blf_glyph.c.
References GlyphBLF::advance, GlyphBLF::bitmap, blf_glyph_search(), blf_hash(), BLI_addhead(), GlyphBLF::box, GlyphCacheBLF::bucket, GlyphBLF::c, err, FontBLF::face, FontBLF::ft_lib, g, FontBLF::glyph_cache, GlyphBLF::height, i, GlyphBLF::idx, MEM_callocN(), MEM_mallocN(), NULL, GlyphBLF::pitch, GlyphBLF::pos_x, GlyphBLF::pos_y, UserDef::text_render, U, USER_TEXT_DISABLE_AA, GlyphBLF::width, rctf::xmax, rctf::xmin, GlyphBLF::xoff, rctf::ymax, rctf::ymin, and GlyphBLF::yoff.
Referenced by blf_font_ensure_ascii_table(), and blf_font_fixed_width().
void blf_glyph_cache_clear | ( | FontBLF * | font | ) |
Definition at line 118 of file blf_glyph.c.
References blf_glyph_free(), BLI_remlink(), GlyphCacheBLF::bucket, FontBLF::cache, ListBase::first, g, GlyphCacheBLF::glyph_ascii_table, i, and GlyphCacheBLF::next.
Referenced by BLF_cache_clear().
GlyphCacheBLF* blf_glyph_cache_find | ( | FontBLF * | font, |
int | size, | ||
int | dpi | ||
) | [read] |
Definition at line 58 of file blf_glyph.c.
References FontBLF::cache, GlyphCacheBLF::dpi, ListBase::first, GlyphCacheBLF::next, NULL, p, and GlyphCacheBLF::size.
Referenced by blf_font_size().
void blf_glyph_cache_free | ( | GlyphCacheBLF * | gc | ) |
Definition at line 137 of file blf_glyph.c.
References blf_glyph_free(), BLI_remlink(), GlyphCacheBLF::bucket, GlyphCacheBLF::cur_tex, ListBase::first, addon::engine::free(), g, i, MEM_freeN(), and GlyphCacheBLF::textures.
Referenced by blf_font_free().
GlyphCacheBLF* blf_glyph_cache_new | ( | FontBLF * | font | ) | [read] |
Definition at line 72 of file blf_glyph.c.
References GlyphCacheBLF::ascender, BLI_addhead(), GlyphCacheBLF::bucket, FontBLF::cache, GlyphCacheBLF::cur_tex, GlyphCacheBLF::descender, FontBLF::dpi, GlyphCacheBLF::dpi, FontBLF::face, GlyphCacheBLF::glyph_ascii_table, GlyphCacheBLF::max_glyph_height, GlyphCacheBLF::max_glyph_width, MEM_callocN(), GlyphCacheBLF::next, GlyphCacheBLF::ntex, NULL, GlyphCacheBLF::num_glyphs, GlyphCacheBLF::p2_height, GlyphCacheBLF::p2_width, GlyphCacheBLF::pad, GlyphCacheBLF::prev, GlyphCacheBLF::rem_glyphs, GlyphCacheBLF::size, FontBLF::size, GlyphCacheBLF::textures, GlyphCacheBLF::x_offs, and GlyphCacheBLF::y_offs.
Referenced by blf_font_size().
static void blf_glyph_cache_texture | ( | FontBLF * | font, |
GlyphCacheBLF * | gc | ||
) | [static] |
Definition at line 156 of file blf_glyph.c.
References blf_next_p2(), GlyphCacheBLF::cur_tex, addon::engine::free(), i, GlyphCacheBLF::max_glyph_height, GlyphCacheBLF::max_glyph_width, FontBLF::max_tex_size, GlyphCacheBLF::ntex, GlyphCacheBLF::num_glyphs, GlyphCacheBLF::p2_height, GlyphCacheBLF::p2_width, GlyphCacheBLF::pad, GlyphCacheBLF::rem_glyphs, FontBLF::tex_bind_state, and GlyphCacheBLF::textures.
Referenced by blf_glyph_render().
void blf_glyph_free | ( | GlyphBLF * | g | ) |
Definition at line 287 of file blf_glyph.c.
References GlyphBLF::bitmap, and MEM_freeN().
Referenced by blf_glyph_cache_clear(), and blf_glyph_cache_free().
Definition at line 366 of file blf_glyph.c.
References GlyphBLF::bitmap, BLF_CLIPPING, blf_glyph_cache_texture(), BLF_SHADOW, blf_texture3_draw(), blf_texture5_draw(), blf_texture_draw(), BLI_in_rctf(), FontBLF::blur, GlyphBLF::box, GlyphBLF::build_tex, FontBLF::clip_rec, GlyphCacheBLF::cur_tex, FontBLF::flags, FontBLF::glyph_cache, GlyphBLF::height, GlyphCacheBLF::max_glyph_height, GlyphCacheBLF::max_glyph_width, FontBLF::max_tex_size, FontBLF::orig_col, GlyphCacheBLF::p2_height, GlyphCacheBLF::p2_width, GlyphCacheBLF::pad, FontBLF::pos, GlyphBLF::pos_x, GlyphBLF::pos_y, GlyphCacheBLF::rem_glyphs, FontBLF::shadow, FontBLF::shadow_col, FontBLF::shadow_x, FontBLF::shadow_y, GlyphBLF::tex, FontBLF::tex_bind_state, GlyphCacheBLF::textures, GlyphBLF::uv, GlyphBLF::width, GlyphCacheBLF::x_offs, rctf::xmax, rctf::xmin, GlyphBLF::xoff, GlyphCacheBLF::y_offs, and GlyphBLF::yoff.
Referenced by blf_font_draw(), and blf_font_draw_ascii().
GlyphBLF* blf_glyph_search | ( | GlyphCacheBLF * | gc, |
unsigned int | c | ||
) | [read] |
Definition at line 194 of file blf_glyph.c.
References blf_hash(), GlyphCacheBLF::bucket, GlyphBLF::c, ListBase::first, GlyphBLF::next, NULL, and p.
Referenced by blf_font_ensure_ascii_table(), blf_font_fixed_width(), and blf_glyph_add().
static void blf_texture3_draw | ( | const float | shadow_col[4], |
float | uv[2][2], | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2 | ||
) | [static] |
Definition at line 342 of file blf_glyph.c.
References blf_texture_draw(), and MakeCursor::color.
Referenced by blf_glyph_render().
static void blf_texture5_draw | ( | const float | shadow_col[4], |
float | uv[2][2], | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2 | ||
) | [static] |
Definition at line 316 of file blf_glyph.c.
References blf_texture_draw(), and MakeCursor::color.
Referenced by blf_glyph_render().
static void blf_texture_draw | ( | float | uv[2][2], |
float | dx, | ||
float | y1, | ||
float | dx1, | ||
float | y2 | ||
) | [static] |
Definition at line 297 of file blf_glyph.c.
Referenced by blf_glyph_render(), blf_texture3_draw(), and blf_texture5_draw().