|
Blender
V2.93
|
#include <math.h>#include <stdio.h>#include <stdlib.h>#include <float.h>#include <limits.h>#include "BLI_rect.h"#include "BLI_utildefines.h"#include "DNA_vec_types.h"Go to the source code of this file.
Functions | |
| static void | unit_m4 (float m[4][4]) |
| 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 *rct1, const rctf *rct2) |
| void | BLI_rcti_union (rcti *rct1, const rcti *rct2) |
| 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_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_rcti_translate (rcti *rect, int x, int y) |
| void | BLI_rctf_translate (rctf *rect, float x, float y) |
| 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) |
A minimalist lib for functions doing stuff with rectangle structs.
Definition in file rct.c.
| #define ROTATE_SINCOS | ( | r_vec, | |
| mat2, | |||
| vec | |||
| ) |
Clamp rect within rect_bounds, setting r_xy to the offset.
Keeps the top left corner within the bounds, which for user interface elements is typically where the most important information is.
Definition at line 788 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 736 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 872 of file rct.c.
References fabsf, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 544 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BKE_maskrasterize_handle_init().
Definition at line 436 of file rct.c.
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(), draw_channel_names(), draw_display_buffer(), draw_image_main(), draw_movieclip_buffer(), draw_nla_channel_list(), drawscredge_area_draw(), ED_region_image_metadata_draw(), gpencil_zoom_level_set(), graph_draw_channel_names(), image_main_region_draw(), layer_bucket_init_dummy(), round_box__edges(), sequencer_draw_display_buffer(), sequencer_preview_get_rect(), ui_popup_translate(), and widget_draw_submenu_tria().
| void BLI_rctf_init_minmax | ( | rctf * | rect | ) |
Definition at line 522 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BKE_maskrasterize_handle_init(), node_draw_nodetree(), space_node_view_flag(), ui_block_bounds_calc(), and ui_popup_block_position().
Definition at line 500 of file rct.c.
References size(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ED_imbuf_sample_draw(), and node_find_indicated_socket().
is rct_b inside rct_a
Definition at line 221 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by blf_glyph_render(), and node_box_select_exec().
Definition at line 725 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| bool BLI_rctf_is_empty | ( | const rctf * | rect | ) |
Definition at line 53 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| bool BLI_rctf_is_valid | ( | const rctf * | rect | ) |
Check if X-min and Y-min are less than or equal to X-max and Y-max, respectively. If this returns false, BLI_rctf_sanitize() can be called to address this.
This is not a hard constraint or invariant for rectangles, in some cases it may be useful to have max < min. Usually this is what you'd want though.
Definition at line 463 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_sanitize().
Definition at line 902 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 383 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 136 of file rct.c.
References x, rctf::xmax, y, and rctf::ymax.
Definition at line 153 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_isect_segment().
Definition at line 960 of file rct.c.
References rctf::xmax, and rctf::xmin.
Definition at line 980 of file rct.c.
References rctf::ymax, and rctf::ymin.
Definition at line 316 of file rct.c.
References BLI_rctf_isect_pt_v(), isect_segments_fl(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 114 of file rct.c.
References x, and rctf::xmax.
Referenced by ed_marker_box_select_exec(), ED_region_overlap_isect_x(), and node_link_insert_offset_ntree().
Definition at line 125 of file rct.c.
References y, and rctf::ymax.
Referenced by ED_region_overlap_isect_y(), and node_link_insert_offset_ntree().
Definition at line 196 of file rct.c.
References x, rctf::xmax, and rctf::xmin.
Definition at line 207 of file rct.c.
References y, rctf::ymax, and rctf::ymin.
Definition at line 654 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ED_uvedit_pack_islands_multi().
| void BLI_rctf_pad_y | ( | rctf * | rect, |
| const float | boundary_size, | ||
| const float | pad_min, | ||
| const float | pad_max | ||
| ) |
Definition at line 706 of file rct.c.
References BLI_assert, BLI_rctf_size_y(), rctf::ymax, and rctf::ymin.
Referenced by graphkeys_viewall().
Definition at line 1064 of file rct.c.
References rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Definition at line 618 of file rct.c.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), BLI_rctf_translate(), x, and y.
Referenced by 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 674 of file rct.c.
References BLI_rctf_cent_x(), BLI_rctf_cent_y(), x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by gizmo_node_crop_prop_matrix_set(), gizmo_render_border_prop_matrix_set(), sequencer_view_zoom_ratio_exec(), and space_node_view_flag().
Definition at line 662 of file rct.c.
References BLI_rctf_cent_x(), x, rctf::xmax, and rctf::xmin.
Definition at line 668 of file rct.c.
References BLI_rctf_cent_y(), y, rctf::ymax, and rctf::ymin.
Expand the rectangle to fit a rotated src.
Definition at line 1112 of file rct.c.
References angle(), BLI_rctf_cent_x(), BLI_rctf_cent_y(), cosf, fabsf, MAX2, ROTATE_SINCOS, sinf, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void BLI_rctf_sanitize | ( | rctf * | rect | ) |
Ensure X-min and Y-min are less than or equal to X-max and Y-max, respectively.
Definition at line 476 of file rct.c.
References BLI_assert, BLI_rctf_is_valid(), SWAP, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by BLI_rctf_init().
Definition at line 694 of file rct.c.
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 graphkeys_viewall(), image_view_selected_exec(), panel_draw_aligned_widgets(), space_node_view_flag(), and widget_draw_submenu_tria().
| void BLI_rctf_transform_calc_m4_pivot_min | ( | const rctf * | dst, |
| const rctf * | src, | ||
| float | matrix[4][4] | ||
| ) |
Definition at line 592 of file rct.c.
References BLI_rctf_transform_calc_m4_pivot_min_ex().
Referenced by DRW_text_cache_draw(), drw_viewport_var_init(), 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 579 of file rct.c.
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] | ||
| ) |
Definition at line 561 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by keyframe_region_circle_test(), keyframe_region_lasso_test(), ui_do_but_CURVE(), ui_do_but_CURVEPROFILE(), and view_zoom_to_window_xy_camera().
Definition at line 604 of file rct.c.
References x, rctf::xmax, rctf::xmin, y, rctf::ymax, and rctf::ymin.
Referenced by blf_glyph_render(), BLI_rctf_recenter(), outliner_restore_scrolling_position(), UI_block_translate(), ui_popup_block_position(), ui_popup_translate(), ui_searchbox_create_generic(), ui_update_flexible_spacing(), UI_view2d_view_ortho(), and view_zoom_to_window_xy_camera().
Definition at line 404 of file rct.c.
References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Definition at line 830 of file rct.c.
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 758 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Definition at line 887 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| void BLI_rcti_do_minmax_v | ( | rcti * | rect, |
| const int | xy[2] | ||
| ) |
Definition at line 528 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::calc_ray_shift(), ED_screen_draw_edges(), and paint_convert_bb_to_rect().
| void BLI_rcti_init | ( | rcti * | rect, |
| int | xmin, | ||
| int | xmax, | ||
| int | ymin, | ||
| int | ymax | ||
| ) |
Definition at line 446 of file rct.c.
References BLI_rcti_sanitize(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by area_azone_init(), blender::compositor::NodeOperation::determineDependingAreaOfInterest(), blender::compositor::ProjectorLensDistortionOperation::determineDependingAreaOfInterest(), blender::compositor::ReadBufferOperation::determineDependingAreaOfInterest(), blender::compositor::ExecutionGroup::determineResolution(), draw_nodespace_back_pix(), blender::ed::spreadsheet::draw_spreadsheet_in_region(), draw_timeline_seq(), DRW_render_gpencil(), DRW_render_to_image(), ED_image_draw_info(), blender::compositor::ExecutionGroup::ExecutionGroup(), file_tile_boundbox(), find_file_mouse_rect(), fullscreen_azone_init(), fullscreen_click_rcti_init(), blender::compositor::GlareFogGlowOperation::generateGlare(), graph_main_region_draw_overlay(), graph_region_draw(), hud_region_hide(), IMB_display_buffer_acquire(), IMB_partial_display_buffer_update_delayed(), RE_GetViewPlane(), region_azone_edge(), region_azone_scrollbar_init(), region_azone_tab_plus(), region_draw_azones(), region_rect_recursive(), region_update_rect(), screen_global_statusbar_area_refresh(), screen_global_topbar_area_refresh(), blender::compositor::ExecutionGroup::setRenderBorder(), blender::compositor::ExecutionGroup::setViewerBorder(), and WM_window_rect_calc().
| void BLI_rcti_init_minmax | ( | rcti * | rect | ) |
Definition at line 516 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::ScreenLensDistortionOperation::determineDependingAreaOfInterest(), ED_screen_draw_edges(), and paint_convert_bb_to_rect().
| void BLI_rcti_init_pt_radius | ( | rcti * | rect, |
| const int | xy[2], | ||
| int | size | ||
| ) |
Definition at line 508 of file rct.c.
References size(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by DRW_select_buffer_find_nearest_to_point(), ed_armature_pick_bone_impl(), ED_mball_select_pick(), ED_region_contains_xy(), get_nearest_editbonepoint(), gizmo_find_intersected_3d_intern(), mixed_bones_object_selectbuffer(), view3d_opengl_select(), and view_autodist_depth_margin().
Definition at line 226 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_tooltip_create_with_data().
| bool BLI_rcti_is_empty | ( | const rcti * | rect | ) |
Determine if a rect is empty. An empty rect is one with a zero (or negative) width or height.
Definition at line 48 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| bool BLI_rcti_is_valid | ( | const rcti * | rect | ) |
Definition at line 468 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by BLI_rcti_sanitize().
Definition at line 931 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Definition at line 362 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
| bool BLI_rcti_isect_pt | ( | const rcti * | rect, |
| const int | x, | ||
| const int | y | ||
| ) |
Definition at line 80 of file rct.c.
References x, rcti::xmax, y, and rcti::ymax.
| bool BLI_rcti_isect_pt_v | ( | const rcti * | rect, |
| const int | xy[2] | ||
| ) |
Definition at line 97 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by BLI_rcti_isect_segment().
Definition at line 1000 of file rct.c.
References rcti::xmax, and rcti::xmin.
Definition at line 1020 of file rct.c.
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 270 of file rct.c.
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 58 of file rct.c.
References x, and rcti::xmax.
| bool BLI_rcti_isect_y | ( | const rcti * | rect, |
| const int | y | ||
| ) |
Definition at line 69 of file rct.c.
References y, and rcti::ymax.
| int BLI_rcti_length_x | ( | const rcti * | rect, |
| const int | x | ||
| ) |
Definition at line 174 of file rct.c.
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, |
| const int | y | ||
| ) |
Definition at line 185 of file rct.c.
References y, rcti::ymax, and rcti::ymin.
Referenced by area_actionzone_refresh_xy(), and file_box_select_find_last_selected().
| void BLI_rcti_pad | ( | rcti * | rect, |
| int | pad_x, | ||
| int | pad_y | ||
| ) |
Definition at line 646 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by view_edge_pan_modal().
Definition at line 1040 of file rct.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), floorf, rcti::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rcti::ymin, and rctf::ymin.
Definition at line 1048 of file rct.c.
References floorf, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Definition at line 1056 of file rct.c.
References floorf, rcti::xmax, rctf::xmax, rcti::xmin, rctf::xmin, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
| void BLI_rcti_recenter | ( | rcti * | rect, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 612 of file rct.c.
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 638 of file rct.c.
References BLI_rcti_cent_x(), BLI_rcti_cent_y(), x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by ED_node_socket_draw(), region_rect_recursive(), ui_tooltip_create_with_data(), and widget_optionbut().
| void BLI_rcti_resize_x | ( | rcti * | rect, |
| int | x | ||
| ) |
Definition at line 626 of file rct.c.
References BLI_rcti_cent_x(), x, rcti::xmax, and rcti::xmin.
Referenced by view3d_zoom_border_exec(), and wm_window_check_size().
| void BLI_rcti_resize_y | ( | rcti * | rect, |
| int | y | ||
| ) |
Definition at line 632 of file rct.c.
References BLI_rcti_cent_y(), y, rcti::ymax, and rcti::ymin.
Referenced by view3d_zoom_border_exec(), and wm_window_check_size().
| void BLI_rcti_sanitize | ( | rcti * | rect | ) |
Definition at line 488 of file rct.c.
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 682 of file rct.c.
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 597 of file rct.c.
References x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by BLI_rcti_recenter(), draw_filled_lasso(), ED_view3d_calc_render_border(), get_part_from_result(), handler_region_v2d_mask_test(), region_azone_scrollbar_init(), region_overlap_fix(), region_visible_rect_calc(), ui_but_to_pixelrect(), ui_popup_translate(), ui_region_winrct_get_no_margin(), ui_searchbox_create_generic(), ui_tooltip_create_with_data(), UI_view2d_rect_in_scrollers_ex(), widget_optionbut(), WM_gesture_box_modal(), WM_gesture_straightline_modal(), and WM_gesture_straightline_oneshot_modal().
Definition at line 420 of file rct.c.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
|
static |
| void print_rctf | ( | const char * | str, |
| const rctf * | rect | ||
| ) |
Definition at line 1072 of file rct.c.
References BLI_rctf_size_x(), BLI_rctf_size_y(), str, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
| void print_rcti | ( | const char * | str, |
| const rcti * | rect | ||
| ) |
Definition at line 1084 of file rct.c.
References BLI_rcti_size_x(), BLI_rcti_size_y(), str, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
|
static |
Definition at line 1140 of file rct.c.
Referenced by BLI_rctf_transform_calc_m4_pivot_min_ex().