Blender V5.0
rct.cc File Reference
#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])

Detailed Description

A minimalist lib for functions doing stuff with rectangle structs.

Definition in file rct.cc.

Macro Definition Documentation

◆ ROTATE_SINCOS

#define ROTATE_SINCOS ( r_vec,
mat2,
vec )
Value:
{ \
(r_vec)[0] = (mat2)[1] * (vec)[0] + (+(mat2)[0]) * (vec)[1]; \
(r_vec)[1] = (mat2)[0] * (vec)[0] + (-(mat2)[1]) * (vec)[1]; \
} \
((void)0)

Definition at line 1098 of file rct.cc.

Referenced by BLI_rctf_rotate_expand().

Function Documentation

◆ BLI_rctf_clamp()

bool BLI_rctf_clamp ( rctf * rect,
const rctf * rect_bounds,
float r_xy[2] )

Definition at line 784 of file rct.cc.

References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

◆ BLI_rctf_clamp_pt_v()

bool BLI_rctf_clamp_pt_v ( const rctf * rect,
float xy[2] )

Definition at line 740 of file rct.cc.

References rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.

◆ BLI_rctf_clamp_segment()

bool BLI_rctf_clamp_segment ( const rctf * rect,
float s1[2],
float s2[2] )

◆ BLI_rctf_compare()

bool BLI_rctf_compare ( const rctf * rect_a,
const rctf * rect_b,
const float limit )

Definition at line 868 of file rct.cc.

References fabsf, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

◆ BLI_rctf_do_minmax_v()

◆ BLI_rctf_init()

◆ BLI_rctf_init_minmax()

◆ BLI_rctf_init_pt_radius()

◆ BLI_rctf_inside_rctf()

◆ BLI_rctf_interp()

void BLI_rctf_interp ( rctf * rect,
const rctf * rect_a,
const rctf * rect_b,
const float fac )

Definition at line 729 of file rct.cc.

References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

◆ BLI_rctf_is_empty()

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.

◆ BLI_rctf_is_valid()

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().

◆ BLI_rctf_isect()

bool BLI_rctf_isect ( const rctf * src1,
const rctf * src2,
rctf * dest )

Definition at line 898 of file rct.cc.

References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

◆ BLI_rctf_isect_circle()

bool BLI_rctf_isect_circle ( const rctf * rect,
const float xy[2],
const float radius )

Definition at line 351 of file rct.cc.

References rctf::xmax, rctf::xmin, xy, rctf::ymax, and rctf::ymin.

◆ BLI_rctf_isect_pt()

bool BLI_rctf_isect_pt ( const rctf * rect,
const float x,
const float y )

Definition at line 115 of file rct.cc.

References x, rctf::xmax, y, and rctf::ymax.

◆ BLI_rctf_isect_pt_v()

bool BLI_rctf_isect_pt_v ( const rctf * rect,
const float xy[2] )

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().

◆ BLI_rctf_isect_rect_x()

bool BLI_rctf_isect_rect_x ( const rctf * src1,
const rctf * src2,
float range_x[2] )

Definition at line 956 of file rct.cc.

References rctf::xmax, and rctf::xmin.

◆ BLI_rctf_isect_rect_y()

bool BLI_rctf_isect_rect_y ( const rctf * src1,
const rctf * src2,
float range_y[2] )

Definition at line 976 of file rct.cc.

References rctf::ymax, and rctf::ymin.

◆ BLI_rctf_isect_segment()

bool BLI_rctf_isect_segment ( const rctf * rect,
const float s1[2],
const float s2[2] )

◆ BLI_rctf_isect_x()

bool BLI_rctf_isect_x ( const rctf * rect,
const float x )

◆ BLI_rctf_isect_y()

bool BLI_rctf_isect_y ( const rctf * rect,
const float y )

◆ BLI_rctf_length_x()

◆ BLI_rctf_length_y()

float BLI_rctf_length_y ( const rctf * rect,
const float y )

◆ BLI_rctf_mul()

void BLI_rctf_mul ( rctf * rect,
const float factor )

◆ BLI_rctf_pad()

◆ BLI_rctf_pad_y()

void BLI_rctf_pad_y ( rctf * rect,
const float boundary_size,
const float pad_min,
const float pad_max )

◆ BLI_rctf_rcti_copy()

void BLI_rctf_rcti_copy ( rctf * dst,
const rcti * src )

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.

◆ BLI_rctf_recenter()

◆ BLI_rctf_resize()

◆ BLI_rctf_resize_x()

void BLI_rctf_resize_x ( rctf * rect,
float x )

Definition at line 645 of file rct.cc.

References BLI_rctf_cent_x(), x, rctf::xmax, and rctf::xmin.

◆ BLI_rctf_resize_y()

void BLI_rctf_resize_y ( rctf * rect,
float y )

Definition at line 651 of file rct.cc.

References BLI_rctf_cent_y(), y, rctf::ymax, and rctf::ymin.

Referenced by graphkeys_viewall().

◆ BLI_rctf_rotate_expand()

void BLI_rctf_rotate_expand ( rctf * dst,
const rctf * src,
float angle )

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.

◆ BLI_rctf_sanitize()

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().

◆ BLI_rctf_scale()

◆ BLI_rctf_transform_calc_m3_pivot_min()

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.

◆ BLI_rctf_transform_calc_m4_pivot_min()

void BLI_rctf_transform_calc_m4_pivot_min ( const rctf * dst,
const rctf * src,
float matrix[4][4] )

◆ BLI_rctf_transform_calc_m4_pivot_min_ex()

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.

Note
Multiplying a vector by this matrix does not give the same value as BLI_rctf_transform_pt_v.

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().

◆ BLI_rctf_transform_pt_v()

void BLI_rctf_transform_pt_v ( const rctf * dst,
const rctf * src,
float xy_dst[2],
const float xy_src[2] )

◆ BLI_rctf_translate()

◆ BLI_rctf_union()

void BLI_rctf_union ( rctf * rct_a,
const rctf * rct_b )

Definition at line 372 of file rct.cc.

References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

◆ BLI_rcti_clamp()

bool BLI_rcti_clamp ( rcti * rect,
const rcti * rect_bounds,
int r_xy[2] )

Definition at line 826 of file rct.cc.

References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

◆ BLI_rcti_clamp_pt_v()

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.

◆ BLI_rcti_compare()

bool BLI_rcti_compare ( const rcti * rect_a,
const rcti * rect_b )

Definition at line 883 of file rct.cc.

References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

◆ BLI_rcti_do_minmax_rcti()

void BLI_rcti_do_minmax_rcti ( rcti * rect,
const rcti * other )

Definition at line 502 of file rct.cc.

References max_ii(), min_ii(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

◆ BLI_rcti_do_minmax_v()

◆ BLI_rcti_init()

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().

◆ BLI_rcti_init_minmax()

◆ BLI_rcti_init_pt_radius()

◆ BLI_rcti_inside_rcti()

◆ BLI_rcti_is_empty()

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.

◆ BLI_rcti_is_valid()

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().

◆ BLI_rcti_isect()

bool BLI_rcti_isect ( const rcti * src1,
const rcti * src2,
rcti * dest )

Definition at line 927 of file rct.cc.

References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

◆ BLI_rcti_isect_circle()

bool BLI_rcti_isect_circle ( const rcti * rect,
const float xy[2],
const float radius )

Definition at line 330 of file rct.cc.

References rcti::xmax, rcti::xmin, xy, rcti::ymax, and rcti::ymin.

◆ BLI_rcti_isect_pt()

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.

◆ BLI_rcti_isect_pt_v()

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().

◆ BLI_rcti_isect_rect_x()

bool BLI_rcti_isect_rect_x ( const rcti * src1,
const rcti * src2,
int range_x[2] )

Definition at line 996 of file rct.cc.

References rcti::xmax, and rcti::xmin.

◆ BLI_rcti_isect_rect_y()

bool BLI_rcti_isect_rect_y ( const rcti * src1,
const rcti * src2,
int range_y[2] )

Definition at line 1016 of file rct.cc.

References rcti::ymax, and rcti::ymin.

◆ BLI_rcti_isect_segment()

bool BLI_rcti_isect_segment ( const rcti * rect,
const int s1[2],
const int s2[2] )

◆ BLI_rcti_isect_x()

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().

◆ BLI_rcti_isect_y()

bool BLI_rcti_isect_y ( const rcti * rect,
const int y )

Definition at line 48 of file rct.cc.

References y, and rcti::ymax.

◆ BLI_rcti_length_x()

int BLI_rcti_length_x ( const rcti * rect,
int x )
Returns
shortest distance from rect to x (0 if inside)

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().

◆ BLI_rcti_length_y()

int BLI_rcti_length_y ( const rcti * rect,
int y )
Returns
shortest distance from rect to y (0 if inside)

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().

◆ BLI_rcti_mul()

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.

◆ BLI_rcti_pad()

◆ BLI_rcti_rctf_copy()

void BLI_rcti_rctf_copy ( rcti * dst,
const rctf * src )

◆ BLI_rcti_rctf_copy_floor()

void BLI_rcti_rctf_copy_floor ( rcti * dst,
const rctf * src )

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.

◆ BLI_rcti_rctf_copy_round()

void BLI_rcti_rctf_copy_round ( rcti * dst,
const rctf * src )

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.

◆ BLI_rcti_recenter()

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.

◆ BLI_rcti_resize()

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().

◆ BLI_rcti_resize_x()

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().

◆ BLI_rcti_resize_y()

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().

◆ BLI_rcti_sanitize()

void BLI_rcti_sanitize ( rcti * rect)

◆ BLI_rcti_scale()

void BLI_rcti_scale ( rcti * rect,
const float scale )

◆ BLI_rcti_translate()

◆ BLI_rcti_union()

void BLI_rcti_union ( rcti * rct_a,
const rcti * rct_b )

Definition at line 388 of file rct.cc.

References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

◆ isect_segments_fl()

int isect_segments_fl ( const float v1[2],
const float v2[2],
const float v3[2],
const float v4[2] )
static

Definition at line 220 of file rct.cc.

References v2.

Referenced by BLI_rctf_isect_segment().

◆ isect_segments_i()

int isect_segments_i ( const int v1[2],
const int v2[2],
const int v3[2],
const int v4[2] )
static

Definition at line 206 of file rct.cc.

References v2.

Referenced by BLI_rcti_isect_segment().

◆ print_rctf()

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.

◆ print_rcti()

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.