[Bf-blender-cvs] [8204e9a] temp-blf-wordwrap: rename BLF_WORDWRAP -> BLF_WORD_WRAP
Campbell Barton
noreply at git.blender.org
Mon Aug 31 03:48:28 CEST 2015
Commit: 8204e9a793bd56f156dc154d3d5b5e55fea83709
Author: Campbell Barton
Date: Mon Aug 31 11:43:00 2015 +1000
Branches: temp-blf-wordwrap
https://developer.blender.org/rB8204e9a793bd56f156dc154d3d5b5e55fea83709
rename BLF_WORDWRAP -> BLF_WORD_WRAP
===================================================================
M source/blender/blenfont/BLF_api.h
M source/blender/blenfont/intern/blf.c
M source/blender/blenfont/intern/blf_font.c
M source/blender/blenfont/intern/blf_internal_types.h
M source/blender/editors/interface/interface_regions.c
M source/blender/editors/interface/interface_style.c
M source/blender/python/generic/blf_py_api.c
===================================================================
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 5881191..a066a98 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -217,7 +217,7 @@ void BLF_state_print(int fontid);
#define BLF_MATRIX (1 << 4)
#define BLF_ASPECT (1 << 5)
#define BLF_HINTING (1 << 6)
-#define BLF_WORDWRAP (1 << 7)
+#define BLF_WORD_WRAP (1 << 7)
#define BLF_DRAW_STR_DUMMY_MAX 1024
@@ -230,7 +230,7 @@ extern int blf_mono_font_render; /* don't mess drawing with render threads. */
*/
struct ResultBLF {
/**
- * Number of lines drawn when #BLF_WORDWRAP is enabled
+ * Number of lines drawn when #BLF_WORD_WRAP is enabled
*/
int lines_wrap;
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index c41e340..4a19474 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -570,7 +570,7 @@ void BLF_draw_ex(
if (font && font->glyph_cache) {
blf_draw__start(font, &mode, ¶m);
- if (font->flags & BLF_WORDWRAP) {
+ if (font->flags & BLF_WORD_WRAP) {
blf_font_draw__wrap(font, str, len, r_info);
}
else {
@@ -595,7 +595,7 @@ void BLF_draw_ascii_ex(
if (font && font->glyph_cache) {
blf_draw__start(font, &mode, ¶m);
- if (font->flags & BLF_WORDWRAP) {
+ if (font->flags & BLF_WORD_WRAP) {
/* use non-ascii draw function for word-wrap */
blf_font_draw__wrap(font, str, len, r_info);
}
@@ -674,7 +674,7 @@ void BLF_boundbox_ex(
BLF_RESULT_CHECK_INIT(r_info);
if (font) {
- if (font->flags & BLF_WORDWRAP) {
+ if (font->flags & BLF_WORD_WRAP) {
blf_font_boundbox__wrap(font, str, len, r_box, r_info);
}
else {
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index e6c4d8e..c2b0022 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -785,7 +785,7 @@ void blf_font_width_and_height(
ya = 1.0f;
}
- if (font->flags & BLF_WORDWRAP) {
+ if (font->flags & BLF_WORD_WRAP) {
blf_font_boundbox__wrap(font, str, len, &box, r_info);
}
else {
@@ -805,7 +805,7 @@ float blf_font_width(FontBLF *font, const char *str, size_t len, struct ResultBL
else
xa = 1.0f;
- if (font->flags & BLF_WORDWRAP) {
+ if (font->flags & BLF_WORD_WRAP) {
blf_font_boundbox__wrap(font, str, len, &box, r_info);
}
else {
@@ -824,7 +824,7 @@ float blf_font_height(FontBLF *font, const char *str, size_t len, struct ResultB
else
ya = 1.0f;
- if (font->flags & BLF_WORDWRAP) {
+ if (font->flags & BLF_WORD_WRAP) {
blf_font_boundbox__wrap(font, str, len, &box, r_info);
}
else {
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index 090659e..b613702 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -195,7 +195,7 @@ typedef struct FontBLF {
/* clipping rectangle. */
rctf clip_rec;
- /* the width to wrap the text, see BLF_WORDWRAP */
+ /* the width to wrap the text, see BLF_WORD_WRAP */
int wrap_width;
/* font dpi (default 72). */
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 16b8634..f44f2c5 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -320,8 +320,8 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
}
}
- BLF_disable(data->fstyle.uifont_id, BLF_WORDWRAP);
- BLF_disable(blf_mono_font, BLF_WORDWRAP);
+ BLF_disable(data->fstyle.uifont_id, BLF_WORD_WRAP);
+ BLF_disable(blf_mono_font, BLF_WORD_WRAP);
if (multisample_enabled)
glEnable(GL_MULTISAMPLE_ARB);
@@ -590,7 +590,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
data->wrap_width = min_ii(UI_TIP_MAXWIDTH * U.pixelsize / aspect, WM_window_pixels_x(win) - (UI_TIP_PADDING * 2));
- font_flag |= BLF_WORDWRAP;
+ font_flag |= BLF_WORD_WRAP;
if (data->fstyle.kerning == 1) {
font_flag |= BLF_KERNING_DEFAULT;
}
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index c26b850..5d0d82e 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -167,7 +167,7 @@ void UI_fontstyle_draw_ex(
font_flag |= BLF_KERNING_DEFAULT;
}
if (fs->word_wrap == 1) {
- font_flag |= BLF_WORDWRAP;
+ font_flag |= BLF_WORD_WRAP;
}
BLF_enable(fs->uifont_id, font_flag);
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index aebfcfa..0dfff9b 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -456,7 +456,7 @@ PyObject *BPyInit_blf(void)
PyModule_AddIntConstant(submodule, "CLIPPING", BLF_CLIPPING);
PyModule_AddIntConstant(submodule, "SHADOW", BLF_SHADOW);
PyModule_AddIntConstant(submodule, "KERNING_DEFAULT", BLF_KERNING_DEFAULT);
- PyModule_AddIntConstant(submodule, "WORD_WRAP", BLF_WORDWRAP);
+ PyModule_AddIntConstant(submodule, "WORD_WRAP", BLF_WORD_WRAP);
return submodule;
}
More information about the Bf-blender-cvs
mailing list