Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/thumbs_font.c
| Show All 11 Lines | |||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "IMB_thumbs.h" /* own include. */ | #include "IMB_thumbs.h" /* own include. */ | ||||
| /* XXX, bad level call */ | /* XXX, bad level call */ | ||||
| #include "../../blenfont/BLF_api.h" | #include "../../blenfont/BLF_api.h" | ||||
| /* Only change if we need to update the previews in the on-disk cache. */ | /* Only change if we need to update the previews in the on-disk cache. */ | ||||
| #define FONT_THUMB_VERSION "1.0.0" | #define FONT_THUMB_VERSION "1.0.1" | ||||
| struct ImBuf *IMB_thumb_load_font(const char *filename, uint x, uint y) | struct ImBuf *IMB_thumb_load_font(const char *filename, uint x, uint y) | ||||
| { | { | ||||
| struct ImBuf *ibuf = IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata); | struct ImBuf *ibuf = IMB_allocImBuf(x, y, 32, IB_rect | IB_metadata); | ||||
| /* fill with white and zero alpha */ | /* fill with white and zero alpha */ | ||||
| const float col[4] = {1.0f, 1.0f, 1.0f, 0.0f}; | const float col[4] = {1.0f, 1.0f, 1.0f, 0.0f}; | ||||
| IMB_rectfill(ibuf, col); | IMB_rectfill(ibuf, col); | ||||
| Show All 18 Lines | |||||