|
Blender V4.3
|
#include "ED_screen.hh"#include "ED_screen_types.hh"#include "GPU_batch_presets.hh"#include "GPU_immediate.hh"#include "GPU_platform.hh"#include "GPU_state.hh"#include "BKE_global.hh"#include "BKE_screen.hh"#include "BLF_api.hh"#include "BLI_listbase.h"#include "BLI_math_vector.hh"#include "BLI_rect.h"#include "BLT_translation.hh"#include "WM_api.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "screen_intern.hh"Go to the source code of this file.
Macros | |
| #define | CORNER_RESOLUTION 3 |
Functions | |
| static void | do_vert_pair (blender::gpu::VertBuf *vbo, uint pos, uint *vidx, int corner, int i) |
| static blender::gpu::Batch * | batch_screen_edges_get (int *corner_len) |
| static void | drawscredge_area_draw (int sizex, int sizey, short x1, short y1, short x2, short y2, float edge_thickness) |
| static void | drawscredge_area (ScrArea *area, int sizex, int sizey, float edge_thickness) |
| Screen edges drawing. | |
| void | ED_screen_draw_edges (wmWindow *win) |
| void | screen_draw_move_highlight (bScreen *screen, eScreenAxis dir_axis) |
| static void | screen_draw_area_drag_tip (int x, int y, const ScrArea *source, const std::string &hint) |
| static void | screen_draw_area_closed (int xmin, int xmax, int ymin, int ymax) |
| void | screen_draw_join_highlight (const wmWindow *win, ScrArea *sa1, ScrArea *sa2, eScreenDir dir) |
| static void | rounded_corners (rctf rect, float color[4], int corners) |
| void | screen_draw_dock_preview (ScrArea *source, ScrArea *target, AreaDockTarget dock_target, float factor, int x, int y) |
| void | screen_draw_split_preview (ScrArea *area, const eScreenAxis dir_axis, const float factor) |
| #define CORNER_RESOLUTION 3 |
Definition at line 35 of file screen_draw.cc.
Referenced by batch_screen_edges_get(), and do_vert_pair().
|
static |
Definition at line 82 of file screen_draw.cc.
References CORNER_RESOLUTION, do_vert_pair(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, gpu_batch_presets_register(), GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRI_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), and pos.
Referenced by drawscredge_area_draw(), and ED_screen_draw_edges().
|
static |
Definition at line 37 of file screen_draw.cc.
References add_v2_v2(), copy_v2_v2(), CORNER_RESOLUTION, cosf, fabsf, GPU_vertbuf_attr_set(), M_PI_2, max_ff(), mul_v2_fl(), mul_v2_v2fl(), pos, and sinf.
Referenced by batch_screen_edges_get().
Screen edges drawing.
Definition at line 149 of file screen_draw.cc.
References drawscredge_area_draw().
Referenced by ED_screen_draw_edges().
|
static |
Definition at line 114 of file screen_draw.cc.
References batch, batch_screen_edges_get(), BLI_rctf_init(), GPU_batch_draw(), GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_SHADER_2D_AREA_BORDERS, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by drawscredge_area().
| void ED_screen_draw_edges | ( | wmWindow * | win | ) |
Only for edge lines between areas.
Definition at line 159 of file screen_draw.cc.
References AZONE_REGION_SCROLL, batch, batch_screen_edges_get(), BKE_screen_find_area_xy(), BLI_listbase_is_single(), BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_do_minmax_v(), BLI_rcti_init_minmax(), BLI_rcti_isect_pt_v(), BLI_rcti_pad(), BLI_rcti_size_x(), BLI_rcti_size_y(), BORDERPADDING, col, drawscredge_area(), ED_area_actionzone_find_xy(), wmWindow::eventstate, float, G, G_TRANSFORM_WM, GPU_BACKEND_OPENGL, GPU_batch_program_set_builtin(), GPU_batch_uniform_1f, GPU_batch_uniform_1i, GPU_batch_uniform_4fv, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_DEVICE_INTEL_UHD, GPU_DRIVER_ANY, GPU_flush(), GPU_OS_UNIX, GPU_scissor(), GPU_scissor_test(), GPU_SHADER_2D_AREA_BORDERS, GPU_type_matches_ex(), LISTBASE_FOREACH, pos, SCREENFULL, SPACE_TYPE_ANY, TH_EDITOR_BORDER, TH_EDITOR_OUTLINE, TH_EDITOR_OUTLINE_ACTIVE, ScrArea::totrct, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UI_SCALE_FAC, WM_window_get_active_screen(), WM_window_native_pixel_size(), rcti::xmin, wmEvent::xy, and rcti::ymin.
Referenced by wm_draw_window_onscreen().
Definition at line 453 of file screen_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, 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 screen_draw_dock_preview(), and screen_draw_split_preview().
Definition at line 370 of file screen_draw.cc.
References float, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), and UI_draw_roundbox_corner_set().
Referenced by screen_draw_join_highlight().
|
static |
Definition at line 311 of file screen_draw.cc.
References BLF_color4fv(), BLF_descender(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_height_max(), BLF_position(), BLF_size(), BLF_width(), ED_area_icon(), ED_area_name(), ICON_DEFAULT_WIDTH, IFACE_, uiWidgetColors::inner, int, left, uiFontStyle::points, rgba_uchar_to_float(), uiWidgetColors::roundness, uiWidgetColors::text, top, bTheme::tui, UI_CNR_ALL, UI_DEFAULT_TOOLTIP_POINTS, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_FSTYLE_TOOLTIP, UI_GetTheme(), UI_icon_draw_ex(), UI_NO_ICON_OVERLAY_TEXT, UI_SCALE_FAC, uiFontStyle::uifont_id, ThemeUI::wcol_tooltip, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by screen_draw_dock_preview(), and screen_draw_join_highlight().
| void screen_draw_dock_preview | ( | ScrArea * | source, |
| ScrArea * | target, | ||
| AreaDockTarget | dock_target, | ||
| float | factor, | ||
| int | x, | ||
| int | y ) |
Definition at line 520 of file screen_draw.cc.
References AREAMINX, BLI_rctf_rcti_copy(), Bottom, Center, ELEM, HEADERY, IFACE_, Left, None, Right, rounded_corners(), screen_draw_area_drag_tip(), split(), TH_EDITOR_BORDER, Top, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_NONE, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), UI_SCALE_FAC, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_join_dock_cb().
| void screen_draw_join_highlight | ( | const wmWindow * | win, |
| ScrArea * | sa1, | ||
| ScrArea * | sa2, | ||
| eScreenDir | dir ) |
Visual indication of the two areas involved in a proposed join.
| sa1 | Area from which the resultant originates. |
| sa2 | Target area that will be replaced. |
Definition at line 379 of file screen_draw.cc.
References area_getoffsets(), wmWindow::eventstate, IFACE_, SCREEN_DIR_IS_VERTICAL, SCREEN_DIR_NONE, screen_draw_area_closed(), screen_draw_area_drag_tip(), ScrArea::totrct, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), rcti::xmax, rctf::xmin, rcti::xmin, wmEvent::xy, rcti::ymax, and rcti::ymin.
Referenced by area_join_draw_cb().
| void screen_draw_move_highlight | ( | bScreen * | screen, |
| eScreenAxis | dir_axis ) |
Definition at line 278 of file screen_draw.cc.
References BLI_rctf_pad(), float, LISTBASE_FOREACH, SCREEN_AXIS_H, UI_CNR_ALL, UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_move_draw_cb().
| void screen_draw_split_preview | ( | ScrArea * | area, |
| const eScreenAxis | dir_axis, | ||
| const float | factor ) |
Definition at line 594 of file screen_draw.cc.
References BLI_rctf_rcti_copy(), rounded_corners(), SCREEN_AXIS_H, SCREEN_AXIS_V, TH_EDITOR_BORDER, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_draw_roundbox_4fv(), UI_draw_roundbox_4fv_ex(), UI_draw_roundbox_corner_set(), UI_GetThemeColor4fv(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by area_join_draw_cb(), and area_split_draw_cb().