Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/view2d.c
| Show First 20 Lines • Show All 2,566 Lines • ▼ Show 20 Lines | |||||
| void UI_view2d_text_cache_draw(ARegion *ar) | void UI_view2d_text_cache_draw(ARegion *ar) | ||||
| { | { | ||||
| View2DString *v2s; | View2DString *v2s; | ||||
| int col_pack_prev = 0; | int col_pack_prev = 0; | ||||
| /* investigate using BLF_ascender() */ | /* investigate using BLF_ascender() */ | ||||
| const int font_id = BLF_default(); | const int font_id = BLF_default(); | ||||
| BLF_set_default(); | |||||
| const float default_height = g_v2d_strings ? BLF_height(font_id, "28", 3) : 0.0f; | const float default_height = g_v2d_strings ? BLF_height(font_id, "28", 3) : 0.0f; | ||||
| wmOrtho2_region_pixelspace(ar); | wmOrtho2_region_pixelspace(ar); | ||||
| for (v2s = g_v2d_strings; v2s; v2s = v2s->next) { | for (v2s = g_v2d_strings; v2s; v2s = v2s->next) { | ||||
| int xofs = 0, yofs; | int xofs = 0, yofs; | ||||
| yofs = ceil(0.5f * (BLI_rcti_size_y(&v2s->rect) - default_height)); | yofs = ceil(0.5f * (BLI_rcti_size_y(&v2s->rect) - default_height)); | ||||
| Show All 29 Lines | |||||