|
Blender V5.0
|
#include <algorithm>#include <cfloat>#include <climits>#include <cmath>#include <cstdio>#include <cstdlib>#include "BLI_math_base.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.hh"#include "BLI_rect.h"#include "BLI_utildefines.h"#include "DNA_vec_types.h"Go to the source code of this file.
Functions | |
| bool | BLI_rcti_is_empty (const rcti *rect) |
| bool | BLI_rctf_is_empty (const rctf *rect) |
| bool | BLI_rcti_isect_x (const rcti *rect, const int x) |
| bool | BLI_rcti_isect_y (const rcti *rect, const int y) |
| bool | BLI_rcti_isect_pt (const rcti *rect, const int x, const int y) |
| bool | BLI_rcti_isect_pt_v (const rcti *rect, const int xy[2]) |
| bool | BLI_rctf_isect_x (const rctf *rect, const float x) |
| bool | BLI_rctf_isect_y (const rctf *rect, const float y) |
| bool | BLI_rctf_isect_pt (const rctf *rect, const float x, const float y) |
| bool | BLI_rctf_isect_pt_v (const rctf *rect, const float xy[2]) |
| int | BLI_rcti_length_x (const rcti *rect, const int x) |
| int | BLI_rcti_length_y (const rcti *rect, const int y) |
| float | BLI_rctf_length_x (const rctf *rect, const float x) |
| float | BLI_rctf_length_y (const rctf *rect, const float y) |
| bool | BLI_rctf_inside_rctf (const rctf *rct_a, const rctf *rct_b) |
| bool | BLI_rcti_inside_rcti (const rcti *rct_a, const rcti *rct_b) |
| static int | isect_segments_i (const int v1[2], const int v2[2], const int v3[2], const int v4[2]) |
| static int | isect_segments_fl (const float v1[2], const float v2[2], const float v3[2], const float v4[2]) |
| bool | BLI_rcti_isect_segment (const rcti *rect, const int s1[2], const int s2[2]) |
| bool | BLI_rctf_isect_segment (const rctf *rect, const float s1[2], const float s2[2]) |
| bool | BLI_rcti_isect_circle (const rcti *rect, const float xy[2], const float radius) |
| bool | BLI_rctf_isect_circle (const rctf *rect, const float xy[2], const float radius) |
| void | BLI_rctf_union (rctf *rct_a, const rctf *rct_b) |
| void | BLI_rcti_union (rcti *rct_a, const rcti *rct_b) |
| void | BLI_rctf_init (rctf *rect, float xmin, float xmax, float ymin, float ymax) |
| void | BLI_rcti_init (rcti *rect, int xmin, int xmax, int ymin, int ymax) |
| bool | BLI_rctf_is_valid (const rctf *rect) |
| bool | BLI_rcti_is_valid (const rcti *rect) |
| void | BLI_rctf_sanitize (rctf *rect) |
| void | BLI_rcti_sanitize (rcti *rect) |
| void | BLI_rctf_init_pt_radius (rctf *rect, const float xy[2], float size) |
| void | BLI_rcti_init_pt_radius (rcti *rect, const int xy[2], int size) |
| void | BLI_rcti_init_minmax (rcti *rect) |
| void | BLI_rctf_init_minmax (rctf *rect) |
| void | BLI_rcti_do_minmax_v (rcti *rect, const int xy[2]) |
| void | BLI_rcti_do_minmax_rcti (rcti *rect, const rcti *other) |
| void | BLI_rctf_do_minmax_v (rctf *rect, const float xy[2]) |
| void | BLI_rctf_transform_pt_v (const rctf *dst, const rctf *src, float xy_dst[2], const float xy_src[2]) |
| void | BLI_rctf_transform_calc_m4_pivot_min_ex (const rctf *dst, const rctf *src, float matrix[4][4], uint x, uint y) |
| void | BLI_rctf_transform_calc_m4_pivot_min (const rctf *dst, const rctf *src, float matrix[4][4]) |
| void | BLI_rctf_transform_calc_m3_pivot_min (const rctf *dst, const rctf *src, float matrix[3][3]) |
| void | BLI_rcti_translate (rcti *rect, int x, int y) |
| void | BLI_rctf_translate (rctf *rect, float x, float y) |
| void | BLI_rcti_mul (rcti *rect, const int factor) |
| void | BLI_rctf_mul (rctf *rect, const float factor) |
| void | BLI_rcti_recenter (rcti *rect, int x, int y) |
| void | BLI_rctf_recenter (rctf *rect, float x, float y) |
| void | BLI_rcti_resize_x (rcti *rect, int x) |
| void | BLI_rcti_resize_y (rcti *rect, int y) |
| void | BLI_rcti_resize (rcti *rect, int x, int y) |
| void | BLI_rcti_pad (rcti *rect, int pad_x, int pad_y) |
| void | BLI_rctf_pad (rctf *rect, float pad_x, float pad_y) |
| void | BLI_rctf_resize_x (rctf *rect, float x) |
| void | BLI_rctf_resize_y (rctf *rect, float y) |
| void | BLI_rctf_resize (rctf *rect, float x, float y) |
| void | BLI_rcti_scale (rcti *rect, const float scale) |
| void | BLI_rctf_scale (rctf *rect, const float scale) |
| void | BLI_rctf_pad_y (rctf *rect, const float boundary_size, const float pad_min, const float pad_max) |
| void | BLI_rctf_interp (rctf *rect, const rctf *rect_a, const rctf *rect_b, const float fac) |
| bool | BLI_rctf_clamp_pt_v (const rctf *rect, float xy[2]) |
| bool | BLI_rcti_clamp_pt_v (const rcti *rect, int xy[2]) |
| bool | BLI_rctf_clamp (rctf *rect, const rctf *rect_bounds, float r_xy[2]) |
| bool | BLI_rcti_clamp (rcti *rect, const rcti *rect_bounds, int r_xy[2]) |
| bool | BLI_rctf_compare (const rctf *rect_a, const rctf *rect_b, const float limit) |
| bool | BLI_rcti_compare (const rcti *rect_a, const rcti *rect_b) |
| bool | BLI_rctf_isect (const rctf *src1, const rctf *src2, rctf *dest) |
| bool | BLI_rcti_isect (const rcti *src1, const rcti *src2, rcti *dest) |
| bool | BLI_rctf_isect_rect_x (const rctf *src1, const rctf *src2, float range_x[2]) |
| bool | BLI_rctf_isect_rect_y (const rctf *src1, const rctf *src2, float range_y[2]) |
| bool | BLI_rcti_isect_rect_x (const rcti *src1, const rcti *src2, int range_x[2]) |
| bool | BLI_rcti_isect_rect_y (const rcti *src1, const rcti *src2, int range_y[2]) |
| void | BLI_rcti_rctf_copy (rcti *dst, const rctf *src) |
| void | BLI_rcti_rctf_copy_floor (rcti *dst, const rctf *src) |
| void | BLI_rcti_rctf_copy_round (rcti *dst, const rctf *src) |
| void | BLI_rctf_rcti_copy (rctf *dst, const rcti *src) |
| void | print_rctf (const char *str, const rctf *rect) |
| void | print_rcti (const char *str, const rcti *rect) |
Rect math functions | |
| #define | ROTATE_SINCOS(r_vec, mat2, vec) |
| void | BLI_rctf_rotate_expand (rctf *dst, const rctf *src, const float angle) |
| bool | BLI_rctf_clamp_segment (const rctf *rect, float s1[2], float s2[2]) |
A minimalist lib for functions doing stuff with rectangle structs.
Definition in file rct.cc.
| #define ROTATE_SINCOS | ( | r_vec, | |
| mat2, | |||
| vec ) |
Definition at line 1098 of file rct.cc.
Referenced by BLI_rctf_rotate_expand().
Definition at line 784 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 740 of file rct.cc.
References rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.
Definition at line 1131 of file rct.cc.
References BLI_rctf_isect_pt_v(), copy_v2_v2(), isect_seg_seg_v2_point(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 868 of file rct.cc.
References fabsf, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 510 of file rct.cc.
References rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.
Referenced by BKE_maskrasterize_handle_init(), blender::bke::pbvh::uv_islands::primitive_uv_bounds(), and blender::geometry::UVMinimumEnclosingSquareFinder::update().
Definition at line 404 of file rct.cc.
References BLI_rctf_sanitize(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BKE_curvemapping_set_defaults(), BKE_curveprofile_set_defaults(), clear_render_border_exec(), blender::ed::space_node::cursor_isect_multi_input_socket(), blender::ed::vse::displayed_channel_range_get(), draw_channel_names(), draw_display_buffer(), draw_movieclip_buffer(), draw_nla_track_list(), ED_region_image_metadata_draw(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_mouse_input_sample(), graph_draw_channel_names(), image_main_region_draw(), blender::eevee::Instance::init(), blender::ed::vse::label_rect_init(), layer_bucket_init_dummy(), blender::ed::space_node::node_draw_link_end_marker(), blender::ed::outliner::outliner_draw_active_indicator(), blender::ed::outliner::outliner_draw_highlights(), playanim_toscreen_ex(), blender::ed::vse::preview_get_full_texture_coord(), blender::ed::vse::preview_get_reference_texture_coord(), round_box__edges(), blender::ed::vse::sequencer_draw_scopes(), blender::seq::sequencer_image_crop_init(), ui_popup_translate(), UI_view2d_edge_pan_init(), UI_view2d_edge_pan_set_limits(), blender::image_engine::OneTexture::update_bounds(), blender::image_engine::ScreenTileTextures< Divisions >::update_bounds(), and widget_draw_submenu_tria().
| void BLI_rctf_init_minmax | ( | rctf * | rect | ) |
Definition at line 480 of file rct.cc.
References FLT_MAX, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BKE_maskrasterize_handle_init(), blender::ed::space_node::node_draw_nodetree(), blender::bke::pbvh::uv_islands::primitive_uv_bounds(), blender::ed::space_node::space_node_view_flag(), ui_block_bounds_calc(), ui_popup_block_position(), and blender::geometry::UVMinimumEnclosingSquareFinder::update().
Definition at line 458 of file rct.cc.
References size(), rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::draw_link_errors(), ED_imbuf_sample_draw(), blender::ed::space_node::find_bounds_by_zone_recursive(), and blender::ed::space_node::socket_is_occluded().
is rct_b inside rct_a
Definition at line 193 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::do_lasso_select_node(), blender::ed::space_node::node_box_select_exec(), blender::ed::space_node::node_find_exec_fn(), blender::ed::space_node::node_select_same_type_step_exec(), blender::ed::space_node::viewer_linking::position_viewer_node(), blender::ed::space_node::socket_is_occluded(), and ui_view2d_cur_ensure_rect_in_view().
Definition at line 729 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| bool BLI_rctf_is_empty | ( | const rctf * | rect | ) |
Definition at line 32 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| bool BLI_rctf_is_valid | ( | const rctf * | rect | ) |
Definition at line 424 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_sanitize().
Definition at line 898 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 351 of file rct.cc.
References rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.
Definition at line 115 of file rct.cc.
References x, rctf::xmax, y, and rctf::ymax.
Definition at line 132 of file rct.cc.
References rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_clamp_segment(), and BLI_rctf_isect_segment().
Definition at line 956 of file rct.cc.
References rctf::xmax, and rctf::xmin.
Definition at line 976 of file rct.cc.
References rctf::ymax, and rctf::ymin.
Definition at line 284 of file rct.cc.
References BLI_rctf_isect_pt_v(), isect_segments_fl(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 93 of file rct.cc.
References x, and rctf::xmax.
Referenced by ed_marker_box_select_exec(), ED_region_overlap_isect_x(), blender::ed::space_node::node_link_insert_offset_ntree(), and blender::ed::vse::retime_key_draw().
Definition at line 104 of file rct.cc.
References y, and rctf::ymax.
Referenced by ED_region_overlap_isect_y(), blender::ui::AbstractTreeView::find_hovered(), and blender::ed::space_node::node_link_insert_offset_ntree().
Definition at line 171 of file rct.cc.
References x, rctf::xmax, and rctf::xmin.
Referenced by blender::ed::space_node::find_visible_center_of_link(), blender::ed::space_node::node_link_dim_factor(), and blender::ed::vse::strip_to_frame_distance().
Definition at line 182 of file rct.cc.
References y, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::find_visible_center_of_link(), and blender::ed::space_node::node_link_dim_factor().
Definition at line 588 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BKE_camera_params_compute_viewplane(), blender::ed::space_node::node_to_updated_rect(), and vfont_to_curve().
Definition at line 637 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by drawscredge_area(), ED_screen_draw_edges(), blender::ed::space_node::find_bounds_by_zone_recursive(), blender::ed::space_node::find_visible_center_of_link(), blender::ed::space_node::node_circleselect_exec(), blender::ed::space_node::node_draw_extra_info_panel_back(), blender::ed::space_node::node_frame_rect_inside(), panel_draw_softshadow(), blender::ed::space_node::viewer_linking::position_viewer_node(), screen_draw_move_highlight(), blender::ed::vse::seq_view_collection_rect_preview(), blender::ed::vse::strip_clickable_areas_get(), UI_but_ensure_in_view(), ui_draw_dialog_alert(), and widget_softshadow().
| void BLI_rctf_pad_y | ( | rctf * | rect, |
| const float | boundary_size, | ||
| const float | pad_min, | ||
| const float | pad_max ) |
Definition at line 689 of file rct.cc.
References BLI_assert, BLI_rctf_size_y(), rctf::ymax, and rctf::ymin.
Referenced by add_region_padding(), graphkeys_viewall(), and blender::ed::vse::SEQ_add_timeline_region_padding().
Definition at line 1060 of file rct.cc.
References rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Definition at line 602 of file rct.cc.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_translate(), x, and y.
Referenced by blender::ed::space_node::gizmo_node_box_mask_prop_matrix_set(), blender::ed::space_node::gizmo_node_crop_prop_matrix_set(), gizmo_render_border_prop_matrix_set(), ui_pie_handler(), ui_popup_block_refresh(), and UI_view2d_center_set().
Definition at line 657 of file rct.cc.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::space_node::gizmo_node_box_mask_prop_matrix_set(), blender::ed::space_node::gizmo_node_crop_prop_matrix_set(), gizmo_render_border_prop_matrix_set(), blender::ed::vse::sequencer_view_zoom_ratio_exec(), and blender::ed::space_node::space_node_view_flag().
Definition at line 645 of file rct.cc.
References BLI_rctf_cent_x(), x, rctf::xmax, and rctf::xmin.
Definition at line 651 of file rct.cc.
References BLI_rctf_cent_y(), y, rctf::ymax, and rctf::ymin.
Referenced by graphkeys_viewall().
Expand the rectangle to fit a rotated src.
Definition at line 1105 of file rct.cc.
References angle(), BLI_rctf_cent_x(), BLI_rctf_cent_y(), cosf, fabsf, ROTATE_SINCOS, sinf, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void BLI_rctf_sanitize | ( | struct rctf * | rect | ) |
Ensure X-min and Y-min are less than or equal to X-max and Y-max, respectively.
Definition at line 434 of file rct.cc.
References BLI_assert, BLI_rctf_is_valid(), SWAP, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_init(), and gizmo_cage2d_test_select().
Definition at line 677 of file rct.cc.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_size_x(), BLI_rctf_size_y(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by add_region_padding(), image_view_selected_exec(), blender::ed::vse::seq_view_collection_rect_preview(), blender::ed::space_node::space_node_view_flag(), blender::ed::vse::view_frame_preview_scope(), and widget_draw_submenu_tria().
| void BLI_rctf_transform_calc_m3_pivot_min | ( | const rctf * | dst, |
| const rctf * | src, | ||
| float | matrix[3][3] ) |
Definition at line 556 of file rct.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), unit_m3(), rctf::xmin, and rctf::ymin.
| void BLI_rctf_transform_calc_m4_pivot_min | ( | const rctf * | dst, |
| const rctf * | src, | ||
| float | matrix[4][4] ) |
Definition at line 551 of file rct.cc.
References BLI_rctf_transform_calc_m4_pivot_min_ex().
Referenced by DRWContext::acquire_data(), DRW_text_cache_draw(), and UI_view2d_view_to_region_m4().
| void BLI_rctf_transform_calc_m4_pivot_min_ex | ( | const rctf * | dst, |
| const rctf * | src, | ||
| float | matrix[4][4], | ||
| uint | x, | ||
| uint | y ) |
Calculate a 4x4 matrix representing the transformation between two rectangles.
Definition at line 538 of file rct.cc.
References BLI_assert, BLI_rctf_size_x(), BLI_rctf_size_y(), unit_m4(), x, rctf::xmin, y, and rctf::ymin.
Referenced by BLI_rctf_transform_calc_m4_pivot_min().
| void BLI_rctf_transform_pt_v | ( | const rctf * | dst, |
| const rctf * | src, | ||
| float | xy_dst[2], | ||
| const float | xy_src[2] ) |
Given 2 rectangles, transform a point from one to another.
Definition at line 526 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blender::ed::transform::flushTransNodes(), keyframe_region_circle_test(), keyframe_region_lasso_test(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), blender::ed::transform::view2d_edge_pan_loc_compensate(), and view_zoom_to_window_xy_camera().
Definition at line 573 of file rct.cc.
References x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_recenter(), blender::ed::outliner::outliner_restore_scrolling_position(), UI_block_translate(), ui_popup_block_position(), ui_popup_translate(), ui_searchbox_region_layout_fn(), ui_update_flexible_spacing(), UI_view2d_view_ortho(), and view_zoom_to_window_xy_camera().
Definition at line 372 of file rct.cc.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 826 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| bool BLI_rcti_clamp_pt_v | ( | const rcti * | rect, |
| int | xy[2] ) |
Definition at line 762 of file rct.cc.
References rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.
Definition at line 883 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Definition at line 502 of file rct.cc.
References max_ii(), min_ii(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| void BLI_rcti_do_minmax_v | ( | rcti * | rect, |
| const int | xy[2] ) |
Definition at line 486 of file rct.cc.
References rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.
Referenced by ED_screen_draw_edges(), blender::bke::pbvh::pixels::get_bounds(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::bke::pbvh::pixels::UDIMTilePixels::mark_dirty(), paint_convert_bb_to_rect(), and blender::bke::pbvh::pixels::NodeData::rebuild_undo_regions().
| void BLI_rcti_init | ( | rcti * | rect, |
| int | xmin, | ||
| int | xmax, | ||
| int | ymin, | ||
| int | ymax ) |
Definition at line 414 of file rct.cc.
References BLI_rcti_sanitize(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by area_azone_init(), blender::bke::image::partial_update::BKE_image_partial_update_collect_changes(), BKE_image_update_gputexture_delayed(), blender::bke::pbvh::pixels::clamp(), blender::ed::transform::create_trans_seq_clamp_data(), blender::ed::space_node::draw_nodespace_back_pix(), blender::ed::spreadsheet::draw_spreadsheet_in_region(), DRW_render_gpencil(), DRW_render_to_image(), ED_image_draw_info(), ED_imapaint_dirty_region(), file_tile_boundbox(), blender::bke::pbvh::pixels::Rows::find_copy_source(), find_file_mouse_rect(), blender::bke::pbvh::pixels::Rows::find_second_source(), fullscreen_azone_init(), fullscreen_click_rcti_init(), graph_main_region_draw_overlay(), graph_region_draw(), hud_region_hide(), image_gpu_texture_partial_update_changes_available(), image_main_region_draw(), image_paint_partial_redraw_expand(), IMB_display_buffer_acquire(), IMB_float_from_byte(), IMB_partial_display_buffer_update_delayed(), blender::eevee::Film::init(), blender::eevee::Instance::init(), ViewportColorSampleSession::init(), blender::ed::vse::load_data_init_from_operator(), RE_GetViewPlane(), region_azone_edge(), region_azone_tab_plus(), region_draw_azones(), region_rect_recursive(), region_update_rect(), screen_global_statusbar_area_refresh(), screen_global_topbar_area_refresh(), blender::eevee::Camera::sync(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::ed::sculpt_paint::greasepencil::trim_stroke_ends(), blender::image_engine::OneTexture::update_bounds(), and WM_window_rect_calc().
| void BLI_rcti_init_minmax | ( | rcti * | rect | ) |
Definition at line 474 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by button_section_bounds_calc(), blender::bke::pbvh::pixels::UDIMTilePixels::clear_dirty(), ED_imapaint_clear_partial_redraw(), ED_screen_draw_edges(), blender::bke::pbvh::pixels::get_bounds(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), paint_convert_bb_to_rect(), partial_redraw_single_init(), blender::bke::pbvh::pixels::NodeData::rebuild_undo_regions(), blender::bke::pbvh::pixels::UDIMTilePixels::UDIMTilePixels(), and ViewLink::views_bounds_calc().
| void BLI_rcti_init_pt_radius | ( | rcti * | rect, |
| const int | xy[2], | ||
| int | size ) |
Definition at line 466 of file rct.cc.
References size(), rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.
Referenced by DRW_select_buffer_find_nearest_to_point(), ed_armature_pick_bone_impl(), ed_mball_findnearest_metaelem(), ED_region_contains_xy(), get_nearest_editbonepoint(), gizmo_find_intersected_3d_intern(), mixed_bones_object_selectbuffer(), view3d_gpu_select_ex(), and view_autodist_depth_margin().
Definition at line 198 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blf_glyph_draw(), blender::ed::vse::rcti_in_lasso(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), blender::bke::image::partial_update::TEST_F(), and ui_tooltip_create_with_data().
| bool BLI_rcti_is_empty | ( | const rcti * | rect | ) |
Definition at line 27 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| bool BLI_rcti_is_valid | ( | const rcti * | rect | ) |
Definition at line 429 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by BLI_rcti_sanitize().
Definition at line 927 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Definition at line 330 of file rct.cc.
References rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.
| bool BLI_rcti_isect_pt | ( | const rcti * | rect, |
| const int | x, | ||
| const int | y ) |
Definition at line 59 of file rct.cc.
References x, rcti::xmax, y, and rcti::ymax.
| bool BLI_rcti_isect_pt_v | ( | const rcti * | rect, |
| const int | xy[2] ) |
Definition at line 76 of file rct.cc.
References rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.
Referenced by BLI_rcti_isect_segment().
Definition at line 996 of file rct.cc.
References rcti::xmax, and rcti::xmin.
Definition at line 1016 of file rct.cc.
References rcti::ymax, and rcti::ymin.
| bool BLI_rcti_isect_segment | ( | const rcti * | rect, |
| const int | s1[2], | ||
| const int | s2[2] ) |
Definition at line 238 of file rct.cc.
References BLI_rcti_isect_pt_v(), isect_segments_i(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| bool BLI_rcti_isect_x | ( | const rcti * | rect, |
| const int | x ) |
Definition at line 37 of file rct.cc.
References x, and rcti::xmax.
Referenced by UI_region_button_sections_is_inside_x().
| bool BLI_rcti_isect_y | ( | const rcti * | rect, |
| const int | y ) |
Definition at line 48 of file rct.cc.
References y, and rcti::ymax.
| int BLI_rcti_length_x | ( | const rcti * | rect, |
| int | x ) |
Definition at line 149 of file rct.cc.
References x, rcti::xmax, and rcti::xmin.
Referenced by area_actionzone_refresh_xy(), and file_box_select_find_last_selected().
| int BLI_rcti_length_y | ( | const rcti * | rect, |
| int | y ) |
Definition at line 160 of file rct.cc.
References y, rcti::ymax, and rcti::ymin.
Referenced by area_actionzone_refresh_xy(), and file_box_select_find_last_selected().
| void BLI_rcti_mul | ( | rcti * | rect, |
| const int | factor ) |
Definition at line 581 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| void BLI_rcti_pad | ( | rcti * | rect, |
| int | pad_x, | ||
| int | pad_y ) |
Definition at line 629 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by button_section_bounds_calc(), blender::seq::draw_text_outline(), blender::seq::draw_text_shadow(), file_add_preview_drag_but(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), ui_draw_but(), UI_region_view_find_at(), ui_tooltip_create_with_data(), UI_view2d_edge_pan_apply(), and uiTemplateInputStatusBorder().
Definition at line 1036 of file rct.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), floorf, rcti::xmax, rctf::xmin, rcti::xmin, rcti::ymax, rctf::ymin, and rcti::ymin.
Definition at line 1044 of file rct.cc.
References floorf, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Definition at line 1052 of file rct.cc.
References floorf, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
| void BLI_rcti_recenter | ( | rcti * | rect, |
| int | x, | ||
| int | y ) |
Definition at line 596 of file rct.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_translate(), x, and y.
| void BLI_rcti_resize | ( | rcti * | rect, |
| int | x, | ||
| int | y ) |
Definition at line 621 of file rct.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by region_rect_recursive(), and widget_optionbut().
| void BLI_rcti_resize_x | ( | struct rcti * | rect, |
| int | x ) |
Change width & height around the central X location.
Definition at line 609 of file rct.cc.
References BLI_rcti_cent_x(), x, rcti::xmax, and rcti::xmin.
Referenced by view3d_zoom_border_exec(), widget_list_itembut(), and wm_window_check_size().
| void BLI_rcti_resize_y | ( | struct rcti * | rect, |
| int | y ) |
Change width & height around the central Y location.
Definition at line 615 of file rct.cc.
References BLI_rcti_cent_y(), y, rcti::ymax, and rcti::ymin.
Referenced by view3d_zoom_border_exec(), widget_list_itembut(), and wm_window_check_size().
| void BLI_rcti_sanitize | ( | rcti * | rect | ) |
Definition at line 446 of file rct.cc.
References BLI_assert, BLI_rcti_is_valid(), SWAP, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by BLI_rcti_init(), GPU_viewport_draw_to_screen_ex(), and region_rect_recursive().
Definition at line 665 of file rct.cc.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| void BLI_rcti_translate | ( | rcti * | rect, |
| int | x, | ||
| int | y ) |
Definition at line 566 of file rct.cc.
References x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by area_actionzone_get_rect(), blf_glyph_draw(), BLI_rcti_recenter(), draw_filled_lasso(), blender::seq::draw_text_shadow(), ED_view3d_calc_render_border(), region_overlap_fix(), region_visible_rect_calc(), ui_but_pixelrect_in_view(), ui_popup_translate(), ui_region_winrct_get_no_margin(), ui_searchbox_region_layout_fn(), ui_to_pixelrect(), ui_tooltip_create_with_data(), UI_view2d_rect_in_scrollers_ex(), widget_optionbut(), WM_event_handler_region_v2d_mask_poll(), WM_gesture_box_modal(), WM_gesture_straightline_modal(), and WM_gesture_straightline_oneshot_modal().
Definition at line 388 of file rct.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
|
static |
| void print_rctf | ( | const char * | str, |
| const rctf * | rect ) |
Definition at line 1068 of file rct.cc.
References BLI_rctf_size_x(), BLI_rctf_size_y(), printf, str, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void print_rcti | ( | const char * | str, |
| const rcti * | rect ) |
Definition at line 1080 of file rct.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), printf, str, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.