|
Blender
V2.93
|
#include <math.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_path_util.h"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_context.h"#include "BKE_image.h"#include "BLF_api.h"#include "IMB_imbuf_types.h"#include "IMB_metadata.h"#include "ED_screen.h"#include "ED_space_api.h"#include "ED_util.h"#include "GPU_immediate.h"#include "GPU_matrix.h"#include "GPU_state.h"#include "UI_interface.h"#include "UI_resources.h"#include "RNA_access.h"#include "WM_api.h"#include "WM_types.h"Go to the source code of this file.
Classes | |
| struct | MetadataCustomDrawContext |
| struct | MetadataCustomCountContext |
Macros | |
| #define | MAX_METADATA_STR 1024 |
Typedefs | |
| typedef struct MetadataCustomDrawContext | MetadataCustomDrawContext |
| typedef struct MetadataCustomCountContext | MetadataCustomCountContext |
Functions | |
| void | ED_region_draw_mouse_line_cb (const bContext *C, ARegion *region, void *arg_info) |
| BLI_INLINE bool | metadata_is_valid (ImBuf *ibuf, char *r_str, short index, int offset) |
| BLI_INLINE bool | metadata_is_custom_drawable (const char *field) |
| static void | metadata_custom_draw_fields (const char *field, const char *value, void *ctx_v) |
| static void | metadata_draw_imbuf (ImBuf *ibuf, const rctf *rect, int fontid, const bool is_top) |
| static void | metadata_custom_count_fields (const char *field, const char *UNUSED(value), void *ctx_v) |
| static float | metadata_box_height_get (ImBuf *ibuf, int fontid, const bool is_top) |
| void | ED_region_image_metadata_draw (int x, int y, ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy) |
Variables | |
| static const char * | meta_data_list [] |
| typedef struct MetadataCustomCountContext MetadataCustomCountContext |
| typedef struct MetadataCustomDrawContext MetadataCustomDrawContext |
Callback that draws a line between the mouse and a position given as the initial argument.
Definition at line 62 of file ed_draw.c.
References C, CTX_wm_window(), wmWindow::eventstate, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_width(), GPU_PRIM_LINES, GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformThemeColor3(), immVertex2fv(), immVertexFormat(), TH_VIEW_OVERLAY, UI_DPI_FAC, ARegion::winrct, wmEvent::x, rcti::xmin, wmEvent::y, and rcti::ymin.
| void ED_region_image_metadata_draw | ( | int | x, |
| int | y, | ||
| ImBuf * | ibuf, | ||
| const rctf * | frame, | ||
| float | zoomx, | ||
| float | zoomy | ||
| ) |
Definition at line 313 of file ed_draw.c.
References BLF_clipping(), BLF_CLIPPING, BLF_disable(), BLF_enable(), blf_mono_font, BLF_size(), BLI_rctf_init(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformThemeColor(), immVertexFormat(), ImBuf::metadata, metadata_box_height_get(), metadata_draw_imbuf(), uiFontStyle::points, pos, TH_METADATA_BG, TH_METADATA_TEXT, UI_FontThemeColor(), UI_style_get_dpi(), uiStyle::widgetlabel, x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by draw_image_main(), draw_movieclip_buffer(), image_main_region_draw(), and sequencer_draw_preview().
Definition at line 259 of file ed_draw.c.
References BLF_boundbox_ex(), BLF_disable(), BLF_enable(), BLF_height_max(), BLF_WORD_WRAP, BLF_wordwrap(), count, MetadataCustomCountContext::count, height, IMB_metadata_foreach(), MAX_METADATA_STR, metadata_custom_count_fields(), metadata_is_valid(), str, blender::gpu::wrap(), and ImBuf::x.
Referenced by ED_region_image_metadata_draw().
|
static |
Definition at line 250 of file ed_draw.c.
References MetadataCustomCountContext::count, and metadata_is_custom_drawable().
Referenced by metadata_box_height_get().
|
static |
Definition at line 140 of file ed_draw.c.
References BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_position(), BLI_snprintf(), MetadataCustomDrawContext::current_y, MetadataCustomDrawContext::fontid, MAX_METADATA_STR, metadata_is_custom_drawable(), MetadataCustomDrawContext::vertical_offset, MetadataCustomDrawContext::xmin, and MetadataCustomDrawContext::ymin.
Referenced by metadata_draw_imbuf().
|
static |
Definition at line 153 of file ed_draw.c.
References BLF_descender(), BLF_disable(), BLF_draw(), BLF_draw_ex(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable(), BLF_height_max(), BLF_position(), BLF_width(), BLF_WORD_WRAP, BLF_wordwrap(), BLI_snprintf_rlen(), MetadataCustomDrawContext::current_y, ELEM, MetadataCustomDrawContext::fontid, height, IMB_metadata_foreach(), len, ResultBLF::lines, MAX_METADATA_STR, meta_data_list, metadata_custom_draw_fields(), metadata_is_valid(), UI_UNIT_X, MetadataCustomDrawContext::vertical_offset, ImBuf::x, rctf::xmax, MetadataCustomDrawContext::xmin, rctf::xmin, rctf::ymax, MetadataCustomDrawContext::ymin, and rctf::ymin.
Referenced by ED_region_image_metadata_draw().
| BLI_INLINE bool metadata_is_custom_drawable | ( | const char * | field | ) |
Definition at line 117 of file ed_draw.c.
References BKE_stamp_is_known_field(), and STREQ.
Referenced by metadata_custom_count_fields(), and metadata_custom_draw_fields().
| BLI_INLINE bool metadata_is_valid | ( | ImBuf * | ibuf, |
| char * | r_str, | ||
| short | index, | ||
| int | offset | ||
| ) |
Definition at line 110 of file ed_draw.c.
References IMB_metadata_get_field(), MAX_METADATA_STR, meta_data_list, and ImBuf::metadata.
Referenced by metadata_box_height_get(), and metadata_draw_imbuf().
|
static |
Definition at line 97 of file ed_draw.c.
Referenced by metadata_draw_imbuf(), and metadata_is_valid().