Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/font.c
| Show First 20 Lines • Show All 1,124 Lines • ▼ Show 20 Lines | if (tb_scale.h != 0.0f) { | ||||
| const int i_textbox_next = i_textbox_array[tb_index + 1]; | const int i_textbox_next = i_textbox_array[tb_index + 1]; | ||||
| const bool is_last_filled_textbox = ELEM(i_textbox_next, 0, slen + 1); | const bool is_last_filled_textbox = ELEM(i_textbox_next, 0, slen + 1); | ||||
| int lines; | int lines; | ||||
| ct_first = chartransdata + i_textbox; | ct_first = chartransdata + i_textbox; | ||||
| ct_last = chartransdata + (is_last_filled_textbox ? slen : i_textbox_next - 1); | ct_last = chartransdata + (is_last_filled_textbox ? slen : i_textbox_next - 1); | ||||
| lines = ct_last->linenr - ct_first->linenr + 1; | lines = ct_last->linenr - ct_first->linenr + 1; | ||||
| if ((cu->overflow == CU_OVERFLOW_TRUNCATE) && (tb_index == cu->totbox - 1) && | |||||
| (last_line != -1)) { | |||||
| lines = last_line - ct_first->linenr; | |||||
| } | |||||
| textbox_scale(&tb_scale, &cu->tb[tb_index], 1.0f / font_size); | textbox_scale(&tb_scale, &cu->tb[tb_index], 1.0f / font_size); | ||||
| /* The initial Y origin of the textbox is hardcoded to 1.0f * text scale. */ | /* The initial Y origin of the textbox is hardcoded to 1.0f * text scale. */ | ||||
| const float textbox_y_origin = 1.0f; | const float textbox_y_origin = 1.0f; | ||||
| float yoff = 0.0f; | float yoff = 0.0f; | ||||
| switch (cu->align_y) { | switch (cu->align_y) { | ||||
| case CU_ALIGN_Y_TOP_BASELINE: | case CU_ALIGN_Y_TOP_BASELINE: | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 573 Lines • Show Last 20 Lines | |||||