18 #include "../../blenfont/BLF_api.h"
19 #include "../../blentranslation/BLT_translation.h"
21 #define THUMB_TXT_ITEMS \
22 N_("AaBbCc"), N_("The quick"), N_("brown fox"), N_("jumps over"), N_("the lazy dog"),
28 #undef THUMB_TXT_ITEMS
46 const int font_size =
y / 4;
52 font_color[0] = font_color[1] = font_color[2] = 1.0f;
69 (
unsigned char *)ibuf->
rect,
86 unsigned char digest[16];
90 for (i = 0; (i < draw_str_lines) && (
len <
sizeof(buf)); i++) {
void BLF_thumb_preview(const char *filepath, const char **draw_str, const char **i18n_draw_str, unsigned char draw_str_lines, const float font_color[4], int font_size, unsigned char *buf, int w, int h, int channels) ATTR_NONNULL()
File and directory operations.
void * BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock)
char * BLI_hash_md5_to_hexdigest(void *resblock, char r_hex_digest[33])
size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
const char * BLT_translate_do(const char *msgctxt, const char *msgid)
#define BLT_I18NCONTEXT_DEFAULT
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rectfill(struct ImBuf *drect, const float col[4])
Contains defines and structs used throughout the imbuf module.
#define THUMB_DEFAULT_HASH
static const char * i18n_thumb_str[]
bool IMB_thumb_load_font_get_hash(char *r_hash)
static const char * thumb_str[]
struct ImBuf * IMB_thumb_load_font(const char *filepath, unsigned int x, unsigned int y)
void IMB_thumb_clear_translations(void)
void IMB_thumb_ensure_translations(void)