|
Blender V4.3
|
#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.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 "UI_interface.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 *, 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 *, 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 *, 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], 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) |
| static void | gl_shaded_color_get (const uchar color[3], int shade, uchar r_color[3]) |
| static void | gl_shaded_color_get_fl (const uchar *color, int shade, float r_color[3]) |
| static void | gl_shaded_color (const uchar *color, int shade) |
| 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 *, 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 491 of file interface_draw.cc.
Referenced by ui_draw_but_HISTOGRAM().
|
static |
Definition at line 650 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_COMP_F32, GPU_FETCH_FLOAT, 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 411 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().
Definition at line 1566 of file interface_draw.cc.
References gl_shaded_color_get(), and immUniformColor3ubv().
Referenced by ui_draw_but_CURVE(), and ui_draw_but_CURVEPROFILE().
Definition at line 1552 of file interface_draw.cc.
Referenced by gl_shaded_color(), and gl_shaded_color_get_fl().
Definition at line 1559 of file interface_draw.cc.
References gl_shaded_color_get(), and rgb_uchar_to_float().
Referenced by ui_draw_but_CURVE(), and ui_draw_but_CURVEPROFILE().
|
static |
Definition at line 426 of file interface_draw.cc.
References b, float, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, GPU_line_smooth(), GPU_line_width(), GPU_PRIM_LINE_STRIP, GPU_PRIM_TRI_STRIP, immBegin(), immEnd(), immUniformColor4f(), immUniformColor4fv(), immVertex2f(), and w().
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 1844 of file interface_draw.cc.
References ELEM, HD_ALIGN, HD_FREE, PROF_H1_SELECT, PROF_H2_SELECT, and PROF_SELECT.
Referenced by ui_draw_but_CURVEPROFILE().
Definition at line 909 of file interface_draw.cc.
References cosf.
Referenced by ui_draw_but_VECTORSCOPE(), and vectorscope_draw_target().
Definition at line 914 of file interface_draw.cc.
References sinf.
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 1325 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_COMP_F32, GPU_FETCH_FLOAT, 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, 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 1573 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, gl_shaded_color(), gl_shaded_color_get_fl(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, 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_3D_POINT_VARYING_SIZE_VARYING_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), uiButCurveMapping::gradient_type, IMB_colormanagement_get_luminance(), imm_draw_box_wire_2d(), immAttr1f(), immAttr4fv(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3ub(), immUniformColor3ubv(), immUniformColor3ubvAlpha(), immUniformColor4fv(), immVertex2f(), immVertexFormat(), uiWidgetColors::inner, interp_v3_v3v3(), uiWidgetColors::item, len_squared_v3(), len_squared_v3v3(), linearrgb_to_srgb_v3_v3(), max_ff(), min_ff(), uiWidgetColors::outline, uiBut::poin, pos, rgb_to_hsv_v(), rgb_uchar_to_float(), CurveMapping::sample, swap_v3_v3(), CurveMap::table, TH_TEXT, TH_TEXT_HI, CurveMap::totpoint, ui_draw_but_curve_grid(), ui_draw_gradient(), UI_GetThemeColor4fv(), UI_GRAD_H, UI_SCALE_FAC, 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 1520 of file interface_draw.cc.
References ceilf, GPU_PRIM_LINES, immBegin(), immEnd(), immVertex2f(), pos, rcti::xmax, rcti::xmin, 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 1851 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, col, uiButCurveProfile::edit_profile, flag, float, gl_shaded_color(), gl_shaded_color_get_fl(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_point_size(), GPU_polygon_smooth(), GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRIS, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_FLAT_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), CurveProfilePoint::h1_loc, CurveProfilePoint::h2_loc, imm_draw_box_wire_2d(), immAttr4fv(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniformColor3fv(), immUniformColor3ubv(), immUniformColor3ubvAlpha(), immVertex2f(), immVertexFormat(), uiWidgetColors::inner, interp_v3_v3v3(), uiWidgetColors::item, len_squared_v3(), len_squared_v3v3(), max_ff(), MEM_freeN(), MEM_mallocN, MEM_SAFE_FREE, min_ff(), uiWidgetColors::outline, uiBut::poin, point_draw_handles(), pos, PROF_H1_SELECT, PROF_H2_SELECT, PROF_SELECT, PROF_UPDATE_NONE, PROF_USE_CLIP, rgb_uchar_to_float(), swap_v3_v3(), TH_TEXT, TH_TEXT_HI, ui_draw_but_curve_grid(), UI_GetThemeColor4fv(), UI_SCALE_FAC, CurveProfile::view_rect, CurveProfilePoint::x, rcti::xmax, rctf::xmin, rcti::xmin, CurveProfilePoint::y, rcti::ymax, 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 493 of file interface_draw.cc.
References BLI_rctf_size_x(), BLI_rctf_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_COMP_F32, GPU_FETCH_FLOAT, 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, 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(), Histogram::x_resolution, rcti::xmax, rctf::xmin, rcti::xmin, Histogram::ymax, rcti::ymax, 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 322 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_RGBA8, 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 233 of file interface_draw.cc.
References col, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_LINE_STRIP, GPU_SHADER_3D_SMOOTH_COLOR, GPU_vertformat_attr_add(), immAttr3ubv(), immBeginAtMost(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), 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 widget_tab().
| void ui_draw_but_TRACKPREVIEW | ( | ARegion * | region, |
| uiBut * | but, | ||
| const uiWidgetColors * | wcol, | ||
| const rcti * | recti ) |
Definition at line 2137 of file interface_draw.cc.
References BKE_tracking_sample_pattern(), BLI_rctf_size_x(), BLI_rctf_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_COMP_F32, GPU_FETCH_FLOAT, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), GPU_PRIM_LINES, GPU_RGBA8, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_3D_FLAT_COLOR, GPU_SHADER_3D_IMAGE_COLOR, GPU_vertformat_attr_add(), IMB_freeImBuf(), IMB_rect_from_float(), 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, ImBuf::x, rcti::xmax, rctf::xmin, rcti::xmin, ImBuf::y, rcti::ymax, 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 1446 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_COMP_F32, GPU_CULL_BACK, GPU_CULL_NONE, GPU_face_culling(), GPU_FETCH_FLOAT, 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, ui_but_v3_get(), UI_CNR_ALL, UI_draw_roundbox_3ub_alpha(), UI_draw_roundbox_corner_set(), rcti::xmax, rctf::xmin, rcti::xmin, rcti::ymax, 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 975 of file interface_draw.cc.
References b, BLI_rctf_size_x(), BLI_rctf_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_COMP_F32, GPU_FETCH_FLOAT, 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(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformColor3f(), immUniformColor4f(), immVertex2f(), immVertexFormat(), int, Scopes::ok, uiBut::poin, polar_to_x(), polar_to_y(), pos, SCOPES_VECSCOPE_LUMA, SCOPES_VECSCOPE_RGB, 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, x, rcti::xmax, rctf::xmin, rcti::xmin, y, rcti::ymax, 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 669 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(), CLAMP, col, draw_scope_end(), ELEM, float, GPU_blend(), GPU_BLEND_ADDITIVE, GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, 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(), 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, 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, rcti::xmax, rctf::xmin, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but().
|
static |
Definition at line 1222 of file interface_draw.cc.
References 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(), ui_draw_colorband_handle_box(), ui_draw_colorband_handle_tri(), UI_SCALE_FAC, UNPACK3, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but_COLORBAND().
|
static |
Definition at line 1212 of file interface_draw.cc.
References GPU_PRIM_TRI_STRIP, immBegin(), immEnd(), immVertex2f(), and pos.
Referenced by ui_draw_colorband_handle().
Definition at line 1202 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 2306 of file interface_draw.cc.
References 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::recti, roundboxtype, smoothminf(), 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::node_draw_shadow(), 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 125 of file interface_draw.cc.
References col, and UI_draw_roundbox_4fv_ex().
Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_nla_controls_backdrop(), and acf_summary_backdrop().
| void UI_draw_roundbox_3ub_alpha | ( | const rctf * | rect, |
| bool | filled, | ||
| float | rad, | ||
| const uchar | col[3], | ||
| uchar | alpha ) |
Definition at line 113 of file interface_draw.cc.
References col, float, 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 144 of file interface_draw.cc.
References col, and UI_draw_roundbox_4fv_ex().
Referenced by acf_nlaaction_backdrop(), draw_keylist_block_gpencil(), draw_keylist_block_interpolation_line(), draw_keylist_block_moving_hold(), draw_keylist_block_standard(), 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_hidden(), 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(), panel_draw_aligned_backdrop(), panel_draw_highlight_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_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 68 of file interface_draw.cc.
References batch, 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::recti, roundboxtype, 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 draw_current_frame(), ED_screen_draw_edges(), gizmo_axis_draw(), blender::ed::space_node::node_draw_extra_info_panel_back(), blender::ed::space_node::node_socket_draw_multi_input(), screen_draw_area_closed(), screen_draw_dock_preview(), screen_draw_join_highlight(), screen_draw_move_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(), and UI_draw_roundbox_aa().
Definition at line 132 of file interface_draw.cc.
References UI_draw_roundbox_4fv_ex().
Referenced by draw_tile_background(), blender::ed::space_node::frame_node_draw_background(), blender::ed::outliner::outliner_draw_active_indicator(), and region_draw_azone_tab_arrow().
| void UI_draw_roundbox_corner_set | ( | int | type | ) |
Definition at line 54 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(), draw_current_frame(), draw_keylist_block(), draw_keylist_block_gpencil(), draw_scope_end(), draw_tile_background(), 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_extra_info_panel_back(), blender::ed::space_node::node_draw_hidden(), 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::space_node::node_socket_draw_multi_input(), blender::ed::outliner::outliner_draw_active_indicator(), panel_draw_aligned_backdrop(), panel_draw_highlight_border(), 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_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_layout_panels_backdrop(), UI_fontstyle_draw_simple_backdrop(), UI_panel_category_draw_all(), 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 150 of file interface_draw.cc.
References GPU_COMP_F32, GPU_FETCH_FLOAT, 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 385 of file interface_draw.cc.
References ARRAY_SIZE, imm_draw_box_wire_2d(), pos, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by drawviewborder(), and sequencer_draw_borders_overlay().
Definition at line 217 of file interface_draw.cc.
References GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor4fv(), immVertexFormat(), len, and pos.
|
static |
Definition at line 919 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(), label, M_PI, M_PI_2, polar_to_x(), polar_to_y(), pos, rgb_to_yuv(), sqrtf, v, and y.
Referenced by ui_draw_but_VECTORSCOPE().
|
static |
Definition at line 592 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_batch_uniform_4f, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_POINTS, GPU_SHADER_3D_UNIFORM_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(), and ui_draw_but_WAVEFORM().
|
static |
Definition at line 618 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_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_POINTS, GPU_SHADER_3D_SMOOTH_COLOR, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_tag_dirty(), GPU_vertbuf_use(), and GPU_vertformat_attr_add().
Referenced by ui_draw_but_VECTORSCOPE().
|
static |
Definition at line 52 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().