|
Blender V4.3
|
Functions for screen vertices and edges. More...
#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_rect.h"#include "BKE_screen.hh"#include "DNA_screen_types.h"#include "DNA_windowmanager_types.h"#include "ED_screen.hh"#include "MEM_guardedalloc.h"#include "WM_api.hh"#include "screen_intern.hh"Go to the source code of this file.
Functions for screen vertices and edges.
Screen geometry refers to the vertices (ScrVert) and edges (ScrEdge) through which the flexible screen-layout system of Blender is established.
Definition in file screen_geometry.cc.
Definition at line 30 of file screen_geometry.cc.
Referenced by area_move_apply_do(), area_move_set_limits(), screen_geom_find_area_split_point(), and screen_geom_vertices_scale_pass().
| ScrEdge * screen_geom_area_map_find_active_scredge | ( | const ScrAreaMap * | area_map, |
| const rcti * | bounds_rect, | ||
| int | mx, | ||
| int | my ) |
| bounds_rect | Either window or screen bounds. Used to exclude edges along window/screen edges. |
Definition at line 74 of file screen_geometry.cc.
References abs(), BORDERPADDING, CLAMP_MIN, ScrAreaMap::edgebase, LISTBASE_FOREACH, max, min, screen_geom_edge_is_horizontal(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by actionzone_modal(), area_split_invoke(), screen_area_edge_from_cursor(), and screen_geom_find_active_scredge().
Definition at line 34 of file screen_geometry.cc.
Referenced by area_move_set_limits(), and screen_geom_find_area_split_point().
Definition at line 64 of file screen_geometry.cc.
References AREAMAP_FROM_SCREEN, screen_geom_edge_add_ex(), and v2.
Referenced by area_split(), screen_add(), and screen_area_join_aligned().
| ScrEdge * screen_geom_edge_add_ex | ( | ScrAreaMap * | area_map, |
| ScrVert * | v1, | ||
| ScrVert * | v2 ) |
Definition at line 53 of file screen_geometry.cc.
References BKE_screen_sort_scrvert(), BLI_addtail(), ScrAreaMap::edgebase, MEM_callocN, ScrEdge::v1, ScrEdge::v2, and v2.
Referenced by screen_area_create_with_geometry(), and screen_geom_edge_add().
| bool screen_geom_edge_is_horizontal | ( | ScrEdge * | se | ) |
Definition at line 69 of file screen_geometry.cc.
References ScrEdge::v1, ScrEdge::v2, ScrVert::vec, and vec2s::y.
Referenced by area_move_init(), area_split_invoke(), screen_area_edge_from_cursor(), screen_cursor_set(), and screen_geom_area_map_find_active_scredge().
| ScrEdge * screen_geom_find_active_scredge | ( | const wmWindow * | win, |
| const bScreen * | screen, | ||
| int | mx, | ||
| int | my ) |
Need win size to make sure not to include edges along screen edge.
Definition at line 111 of file screen_geometry.cc.
References AREAMAP_FROM_SCREEN, wmWindow::global_areas, screen_geom_area_map_find_active_scredge(), USER_APP_LOCK_EDGE_RESIZE, WM_window_rect_calc(), and WM_window_screen_rect_calc().
Referenced by area_move_init(), and screen_cursor_set().
| short screen_geom_find_area_split_point | ( | const ScrArea * | area, |
| const rcti * | window_rect, | ||
| eScreenAxis | dir_axis, | ||
| float | fac ) |
Definition at line 283 of file screen_geometry.cc.
References AREAMINX, CLAMP, ED_area_headersize(), round_fl_to_short(), SCREEN_AXIS_H, SCREEN_AXIS_V, screen_geom_area_height(), screen_geom_area_width(), UI_SCALE_FAC, x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by area_split().
Select all edges that are directly or indirectly connected to edge.
Definition at line 351 of file screen_geometry.cc.
References ED_screen_verts_iter, LISTBASE_FOREACH, SCREEN_AXIS_H, SCREEN_AXIS_V, and WM_window_get_active_screen().
Referenced by area_move_init(), and screen_geom_vertices_scale_pass().
Definition at line 48 of file screen_geometry.cc.
References AREAMAP_FROM_SCREEN, and screen_geom_vertex_add_ex().
Referenced by area_split(), and screen_add().
| ScrVert * screen_geom_vertex_add_ex | ( | ScrAreaMap * | area_map, |
| short | x, | ||
| short | y ) |
Definition at line 39 of file screen_geometry.cc.
References BLI_addtail(), MEM_callocN, ScrVert::vec, ScrAreaMap::vertbase, vec2s::x, x, vec2s::y, and y.
Referenced by screen_area_create_with_geometry(), and screen_geom_vertex_add().
Main screen-layout calculation function.
Definition at line 236 of file screen_geometry.cc.
References ScrAreaMap::areabase, ED_area_global_size_y(), GLOBAL_AREA_ALIGN_BOTTOM, GLOBAL_AREA_ALIGN_TOP, GLOBAL_AREA_IS_HIDDEN, wmWindow::global_areas, LISTBASE_FOREACH, screen_geom_vertices_scale_pass(), WM_window_rect_calc(), WM_window_screen_rect_calc(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by screen_refresh().
|
static |
A single pass for moving all screen vertices to fit into screen_rect.
Definition at line 139 of file screen_geometry.cc.
References BKE_screen_find_edge(), BLI_rcti_size_x(), BLI_rcti_size_y(), CLAMP, ED_area_headersize(), ELEM, float, LISTBASE_FOREACH, min, minmax_v2v2_v2(), round_fl_to_short(), screen_geom_area_height(), screen_geom_select_connected_edge(), SPACE_ACTION, ScrEdge::v1, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by screen_geom_vertices_scale().