diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 02:18:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 02:18:20 +0400 |
commit | 866f986898cf6c35e8b4d5190853e453a3eb1714 (patch) | |
tree | 35ea0e3113cace07b2636b2821516551f9506091 /source/blender/blenfont/intern/blf_internal_types.h | |
parent | cfb160c764b2bc65755b73ca42a60f7a5572e4f3 (diff) |
fix for stamp text drawing into a color buffer not taking color management into account.
Diffstat (limited to 'source/blender/blenfont/intern/blf_internal_types.h')
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index bf9b9858348..177b02a9598 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -131,6 +131,28 @@ typedef struct GlyphBLF { short build_tex; } GlyphBLF; +typedef struct FontBufInfoBLF { + /* for draw to buffer, always set this to NULL after finish! */ + float *fbuf; + + /* the same but unsigned char */ + unsigned char *cbuf; + + /* buffer size, keep signed so comparisons with negative values work */ + int w; + int h; + + /* number of channels. */ + int ch; + + /* is the float buffer linear */ + int is_linear; + + /* and the color, the alphas is get from the glyph! + * color is srgb space */ + float col[4]; +} FontBufInfoBLF; + typedef struct FontBLF { /* font name. */ char *name; @@ -198,21 +220,8 @@ typedef struct FontBLF { /* freetype2 face. */ FT_Face face; - /* for draw to buffer, always set this to NULL after finish! */ - float *b_fbuf; - - /* the same but unsigned char */ - unsigned char *b_cbuf; - - /* buffer size, keep signed so comparisons with negative values work */ - int bw; - int bh; - - /* number of channels. */ - int bch; - - /* and the color, the alphas is get from the glyph! */ - float b_col[4]; + /* data for buffer usage (drawing into a texture buffer) */ + FontBufInfoBLF buf_info; } FontBLF; typedef struct DirBLF { |