65 const float *mval_src = (
float *)arg_info;
66 const float mval_dst[2] = {
78 float viewport_size[4];
95 #define MAX_METADATA_STR 1024
122 if (
STREQ(field,
"BlenderMultiChannel")) {
127 if (
STREQ(field,
"type")) {
158 const float margin =
height / 8;
159 const float vertical_offset = (
height + margin);
163 const float xmin = (rect->
xmin + margin);
164 const float xmax = (rect->
xmax - margin);
165 const float ymin = (rect->
ymin + margin) - descender;
166 const float ymax = (rect->
ymax - margin) - descender;
169 for (
int i = 0; i < 4; i++) {
172 bool do_newline =
false;
175 BLF_position(fontid, xmin, ymax - vertical_offset, 0.0f);
183 BLF_position(fontid, xmax - line_width, ymax - vertical_offset, 0.0f);
189 ofs_y += vertical_offset;
192 else if (
ELEM(i, 1, 2)) {
195 BLF_position(fontid, xmin, ymax - vertical_offset - ofs_y, 0.0f);
197 ofs_y += vertical_offset;
206 BLF_position(fontid, xmin, ymax - vertical_offset - ofs_y, 0.0f);
210 ofs_y += vertical_offset * info.
lines;
217 BLF_position(fontid, xmax - line_width, ymax - vertical_offset - ofs_y, 0.0f);
219 ofs_y += vertical_offset;
234 for (
int i = 5; i < 10; i++) {
262 const float margin = (
height / 8);
270 for (
int i = 2; i < 5; i++) {
293 for (
int i = 5; i < 10; i++) {
314 int x,
int y,
ImBuf *ibuf,
const rctf *frame,
float zoomx,
float zoomy)
385 #undef MAX_METADATA_STR
struct wmWindow * CTX_wm_window(const bContext *C)
bool BKE_stamp_is_known_field(const char *field_name)
float BLF_width(int fontid, const char *str, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLF_draw(int fontid, const char *str, size_t len) ATTR_NONNULL(2)
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_disable(int fontid, int option)
float BLF_descender(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_draw_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) ATTR_NONNULL(2)
void BLF_boundbox_ex(int fontid, const char *str, size_t len, struct rctf *box, struct ResultBLF *r_info) ATTR_NONNULL(2)
void BLF_size(int fontid, int size, int dpi)
void BLF_enable(int fontid, int option)
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
void BLF_wordwrap(int fontid, int wrap_width)
void BLF_position(int fontid, float x, float y, float z)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
size_t BLI_snprintf_rlen(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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
void GPU_matrix_pop(void)
void GPU_matrix_scale_2f(float x, float y)
void GPU_matrix_push(void)
void GPU_matrix_translate_2f(float x, float y)
@ GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR
@ GPU_SHADER_2D_UNIFORM_COLOR
void GPU_line_width(float width)
void GPU_viewport_size_get_f(float coords[4])
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
const struct uiStyle * UI_style_get_dpi(void)
void UI_FontThemeColor(int fontid, int colorid)
void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy)
struct MetadataCustomCountContext MetadataCustomCountContext
static void metadata_custom_count_fields(const char *field, const char *UNUSED(value), void *ctx_v)
static void metadata_custom_draw_fields(const char *field, const char *value, void *ctx_v)
static float metadata_box_height_get(ImBuf *ibuf, int fontid, const bool is_top)
static const char * meta_data_list[]
BLI_INLINE bool metadata_is_custom_drawable(const char *field)
struct MetadataCustomDrawContext MetadataCustomDrawContext
static void metadata_draw_imbuf(ImBuf *ibuf, const rctf *rect, int fontid, const bool is_top)
BLI_INLINE bool metadata_is_valid(ImBuf *ibuf, char *r_str, short index, int offset)
void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *region, void *arg_info)
static GPUContext * wrap(Context *ctx)
struct IDProperty * metadata
struct wmEvent * eventstate