Blender
V3.3
|
Functions for screen vertices and edges. More...
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BKE_screen.h"
#include "DNA_screen_types.h"
#include "DNA_windowmanager_types.h"
#include "ED_screen.h"
#include "MEM_guardedalloc.h"
#include "WM_api.h"
#include "screen_intern.h"
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.c.
int screen_geom_area_height | ( | const ScrArea * | area | ) |
Definition at line 28 of file screen_geometry.c.
References blender::compositor::area().
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, | ||
const int | mx, | ||
const int | my | ||
) |
Definition at line 72 of file screen_geometry.c.
References blender::math::abs(), BORDERPADDING, CLAMP_MIN, ScrAreaMap::edgebase, LISTBASE_FOREACH, max, MAX2, min, MIN2, NULL, 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().
int screen_geom_area_width | ( | const ScrArea * | area | ) |
Definition at line 32 of file screen_geometry.c.
References blender::compositor::area().
Referenced by area_move_set_limits(), and screen_geom_find_area_split_point().
Definition at line 62 of file screen_geometry.c.
References AREAMAP_FROM_SCREEN, screen_geom_edge_add_ex(), v1, 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 51 of file screen_geometry.c.
References BKE_screen_sort_scrvert(), BLI_addtail(), ScrAreaMap::edgebase, MEM_callocN, v1, ScrEdge::v1, v2, and ScrEdge::v2.
Referenced by screen_area_create_with_geometry(), and screen_geom_edge_add().
Definition at line 67 of file screen_geometry.c.
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 109 of file screen_geometry.c.
References AREAMAP_FROM_SCREEN, wmWindow::global_areas, NULL, 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 280 of file screen_geometry.c.
References blender::compositor::area(), AREAMINX, CLAMP, ED_area_headersize(), round_fl_to_short(), SCREEN_AXIS_H, SCREEN_AXIS_V, screen_geom_area_height(), screen_geom_area_width(), 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 348 of file screen_geometry.c.
References ED_screen_verts_iter, bScreen::edgebase, 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 46 of file screen_geometry.c.
References AREAMAP_FROM_SCREEN, screen_geom_vertex_add_ex(), x, and y.
Referenced by area_split(), and screen_add().
ScrVert* screen_geom_vertex_add_ex | ( | ScrAreaMap * | area_map, |
short | x, | ||
short | y | ||
) |
Definition at line 37 of file screen_geometry.c.
References BLI_addtail(), MEM_callocN, ScrVert::vec, ScrAreaMap::vertbase, x, vec2s::x, y, and vec2s::y.
Referenced by screen_area_create_with_geometry(), and screen_geom_vertex_add().
Main screen-layout calculation function.
Definition at line 233 of file screen_geometry.c.
References blender::compositor::area(), ScrAreaMap::areabase, ED_area_global_size_y(), GLOBAL_AREA_ALIGN_BOTTOM, GLOBAL_AREA_ALIGN_TOP, GLOBAL_AREA_IS_HIDDEN, wmWindow::global_areas, height, 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 ED_screen_refresh().
|
static |
A single pass for moving all screen vertices to fit into screen_rect.
Definition at line 137 of file screen_geometry.c.
References blender::compositor::area(), bScreen::areabase, BKE_screen_find_edge(), BLI_rcti_size_x(), BLI_rcti_size_y(), CLAMP, ED_area_headersize(), ELEM, float(), LISTBASE_FOREACH, max, min, minmax_v2v2_v2(), round_fl_to_short(), screen_geom_area_height(), screen_geom_select_connected_edge(), SPACE_ACTION, bScreen::vertbase, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by screen_geom_vertices_scale().