|
Blender
V2.93
|
#include <math.h>#include <string.h>#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.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.h"#include "BKE_colortools.h"#include "BKE_curveprofile.h"#include "BKE_node.h"#include "BKE_tracking.h"#include "IMB_colormanagement.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "BIF_glutil.h"#include "BLF_api.h"#include "GPU_batch.h"#include "GPU_batch_presets.h"#include "GPU_immediate.h"#include "GPU_immediate_util.h"#include "GPU_matrix.h"#include "GPU_state.h"#include "UI_interface.h"#include "interface_intern.h"Go to the source code of this file.
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_roundbox_shade_x (const rctf *rect, bool filled, float rad, float shadetop, float shadedown, const float col[4]) |
| 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 *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), 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 *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti) |
| static void | waveform_draw_one (float *waveform, int nbr, const float col[3]) |
| void | ui_draw_but_WAVEFORM (ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), 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]) |
| void | ui_draw_but_VECTORSCOPE (ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti) |
| static void | ui_draw_colorband_handle_tri_hlight (uint pos, float x1, float y1, float halfwidth, float height) |
| static void | ui_draw_colorband_handle_tri (uint pos, float x1, float y1, float halfwidth, float height, bool fill) |
| static void | ui_draw_colorband_handle_box (uint pos, float x1, float y1, float x2, float y2, bool fill) |
| static void | ui_draw_colorband_handle (uint shdr_pos, const rcti *rect, float x, const float rgb[3], struct ColorManagedDisplay *display, bool active) |
| void | ui_draw_but_COLORBAND (uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *rect) |
| void | ui_draw_but_UNITVEC (uiBut *but, const uiWidgetColors *wcol, const rcti *rect) |
| 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 *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti) |
| static void | ui_shadowbox (const rctf *rect, uint pos, uint color, float shadsize, uchar alpha) |
| void | UI_draw_box_shadow (const rctf *rect, uchar alpha) |
| void | ui_draw_dropshadow (const rctf *rct, float radius, float aspect, float alpha, int UNUSED(select)) |
Variables | |
| static int | roundboxtype = UI_CNR_ALL |
| #define HISTOGRAM_TOT_GRID_LINES 4 |
Definition at line 481 of file interface_draw.c.
|
static |
Definition at line 399 of file interface_draw.c.
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().
|
static |
Definition at line 1484 of file interface_draw.c.
References gl_shaded_color_get(), and immUniformColor3ubv().
Referenced by ui_draw_but_CURVE(), and ui_draw_but_CURVEPROFILE().
Definition at line 1470 of file interface_draw.c.
Referenced by gl_shaded_color(), and gl_shaded_color_get_fl().
Definition at line 1477 of file interface_draw.c.
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 418 of file interface_draw.c.
References alpha, data, 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(), r, w(), x, x2, 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 1760 of file interface_draw.c.
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 851 of file interface_draw.c.
References angle(), center, and cosf.
Referenced by vectorscope_draw_target().
Definition at line 856 of file interface_draw.c.
References angle(), center, and sinf.
Referenced by vectorscope_draw_target().
Definition at line 2294 of file interface_draw.c.
References alpha, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_TRIS, GPU_SHADER_2D_SMOOTH_COLOR, GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immVertexFormat(), pos, and ui_shadowbox().
| void ui_draw_but_COLORBAND | ( | uiBut * | but, |
| const uiWidgetColors * | UNUSEDwcol, | ||
| const rcti * | rect | ||
| ) |
Definition at line 1230 of file interface_draw.c.
References Freestyle::a, BKE_colorband_evaluate(), BLI_rcti_size_y(), uiBut::block, ColorBand::cur, ColorBand::data, uiButColorBand::edit_coba, float(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_PRIM_TRI_STRIP, GPU_SHADER_2D_CHECKER, GPU_SHADER_2D_SMOOTH_COLOR, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IMB_colormanagement_scene_linear_to_display_v3(), imm_draw_box_wire_2d(), immAttr4f(), immAttr4fv(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1i(), immUniform4f(), immUniformColor4f(), immVertex2f(), immVertex2fv(), immVertexFormat(), NULL, uiBut::poin, pos, CBData::pos, CBData::r, ColorBand::tot, UI_ALPHA_CHECKER_DARK, UI_ALPHA_CHECKER_LIGHT, ui_block_cm_display_get(), ui_draw_colorband_handle(), v1, v2, rcti::xmax, rcti::xmin, y1, 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 1491 of file interface_draw.c.
References Freestyle::a, 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, 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_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_PRIM_POINTS, GPU_PRIM_TRI_STRIP, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_2D_FLAT_COLOR, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), uiButCurveMapping::gradient_type, IMB_colormanagement_get_luminance(), imm_draw_box_wire_2d(), 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(), NULL, 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_DPI_FAC, ui_draw_but_curve_grid(), ui_draw_gradient(), UI_GetThemeColor4fv(), UI_GRAD_H, ARegion::winx, ARegion::winy, CurveMapPoint::x, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, CurveMapPoint::y, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_draw_but().
|
static |
Definition at line 1438 of file interface_draw.c.
References ceilf, GPU_PRIM_LINES, immBegin(), immEnd(), immVertex2f(), pos, 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 1770 of file interface_draw.c.
References uiBlock::aspect, 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, col, uiButCurveProfile::edit_profile, CurveProfile::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_2D_FLAT_COLOR, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), CurveProfilePoint::h1_loc, CurveProfilePoint::h2_loc, if(), 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, min_ff(), NULL, uiWidgetColors::outline, CurveProfile::path, CurveProfile::path_len, uiBut::poin, point_draw_handles(), pos, PROF_H1_SELECT, PROF_H2_SELECT, PROF_SELECT, PROF_TABLE_LEN, PROF_UPDATE_NONE, PROF_USE_CLIP, rgb_uchar_to_float(), CurveProfile::segments, CurveProfile::segments_len, swap_v3_v3(), CurveProfile::table, TH_TEXT, TH_TEXT_HI, UI_DPI_FAC, ui_draw_but_curve_grid(), UI_GetThemeColor4fv(), CurveProfile::view_rect, ARegion::winx, ARegion::winy, CurveProfilePoint::x, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, CurveProfilePoint::y, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_HISTOGRAM | ( | ARegion * | UNUSEDregion, |
| uiBut * | but, | ||
| const uiWidgetColors * | UNUSEDwcol, | ||
| const rcti * | recti | ||
| ) |
Definition at line 483 of file interface_draw.c.
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_2D_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::xmax, rcti::xmin, rctf::xmin, Histogram::ymax, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_IMAGE | ( | ARegion * | UNUSEDregion, |
| uiBut * | but, | ||
| const uiWidgetColors * | UNUSEDwcol, | ||
| const rcti * | rect | ||
| ) |
Definition at line 302 of file interface_draw.c.
References BLI_rcti_size_x(), BLI_rcti_size_y(), uiBut::col, col, GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_BLEND_NONE, GPU_RGBA8, GPU_scissor(), GPU_scissor_get(), GPU_SHADER_2D_IMAGE_COLOR, if(), IMB_scaleImBuf(), immDrawPixelsTex(), immDrawPixelsTexSetup(), uiBut::poin, ImBuf::rect, 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 213 of file interface_draw.c.
References Freestyle::a, col, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_PRIM_LINE_STRIP, GPU_SHADER_2D_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 * | UNUSEDregion, |
| uiBut * | but, | ||
| const uiWidgetColors * | UNUSEDwcol, | ||
| const rcti * | recti | ||
| ) |
Definition at line 2046 of file interface_draw.c.
References float(), uiBut::poin, rcti::xmax, rcti::xmin, rctf::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but().
| void ui_draw_but_UNITVEC | ( | uiBut * | but, |
| const uiWidgetColors * | wcol, | ||
| const rcti * | rect | ||
| ) |
Definition at line 1368 of file interface_draw.c.
References BLI_rcti_size_x(), BLI_rcti_size_y(), GPU_batch_draw(), GPU_batch_preset_sphere(), GPU_batch_program_set_builtin(), GPU_batch_uniform_3fv, GPU_batch_uniform_4f, 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_2D_UNIFORM_COLOR, GPU_SHADER_SIMPLE_LIGHTING, GPU_vertformat_attr_add(), GPUBatch, imm_draw_circle_wire_2d(), immBindBuiltinProgram(), immUnbindProgram(), immUniformColor3ubv(), immVertexFormat(), uiWidgetColors::inner, min_ff(), pos, size(), ui_but_v3_get(), UI_CNR_ALL, UI_draw_roundbox_3ub_alpha(), UI_draw_roundbox_corner_set(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by widget_unitvec().
| void ui_draw_but_VECTORSCOPE | ( | ARegion * | UNUSEDregion, |
| uiBut * | but, | ||
| const uiWidgetColors * | UNUSEDwcol, | ||
| const rcti * | recti | ||
| ) |
Definition at line 957 of file interface_draw.c.
References DEG2RADF, and uiBut::poin.
Referenced by ui_draw_but().
| void ui_draw_but_WAVEFORM | ( | ARegion * | UNUSEDregion, |
| uiBut * | but, | ||
| const uiWidgetColors * | UNUSEDwcol, | ||
| const rcti * | recti | ||
| ) |
Definition at line 605 of file interface_draw.c.
References uiBut::poin.
Referenced by ui_draw_but().
|
static |
Definition at line 1132 of file interface_draw.c.
References blender::compositor::active, BLI_rcti_size_y(), floorf, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_PRIM_LINES, GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_2D_UNIFORM_COLOR, GPU_viewport_size_get_f(), height, IMB_colormanagement_scene_linear_to_display_v3(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniformArray4fv(), immUniformColor3fv(), immUniformColor3ub(), immVertex2f(), UI_DPI_FAC, ui_draw_colorband_handle_box(), ui_draw_colorband_handle_tri(), ui_draw_colorband_handle_tri_hlight(), UNPACK3, x, y1, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_but_COLORBAND().
|
static |
Definition at line 1121 of file interface_draw.c.
References GPU_PRIM_LINE_LOOP, GPU_PRIM_TRI_FAN, immBegin(), immEnd(), immVertex2f(), pos, x2, and y1.
Referenced by ui_draw_colorband_handle().
|
static |
Definition at line 1097 of file interface_draw.c.
References GPU_line_smooth(), GPU_polygon_smooth(), GPU_PRIM_LINE_LOOP, GPU_PRIM_TRIS, height, immBegin(), immEnd(), immVertex2f(), pos, and y1.
Referenced by ui_draw_colorband_handle().
|
static |
Definition at line 1083 of file interface_draw.c.
References GPU_line_smooth(), GPU_PRIM_LINE_STRIP, height, immBegin(), immEnd(), immVertex2f(), pos, and y1.
Referenced by ui_draw_colorband_handle().
| void ui_draw_dropshadow | ( | const rctf * | rct, |
| float | radius, | ||
| float | aspect, | ||
| float | alpha, | ||
| int | UNUSEDselect | ||
| ) |
Definition at line 2319 of file interface_draw.c.
References Freestyle::a, alpha, 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, GPUBatch, uiWidgetBaseParameters::recti, roundboxtype, select(), ui_batch_roundbox_shadow_get(), UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void UI_draw_roundbox_3fv_alpha | ( | const rctf * | rect, |
| bool | filled, | ||
| float | rad, | ||
| const float | col[3], | ||
| float | alpha | ||
| ) |
Definition at line 141 of file interface_draw.c.
References alpha, col, NULL, and UI_draw_roundbox_4fv_ex().
| void UI_draw_roundbox_3ub_alpha | ( | const rctf * | rect, |
| bool | filled, | ||
| float | rad, | ||
| const uchar | col[3], | ||
| uchar | alpha | ||
| ) |
Definition at line 129 of file interface_draw.c.
References alpha, col, float(), NULL, and UI_draw_roundbox_4fv_ex().
Referenced by ui_draw_but_UNITVEC().
Definition at line 160 of file interface_draw.c.
References col, NULL, and UI_draw_roundbox_4fv_ex().
Referenced by draw_scope_end(), ui_draw_but_HISTOGRAM(), and ui_draw_dropshadow().
| 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 84 of file interface_draw.c.
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, GPUBatch, 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 UI_draw_roundbox_3fv_alpha(), UI_draw_roundbox_3ub_alpha(), UI_draw_roundbox_4fv(), UI_draw_roundbox_aa(), and UI_draw_roundbox_shade_x().
Definition at line 148 of file interface_draw.c.
References NULL, and UI_draw_roundbox_4fv_ex().
| void UI_draw_roundbox_corner_set | ( | int | type | ) |
Definition at line 69 of file interface_draw.c.
References roundboxtype, and type.
Referenced by acf_generic_root_backdrop(), acf_group_backdrop(), acf_nla_controls_backdrop(), acf_nlaaction_backdrop(), acf_summary_backdrop(), draw_current_frame(), draw_group_overlay(), draw_keylist(), draw_scope_end(), draw_tile(), file_draw_list(), gizmo_axis_draw(), icon_draw_rect_input(), nla_draw_strip(), node_draw_basis(), node_draw_frame(), node_draw_reroute(), node_draw_shadow(), node_socket_draw_multi_input(), outliner_draw_active_indicator(), outliner_draw_iconrow_number(), panel_draw_aligned_backdrop(), panel_draw_highlight_border(), region_draw_azone_tab_arrow(), region_draw_status_text(), textview_draw_string(), ui_draw_but_HISTOGRAM(), ui_draw_but_UNITVEC(), UI_fontstyle_draw_simple_backdrop(), and UI_panel_category_draw_all().
| void UI_draw_roundbox_shade_x | ( | const rctf * | rect, |
| bool | filled, | ||
| float | rad, | ||
| float | shadetop, | ||
| float | shadedown, | ||
| const float | col[4] | ||
| ) |
Definition at line 168 of file interface_draw.c.
References clamp_f(), col, max_ff(), min_ff(), and UI_draw_roundbox_4fv_ex().
| 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. |
| x1,x2,y1,y2 | The offsets for the view, not the zones. |
Definition at line 373 of file interface_draw.c.
References ARRAY_SIZE, imm_draw_box_wire_2d(), pos, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void UI_draw_text_underline | ( | int | pos_x, |
| int | pos_y, | ||
| int | len, | ||
| int | height, | ||
| const float | color[4] | ||
| ) |
Definition at line 195 of file interface_draw.c.
References GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), height, immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor4fv(), immVertexFormat(), len, and pos.
|
static |
v1-_
| -_v2
| |
| |
| |
v7_______v3____v4
\ | /
\ | _v5
v8______v6_-
Definition at line 2231 of file interface_draw.c.
References alpha, immAttr4ub(), immVertex2fv(), pos, v1, v2, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by UI_draw_box_shadow().
|
static |
Definition at line 861 of file interface_draw.c.
References atanf, BLI_YUV_ITU_BT709, DEG2RADF, float(), GPU_PRIM_LINE_LOOP, GPU_PRIM_LINE_STRIP, immBegin(), immEnd(), immUniformColor4f(), immVertex2f(), M_PI, M_PI_2, polar_to_x(), polar_to_y(), pos, rgb_to_yuv(), sqrtf, v, and y.
Definition at line 586 of file interface_draw.c.
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_2D_UNIFORM_COLOR, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), GPUBatch, and NULL.
|
static |
Definition at line 67 of file interface_draw.c.
Referenced by ui_draw_but_TAB_outline(), ui_draw_dropshadow(), UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), and UI_panel_category_draw_all().