|
Blender V5.0
|
#include <cmath>#include <cstring>#include "DNA_color_types.h"#include "DNA_curve_types.h"#include "DNA_curveprofile_types.h"#include "DNA_movieclip_types.h"#include "DNA_screen_types.h"#include "BLI_math_rotation.h"#include "BLI_polyfill_2d.h"#include "BLI_rect.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "MEM_guardedalloc.h"#include "BKE_colorband.hh"#include "BKE_colortools.hh"#include "BKE_curveprofile.h"#include "BKE_tracking.h"#include "IMB_colormanagement.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "BIF_glutil.hh"#include "BLF_api.hh"#include "GPU_batch.hh"#include "GPU_batch_presets.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_matrix.hh"#include "GPU_shader_shared.hh"#include "GPU_state.hh"#include "GPU_uniform_buffer.hh"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | WaveformColorVertex |
Macros | |
| #define | HISTOGRAM_TOT_GRID_LINES 4 |
Functions | |
| void | UI_draw_roundbox_corner_set (int type) |
| void | UI_draw_roundbox_4fv_ex (const rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad) |
| void | UI_draw_roundbox_3ub_alpha (const rctf *rect, bool filled, float rad, const uchar col[3], uchar alpha) |
| void | UI_draw_roundbox_3fv_alpha (const rctf *rect, bool filled, float rad, const float col[3], float alpha) |
| void | UI_draw_roundbox_aa (const rctf *rect, bool filled, float rad, const float color[4]) |
| void | UI_draw_roundbox_4fv (const rctf *rect, bool filled, float rad, const float col[4]) |
| void | ui_draw_rounded_corners_inverted (const rcti &rect, const float rad, const blender::float4 color) |
| void | UI_draw_text_underline (int pos_x, int pos_y, int len, int height, const float color[4]) |
| void | ui_draw_but_TAB_outline (const rcti *rect, float rad, uchar highlight[3], uchar highlight_fade[3]) |
| void | ui_draw_but_IMAGE (ARegion *, uiBut *but, const uiWidgetColors *, const rcti *rect) |
| void | UI_draw_safe_areas (uint pos, const rctf *rect, const float title_aspect[2], const float action_aspect[2]) |
| static void | draw_scope_end (const rctf *rect) |
| static void | histogram_draw_one (float r, float g, float b, float alpha, float x, float y, float w, float h, const float *data, int res, const bool is_line, uint pos_attr) |
| void | ui_draw_but_HISTOGRAM (ARegion *region, uiBut *but, const uiWidgetColors *, const rcti *recti) |
| static void | waveform_draw_one (const float *waveform, int waveform_num, const float col[3]) |
| static void | waveform_draw_rgb (const float *waveform, int waveform_num, const float *col, float alpha) |
| static void | circle_draw_rgb (float *points, int tot_points, const float *col, GPUPrimType prim) |
| void | ui_draw_but_WAVEFORM (ARegion *region, uiBut *but, const uiWidgetColors *, const rcti *recti) |
| static float | polar_to_x (float center, float diam, float ampli, float angle) |
| static float | polar_to_y (float center, float diam, float ampli, float angle) |
| static void | vectorscope_draw_target (uint pos, float centerx, float centery, float diam, const float colf[3], char label) |
| void | ui_draw_but_VECTORSCOPE (ARegion *region, uiBut *but, const uiWidgetColors *, const rcti *recti) |
| static void | ui_draw_colorband_handle_tri (uint pos, float x1, float y1, float halfwidth) |
| static void | ui_draw_colorband_handle_box (uint pos, float x1, float y1, float x2, float y2) |
| static void | ui_draw_colorband_handle (uint shdr_pos, const rcti *rect, float x, const float rgb[3], const ColorManagedDisplay *display, bool active) |
| void | ui_draw_but_COLORBAND (uiBut *but, const uiWidgetColors *wcol, const rcti *rect) |
| void | ui_draw_but_UNITVEC (uiBut *but, const uiWidgetColors *wcol, const rcti *rect, const float radius) |
| static void | ui_draw_but_curve_grid (const uint pos, const rcti *rect, const float zoom_x, const float zoom_y, const float offset_x, const float offset_y, const float step) |
| void | ui_draw_but_CURVE (ARegion *region, uiBut *but, const uiWidgetColors *wcol, const rcti *rect) |
| static bool | point_draw_handles (CurveProfilePoint *point) |
| void | ui_draw_but_CURVEPROFILE (ARegion *region, uiBut *but, const uiWidgetColors *wcol, const rcti *rect) |
| void | ui_draw_but_TRACKPREVIEW (ARegion *region, uiBut *but, const uiWidgetColors *, const rcti *recti) |
| void | ui_draw_dropshadow (const rctf *rct, const float radius, const float width, const float aspect, const float alpha) |
Variables | |
| static int | roundboxtype = UI_CNR_ALL |
| #define HISTOGRAM_TOT_GRID_LINES 4 |
Definition at line 496 of file interface_draw.cc.
Referenced by ui_draw_but_HISTOGRAM().
|
static |
Definition at line 669 of file interface_draw.cc.
References batch, col, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_SHADER_3D_SMOOTH_COLOR, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format(), GPU_vertbuf_data_alloc(), and GPU_vertformat_attr_add().
Referenced by ui_draw_but_VECTORSCOPE().
|
static |
Definition at line 416 of file interface_draw.cc.
References GPU_blend(), GPU_BLEND_ALPHA, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_draw_but_HISTOGRAM(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_VECTORSCOPE(), and ui_draw_but_WAVEFORM().
|
static |
Definition at line 431 of file interface_draw.cc.
References b, data, float, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, GPU_line_smooth(), GPU_line_width(), GPU_PRIM_LINE_STRIP, GPU_PRIM_TRI_STRIP, i, immBegin(), immEnd(), immUniformColor4f(), immUniformColor4fv(), immVertex2f(), w(), x, and y.
Referenced by ui_draw_but_HISTOGRAM().
|
static |
Helper for ui_draw_but_CURVEPROFILE. Used to tell whether to draw a control point's handles.
Definition at line 1946 of file interface_draw.cc.
References ELEM, CurveProfilePoint::flag, CurveProfilePoint::h1, CurveProfilePoint::h2, HD_ALIGN, HD_FREE, PROF_H1_SELECT, PROF_H2_SELECT, and PROF_SELECT.
Referenced by ui_draw_but_CURVEPROFILE().
Definition at line 941 of file interface_draw.cc.
Referenced by ui_draw_but_VECTORSCOPE(), and vectorscope_draw_target().
Definition at line 946 of file interface_draw.cc.
Referenced by ui_draw_but_VECTORSCOPE(), and vectorscope_draw_target().
| void ui_draw_but_COLORBAND | ( | uiBut * | but, |
| const uiWidgetColors * | wcol, | ||
| const rcti * | rect ) |
Definition at line 1369 of file interface_draw.cc.
References BKE_colorband_evaluate(), uiBut::block, ColorBand::cur, ColorBand::data, uiButColorBand::edit_coba, float, GPU_blend(), GPU_BLEND_ALPHA, GPU_PRIM_TRI_STRIP, GPU_SHADER_2D_CHECKER, GPU_SHADER_3D_SMOOTH_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMB_colormanagement_scene_linear_to_display_v3(), immAttr4f(), immAttr4fv(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1i(), immUniform4f(), immUniformColor4ubv(), immVertex2f(), immVertex2fv(), immVertexFormat(), uiWidgetColors::outline, uiBut::poin, CBData::pos, pos, CBData::r, ColorBand::tot, U, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, ui_block_cm_display_get(), ui_draw_colorband_handle(), v2, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_CURVE | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | rect ) |
Definition at line 1598 of file interface_draw.cc.
References ARRAY_SET_ITEMS, uiBlock::aspect, BKE_curvemapping_changed(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), uiBut::block, CurveMapping::clipr, CurveMapping::cm, CM_TABLE, col, CUMA_DO_CLIP, CUMA_DRAW_CFRA, CUMA_DRAW_SAMPLE, CUMA_EXTEND_EXTRAPOLATE, CUMA_SELECT, CurveMapping::cur, CurveMapping::curr, CurveMap::curve, uiButCurveMapping::edit_cumap, CurveMap::ext_in, CurveMap::ext_out, CurveMapping::flag, flag, uiBut::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRI_STRIP, GPU_program_point_size(), GPU_scissor(), GPU_scissor_get(), GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), uiButCurveMapping::gradient_type, i, IMB_colormanagement_get_luminance(), imm_draw_box_wire_2d(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1f(), immUniform4fv(), immUniformColor3ub(), immUniformColor3ubv(), immUniformColor3ubvAlpha(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), uiWidgetColors::inner, uiWidgetColors::inner_sel, uiWidgetColors::item, linearrgb_to_srgb_v3_v3(), max_ff(), min_ff(), uiWidgetColors::outline, uiWidgetColors::outline_sel, uiBut::poin, pos, rgb_to_hsv_v(), rgba_uchar_to_float(), CurveMapping::sample, CurveMap::table, uiWidgetColors::text, uiWidgetColors::text_sel, TH_AXIS_X, TH_AXIS_Y, CurveMap::totpoint, U, ui_block_cm_display_get(), UI_BUT_INACTIVE, ui_draw_but_curve_grid(), ui_draw_gradient(), UI_GetThemeColor3ubv(), UI_GRAD_H, UI_SCALE_FAC, ARegion::winx, ARegion::winy, CurveMapPoint::x, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, CurveMapPoint::y, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_but().
|
static |
Definition at line 1566 of file interface_draw.cc.
References ceilf, GPU_PRIM_LINES, i, immBegin(), immEnd(), immVertex2f(), pos, step, x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but_CURVE(), and ui_draw_but_CURVEPROFILE().
| void ui_draw_but_CURVEPROFILE | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | rect ) |
Draws the curve profile widget. Somewhat similar to ui_draw_but_CURVE.
Definition at line 1953 of file interface_draw.cc.
References uiBlock::aspect, BKE_curveprofile_table_size(), BKE_curveprofile_update(), BLI_polyfill_calc(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), uiBut::block, CurveProfile::clip_rect, uiButCurveProfile::edit_profile, CurveProfile::flag, flag, float, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_polygon_smooth(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRIS, GPU_program_point_size(), GPU_scissor(), GPU_scissor_get(), GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), CurveProfilePoint::h1_loc, CurveProfilePoint::h2_loc, i, imm_draw_box_wire_2d(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1f(), immUniform4fv(), immUniformColor3ubv(), immUniformColor3ubvAlpha(), immUniformColor4ubv(), immVertex2f(), immVertexFormat(), uiWidgetColors::inner, uiWidgetColors::inner_sel, uiWidgetColors::item, max_ff(), MEM_freeN(), MEM_mallocN(), MEM_SAFE_FREE, min_ff(), uiWidgetColors::outline, uiWidgetColors::outline_sel, CurveProfile::path, CurveProfile::path_len, uiBut::poin, point_draw_handles(), pos, PROF_H1_SELECT, PROF_H2_SELECT, PROF_SELECT, PROF_UPDATE_NONE, PROF_USE_CLIP, rgba_uchar_to_float(), CurveProfile::segments, CurveProfile::segments_len, CurveProfile::table, uiWidgetColors::text, uiWidgetColors::text_sel, U, ui_draw_but_curve_grid(), UI_SCALE_FAC, CurveProfile::view_rect, ARegion::winx, ARegion::winy, CurveProfilePoint::x, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, CurveProfilePoint::y, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_HISTOGRAM | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | recti ) |
Definition at line 498 of file interface_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), Histogram::data_a, Histogram::data_b, Histogram::data_g, Histogram::data_luma, Histogram::data_r, draw_scope_end(), ELEM, Histogram::flag, float, GPU_blend(), GPU_BLEND_ALPHA, GPU_PRIM_LINES, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), HISTO_FLAG_LINE, HISTO_MODE_ALPHA, HISTO_MODE_B, HISTO_MODE_G, HISTO_MODE_LUMA, HISTO_MODE_R, HISTO_MODE_RGB, histogram_draw_one(), HISTOGRAM_TOT_GRID_LINES, i, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4f(), immVertex2f(), immVertexFormat(), Histogram::mode, uiBut::poin, pos, TH_PREVIEW_BACK, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UNPACK4, w(), ARegion::winx, ARegion::winy, Histogram::x_resolution, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, Histogram::ymax, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_IMAGE | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | rect ) |
Definition at line 327 of file interface_draw.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), Box, ImBuf::byte_buffer, col, uiBut::col, ImBufByteBuffer::data, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_BLEND_NONE, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_IMAGE_COLOR, IMB_scale(), immDrawPixelsTexSetup(), immDrawPixelsTexTiled(), uiBut::poin, rgba_uchar_to_float(), state, w(), ImBuf::x, rcti::xmin, ImBuf::y, and rcti::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_TAB_outline | ( | const rcti * | rect, |
| float | rad, | ||
| uchar | highlight[3], | ||
| uchar | highlight_fade[3] ) |
Definition at line 234 of file interface_draw.cc.
References col, GPU_PRIM_LINE_STRIP, GPU_SHADER_3D_SMOOTH_COLOR, GPU_vertformat_attr_add(), immAttr4ub(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), mul_v2_fl(), pos, roundboxtype, U, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UNPACK3, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by widget_tab().
| void ui_draw_but_TRACKPREVIEW | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | recti ) |
Definition at line 2296 of file interface_draw.cc.
References BKE_tracking_sample_pattern(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), ImBuf::byte_buffer, col, ImBufByteBuffer::data, ImBufFloatBuffer::data, draw_scope_end(), float, ImBuf::float_buffer, MovieClipScopes::frame_height, MovieClipScopes::frame_width, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), GPU_PRIM_LINES, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_FLAT_COLOR, GPU_SHADER_3D_IMAGE_COLOR, GPU_vertformat_attr_add(), i, IMB_byte_from_float(), IMB_freeImBuf(), immAttr4fv(), immBegin(), immBindBuiltinProgram(), immDrawPixelsTexSetup(), immDrawPixelsTexTiled(), immEnd(), immUnbindProgram(), immVertex2f(), immVertexFormat(), uiBut::poin, pos, state, TH_MARKER_OUTLINE, TH_SEL_MARKER, MovieClipScopes::track, MovieClipScopes::track_disabled, MovieClipScopes::track_pos, MovieClipScopes::track_preview, MovieClipScopes::track_search, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), MovieClipScopes::undist_marker, UNPACK4, MovieClipScopes::use_track_mask, ARegion::winx, ARegion::winy, ImBuf::x, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, ImBuf::y, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_UNITVEC | ( | uiBut * | but, |
| const uiWidgetColors * | wcol, | ||
| const rcti * | rect, | ||
| const float | radius ) |
Definition at line 1491 of file interface_draw.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), copy_v3_v3(), copy_v4_fl4(), GPU_batch_draw(), GPU_batch_preset_sphere(), GPU_batch_program_set_builtin(), GPU_batch_uniformbuf_bind, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_CULL_BACK, GPU_CULL_NONE, GPU_face_culling(), GPU_line_smooth(), GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT, GPU_matrix_ortho_set_z(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_push(), GPU_matrix_push_projection(), GPU_matrix_scale_1f(), GPU_matrix_translate_2f(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_SHADER_SIMPLE_LIGHTING, GPU_uniformbuf_create_ex(), GPU_uniformbuf_free(), GPU_vertformat_attr_add(), imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor3ubv(), immVertexFormat(), uiWidgetColors::inner, SimpleLightingData::l_color, SimpleLightingData::light, min_ff(), pos, size(), ui_but_v3_get(), UI_CNR_ALL, UI_draw_roundbox_3ub_alpha(), UI_draw_roundbox_corner_set(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by widget_unitvec().
| void ui_draw_but_VECTORSCOPE | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | recti ) |
Definition at line 1009 of file interface_draw.cc.
References angle(), b, BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), BLI_YUV_ITU_BT709, circle_draw_rgb(), col, DEG2RADF, draw_scope_end(), float, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_1f(), GPU_matrix_translate_2f(), GPU_point_size(), GPU_PRIM_LINE_LOOP, GPU_PRIM_LINES, GPU_PRIM_TRI_FAN, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), i, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor3f(), immUniformColor4f(), immVertex2f(), immVertexFormat(), Scopes::ok, uiBut::poin, polar_to_x(), polar_to_y(), pos, SCOPES_VEC_U_SCALE, SCOPES_VEC_V_SCALE, SCOPES_VECSCOPE_LUMA, SCOPES_VECSCOPE_RGB, step, TH_PREVIEW_BACK, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UNPACK4, v, Scopes::vecscope, Scopes::vecscope_alpha, Scopes::vecscope_mode, Scopes::vecscope_rgb, vectorscope_draw_target(), w(), waveform_draw_one(), waveform_draw_rgb(), Scopes::waveform_tot, ARegion::winx, ARegion::winy, x, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, y, rctf::ymax, rcti::ymax, rctf::ymin, rcti::ymin, and yuv_to_rgb().
Referenced by ui_draw_but().
| void ui_draw_but_WAVEFORM | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | recti ) |
Definition at line 690 of file interface_draw.cc.
References BLF_batch_draw_flush(), BLF_color4f(), BLF_default(), BLF_draw_default(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), CLAMP, col, draw_scope_end(), ELEM, float, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_point_size(), GPU_PRIM_LINES, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), i, immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor3f(), immUniformColor4f(), immVertex2f(), immVertexFormat(), max, min, Scopes::minmax, Scopes::ok, uiBut::poin, pos, SCOPES_WAVEFRM_LUMA, SCOPES_WAVEFRM_RGB, SCOPES_WAVEFRM_RGB_PARADE, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709, SCOPES_WAVEFRM_YCC_JPEG, SNPRINTF_UTF8, str, TH_PREVIEW_BACK, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), unit_m3(), UNPACK4, w(), Scopes::waveform_1, Scopes::waveform_2, Scopes::waveform_3, waveform_draw_one(), Scopes::waveform_tot, Scopes::wavefrm_alpha, Scopes::wavefrm_mode, Scopes::wavefrm_yfac, ARegion::winx, ARegion::winy, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_but().
|
static |
Definition at line 1266 of file interface_draw.cc.
References active, BLI_rcti_size_y(), fabs(), floorf, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_polygon_smooth(), GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_viewport_size_get_f(), IMB_colormanagement_scene_linear_to_display_v3(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immUniformColor3fvAlpha(), immUniformColor4ub(), immVertex2f(), U, ui_draw_colorband_handle_box(), ui_draw_colorband_handle_tri(), UI_SCALE_FAC, UNPACK3, x, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but_COLORBAND().
Definition at line 1256 of file interface_draw.cc.
References GPU_PRIM_TRI_STRIP, immBegin(), immEnd(), immVertex2f(), and pos.
Referenced by ui_draw_colorband_handle().
Definition at line 1246 of file interface_draw.cc.
References GPU_PRIM_TRIS, immBegin(), immEnd(), immVertex2f(), and pos.
Referenced by ui_draw_colorband_handle().
| void ui_draw_dropshadow | ( | const rctf * | rct, |
| const float | radius, | ||
| const float | width, | ||
| const float | aspect, | ||
| const float | alpha ) |
Definition at line 2474 of file interface_draw.cc.
References uiWidgetBaseParameters::alpha_discard, batch, BLI_rctf_size_y(), GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_uniform_1f, GPU_batch_uniform_4fv_array, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_2D_WIDGET_SHADOW, max_ff(), min_ff(), uiWidgetBaseParameters::rad, uiWidgetBaseParameters::radi, uiWidgetBaseParameters::rect, uiWidgetBaseParameters::recti, uiWidgetBaseParameters::round_corners, roundboxtype, smoothminf(), U, ui_batch_roundbox_shadow_get(), UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::draw_link_errors(), draw_suggestion_list(), blender::ed::space_node::node_draw_node_group_indicator(), blender::ed::space_node::node_draw_shadow(), panel_draw_softshadow(), and widget_softshadow().
| void UI_draw_roundbox_3fv_alpha | ( | const rctf * | rect, |
| bool | filled, | ||
| float | rad, | ||
| const float | col[3], | ||
| float | alpha ) |
Definition at line 124 of file interface_draw.cc.
References col, U, and UI_draw_roundbox_4fv_ex().
Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_nla_controls_backdrop(), acf_summary_backdrop(), and region_draw_status_text().
| void UI_draw_roundbox_3ub_alpha | ( | const rctf * | rect, |
| bool | filled, | ||
| float | rad, | ||
| const uchar | col[3], | ||
| uchar | alpha ) |
Definition at line 112 of file interface_draw.cc.
References col, float, U, and UI_draw_roundbox_4fv_ex().
Referenced by draw_backdrop(), draw_main_line(), draw_ticks(), slider_draw(), and ui_draw_but_UNITVEC().
Definition at line 143 of file interface_draw.cc.
References col, U, and UI_draw_roundbox_4fv_ex().
Referenced by acf_nlaaction_backdrop(), blender::ed::spreadsheet::draw_column_reorder_destination(), draw_keylist_block_gpencil(), draw_keylist_block_interpolation_line(), draw_keylist_block_moving_hold(), draw_keylist_block_standard(), blender::ed::space_node::draw_link_errors(), draw_scope_end(), blender::ed::space_node::frame_node_draw_background(), gizmo_axis_draw(), nla_draw_strip(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_link_end_marker(), blender::ed::space_node::node_draw_panels_background(), blender::ed::space_node::node_draw_preview(), blender::ed::space_node::node_draw_shadow(), blender::ed::outliner::outliner_draw_highlights(), panel_draw_aligned_backdrop(), panel_draw_border(), region_draw_status_text(), screen_draw_area_drag_tip(), screen_draw_dock_preview(), screen_draw_split_preview(), textview_draw_string(), ui_draw_but_HISTOGRAM(), ui_draw_but_HSV_v(), ui_draw_but_HSVCUBE(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_button_sections_background(), ui_draw_dialog_alert(), ui_draw_layout_panels_backdrop(), UI_fontstyle_draw_simple_backdrop(), and UI_panel_category_draw_all().
| void UI_draw_roundbox_4fv_ex | ( | const rctf * | rect, |
| const float | inner1[4], | ||
| const float | inner2[4], | ||
| float | shade_dir, | ||
| const float | outline[4], | ||
| float | outline_width, | ||
| float | rad ) |
Definition at line 67 of file interface_draw.cc.
References uiWidgetBaseParameters::alpha_discard, batch, uiWidgetBaseParameters::color_inner1, uiWidgetBaseParameters::color_inner2, uiWidgetBaseParameters::color_outline, GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv_array, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_2D_WIDGET_BASE, uiWidgetBaseParameters::rad, uiWidgetBaseParameters::radi, uiWidgetBaseParameters::rect, uiWidgetBaseParameters::recti, uiWidgetBaseParameters::round_corners, roundboxtype, uiWidgetBaseParameters::shade_dir, ui_batch_roundbox_widget_get(), UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_animate_highlight_cb(), draw_current_frame(), ED_region_cache_draw_curfra_label(), ED_region_draw_overflow_indication(), ED_screen_draw_edges(), gizmo_axis_draw(), blender::ed::space_node::node_draw_extra_info_panel_back(), blender::ed::space_node::node_draw_node_group_indicator(), blender::ed::outliner::outliner_draw_highlights(), region_draw_gradient(), screen_draw_area_closed(), screen_draw_dock_preview(), screen_draw_join_highlight(), screen_draw_move_highlight(), screen_draw_region_scale_highlight(), screen_draw_split_preview(), ui_draw_but_HSV_v(), ui_draw_but_HSVCUBE(), UI_draw_roundbox_3fv_alpha(), UI_draw_roundbox_3ub_alpha(), UI_draw_roundbox_4fv(), UI_draw_roundbox_aa(), and vicon_rgb_color_draw().
Definition at line 131 of file interface_draw.cc.
References U, and UI_draw_roundbox_4fv_ex().
Referenced by draw_textscroll(), draw_tile_background(), blender::ed::space_node::frame_node_draw_outline(), blender::ed::outliner::outliner_draw_active_indicator(), region_draw_azone_tab_arrow(), and blender::ed::asset::screenshot_preview_draw().
| void UI_draw_roundbox_corner_set | ( | int | type | ) |
Definition at line 53 of file interface_draw.cc.
References roundboxtype.
Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_nla_controls_backdrop(), acf_nlaaction_backdrop(), acf_summary_backdrop(), area_animate_highlight_cb(), draw_current_frame(), draw_keylist_block(), draw_keylist_block_gpencil(), blender::ed::space_node::draw_link_errors(), draw_scope_end(), draw_textscroll(), draw_tile_background(), ED_region_cache_draw_curfra_label(), ED_screen_draw_edges(), file_draw_list(), blender::ed::space_node::frame_node_draw_background(), gizmo_axis_draw(), nla_draw_strip(), blender::ed::space_node::node_draw_basis(), blender::ed::space_node::node_draw_collapsed(), blender::ed::space_node::node_draw_extra_info_panel_back(), blender::ed::space_node::node_draw_link_end_marker(), blender::ed::space_node::node_draw_node_group_indicator(), blender::ed::space_node::node_draw_panels_background(), blender::ed::space_node::node_draw_preview(), blender::ed::space_node::node_draw_shadow(), blender::ed::outliner::outliner_draw_active_indicator(), blender::ed::outliner::outliner_draw_highlights(), panel_draw_aligned_backdrop(), panel_draw_border(), panel_draw_softshadow(), region_draw_azone_tab_arrow(), region_draw_status_text(), screen_draw_area_closed(), screen_draw_area_drag_tip(), screen_draw_dock_preview(), screen_draw_join_highlight(), screen_draw_move_highlight(), screen_draw_region_scale_highlight(), screen_draw_split_preview(), textview_draw_string(), ui_draw_but_HISTOGRAM(), ui_draw_but_TRACKPREVIEW(), ui_draw_but_UNITVEC(), ui_draw_but_VECTORSCOPE(), ui_draw_but_WAVEFORM(), ui_draw_button_sections_alignment_separator(), ui_draw_button_sections_background(), ui_draw_dialog_alert(), ui_draw_layout_panels_backdrop(), UI_fontstyle_draw_simple_backdrop(), UI_panel_category_draw_all(), vicon_rgb_color_draw(), and widget_softshadow().
| void ui_draw_rounded_corners_inverted | ( | const rcti & | rect, |
| const float | rad, | ||
| const blender::float4 | color ) |
Draws rounded corner segments but inverted. Imagine each corner like a filled right triangle, just that the hypotenuse is nicely curved inwards (towards the right angle of the triangle).
Useful for connecting orthogonal shapes with a rounded corner, which can look quite nice.
Definition at line 149 of file interface_draw.cc.
References GPU_PRIM_TRI_FAN, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), mul_v2_fl(), pos, roundboxtype, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_button_sections_alignment_separator().
| void UI_draw_safe_areas | ( | uint | pos, |
| const rctf * | rect, | ||
| const float | title_aspect[2], | ||
| const float | action_aspect[2] ) |
Draw title and text safe areas.
| pos | is a #PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attribute. |
| rect | The offsets for the view, not the zones. |
Definition at line 390 of file interface_draw.cc.
References ARRAY_SIZE, i, imm_draw_box_wire_2d(), pos, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by drawviewborder(), and blender::ed::vse::sequencer_draw_borders_overlay().
| void UI_draw_text_underline | ( | int | pos_x, |
| int | pos_y, | ||
| int | len, | ||
| int | height, | ||
| const float | color[4] ) |
Definition at line 217 of file interface_draw.cc.
References GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4fv(), immVertexFormat(), len, pos, and U.
|
static |
Definition at line 951 of file interface_draw.cc.
References atanf, BLF_color4f(), BLF_default(), BLF_draw_default(), BLI_YUV_ITU_BT709, DEG2RADF, float, GPU_PRIM_LINE_LOOP, immBegin(), immEnd(), immUniformColor4f(), immVertex2f(), M_PI, M_PI_2, polar_to_x(), polar_to_y(), pos, rgb_to_yuv(), SCOPES_VEC_U_SCALE, SCOPES_VEC_V_SCALE, sqrtf, v, and y.
Referenced by ui_draw_but_VECTORSCOPE().
Definition at line 605 of file interface_draw.cc.
References batch, BLI_assert_msg, col, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_1f, GPU_batch_uniform_4f, GPU_PRIM_POINTS, GPU_SHADER_3D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_AA, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format(), GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), and immIsShaderBound().
Referenced by ui_draw_but_VECTORSCOPE(), and ui_draw_but_WAVEFORM().
|
static |
Definition at line 637 of file interface_draw.cc.
References batch, col, blender::gpu::VertBuf::data(), data, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_1f, GPU_PRIM_POINTS, GPU_SHADER_3D_POINT_FLAT_COLOR, GPU_vertbuf_create_with_format(), GPU_vertbuf_data_alloc(), GPU_vertbuf_tag_dirty(), GPU_vertbuf_use(), GPU_vertformat_attr_add(), and i.
Referenced by ui_draw_but_VECTORSCOPE().
|
static |
Definition at line 51 of file interface_draw.cc.
Referenced by ui_draw_but_TAB_outline(), ui_draw_dropshadow(), UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), ui_draw_rounded_corners_inverted(), and UI_panel_category_draw_all().