From 22d40fdfd85e52f7e2c0bfe33067bc9b74486087 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Mar 2018 13:40:23 +0200 Subject: Cleanup: blf internal struct naming - use x/y/width/height/max as a suffix. - replace 'num' prefix /w 'len' suffix. --- .../blender/blenfont/intern/blf_internal_types.h | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'source/blender/blenfont/intern/blf_internal_types.h') diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index 0fac576a8cc..ced8064302b 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -51,33 +51,33 @@ typedef struct GlyphCacheBLF { unsigned int *textures; /* size of the array. */ - unsigned int ntex; + unsigned int textures_len; /* and the last texture, aka. the current texture. */ - unsigned int cur_tex; + unsigned int texture_current; /* like bftgl, we draw every glyph in a big texture, so this is the * current position inside the texture. */ - int x_offs; - int y_offs; + int offset_x; + int offset_y; /* and the space from one to other. */ int pad; /* and the bigger glyph in the font. */ - int max_glyph_width; - int max_glyph_height; + int glyph_width_max; + int glyph_height_max; /* next two integer power of two, to build the texture. */ int p2_width; int p2_height; /* number of glyphs in the font. */ - int num_glyphs; + int glyphs_len_max; - /* number of glyphs that we load here. */ - int rem_glyphs; + /* number of glyphs not yet loaded (decreases every glyph loaded). */ + int glyphs_len_free; /* ascender and descender value. */ float ascender; @@ -106,8 +106,8 @@ typedef struct GlyphBLF { unsigned int tex; /* position inside the texture where this glyph is store. */ - int xoff; - int yoff; + int offset_x; + int offset_y; /* Bitmap data, from freetype. Take care that this * can be NULL. @@ -130,7 +130,7 @@ typedef struct GlyphBLF { float pos_y; /* with value of zero mean that we need build the texture. */ - short build_tex; + char build_tex; } GlyphBLF; typedef struct FontBufInfoBLF { @@ -209,7 +209,7 @@ typedef struct FontBLF { unsigned int size; /* max texture size. */ - int max_tex_size; + int tex_size_max; /* cache current OpenGL texture to save calls into the API */ unsigned int tex_bind_state; @@ -244,6 +244,6 @@ typedef struct DirBLF { char *path; } DirBLF; -#define BLF_CURTEX_UNSET ((unsigned int)-1) +#define BLF_TEXTURE_UNSET ((unsigned int)-1) #endif /* __BLF_INTERNAL_TYPES_H__ */ -- cgit v1.2.3