Euphoria
eu::Recti Struct Reference

#include <rect.h>

Public Member Functions

 Recti ()
 
void translate (int dx, int dy)
 
void scale (int dx, int dy)
 
void inset (int dx, int dy)
 
void inset (int l, int r, int t, int b)
 
void expand (int expand)
 
void include (const Recti &o)
 
void extend (int dx, int dy)
 
void set_empty ()
 
Recti center_inside_other (const Recti &other) const
 
vec2i get_position_from_bottom_left (const vec2i &v) const
 
bool contains_exclusive (const Recti &r) const
 
bool contains_exclusive (const vec2i &p) const
 
bool contains_exclusive (int x, int y) const
 
bool contains_inclusive (const vec2i &p) const
 
bool contains_inclusive (int x, int y) const
 
Recti get_scaled_around_center_copy (int scale) const
 
Recti expand_copy (int expand) const
 
Recti translate_copy (int dx, int dy) const
 
Recti translate_copy (const vec2i &d) const
 
Recti extend_copy (int dx, int dy) const
 
Recti extend_copy (int d) const
 
Recti scale_copy (int dx, int dy) const
 
Recti inset_copy (int dx, int dy) const
 
Recti inset_copy (int l, int r, int t, int b) const
 
Recti set_top_left_to_copy (int new_left, int new_top) const
 
Recti set_top_left_to_copy (const vec2i &v) const
 
Recti set_bottom_left_to_copy (int new_left, int new_bottom) const
 
Recti set_bottom_left_to_copy (const vec2i &v) const
 
Rectf to_f () const
 
int get_relative_center_x_from_bottom_left () const
 
int get_relative_center_y_from_bottom_left () const
 
vec2i get_relative_center_pos_from_bottom_left () const
 
int get_absolute_center_x () const
 
int get_absolute_center_y () const
 
vec2i get_absolute_center_pos () const
 
bool is_empty () const
 
bool is_valid () const
 
vec2i get_top_left () const
 
vec2i get_top_right () const
 
vec2i get_bottom_left () const
 
vec2i get_bottom_right () const
 
int get_height () const
 
int get_width () const
 
size2i get_size () const
 
Range< int > get_range_y () const
 
Range< int > get_range_x () const
 

Static Public Member Functions

static Recti from_position_anchor_width_and_height (const vec2i &pos, const Scale2f &anchor, int width, int height)
 
static Recti from_left_right_bottom_top (int left_side, int right_side, int bottom_side, int top_side)
 
static Recti from_left_right_top_bottom (int left_side, int right_side, int top_side, int bottom_side)
 
static Recti from_bottom_left_width_height (const vec2i &bl, int width, int height)
 
static Recti from_top_left_width_height (const vec2i &topleft, int width, int height)
 
static Recti from_width_height (int width, int height)
 
static Recti from_width_height (const size2i &s)
 
static Recti from_point (const vec2i &point)
 

Public Attributes

int left
 
int right
 
int top
 
int bottom
 

Detailed Description

Definition at line 124 of file rect.h.

Constructor & Destructor Documentation

◆ Recti()

eu::Recti::Recti ( )

Definition at line 484 of file rect.cc.

Member Function Documentation

◆ center_inside_other()

Recti eu::Recti::center_inside_other ( const Recti other) const

Definition at line 600 of file rect.cc.

◆ contains_exclusive() [1/3]

bool eu::Recti::contains_exclusive ( const Recti r) const

Definition at line 658 of file rect.cc.

◆ contains_exclusive() [2/3]

bool eu::Recti::contains_exclusive ( const vec2i p) const

Definition at line 671 of file rect.cc.

◆ contains_exclusive() [3/3]

bool eu::Recti::contains_exclusive ( int  x,
int  y 
) const

Definition at line 678 of file rect.cc.

◆ contains_inclusive() [1/2]

bool eu::Recti::contains_inclusive ( const vec2i p) const

Definition at line 689 of file rect.cc.

◆ contains_inclusive() [2/2]

bool eu::Recti::contains_inclusive ( int  x,
int  y 
) const

Definition at line 695 of file rect.cc.

◆ expand()

void eu::Recti::expand ( int  expand)

Definition at line 819 of file rect.cc.

◆ expand_copy()

Recti eu::Recti::expand_copy ( int  expand) const

Definition at line 828 of file rect.cc.

◆ extend()

void eu::Recti::extend ( int  dx,
int  dy 
)

Definition at line 769 of file rect.cc.

◆ extend_copy() [1/2]

Recti eu::Recti::extend_copy ( int  d) const

Definition at line 783 of file rect.cc.

◆ extend_copy() [2/2]

Recti eu::Recti::extend_copy ( int  dx,
int  dy 
) const

Definition at line 775 of file rect.cc.

◆ from_bottom_left_width_height()

Recti eu::Recti::from_bottom_left_width_height ( const vec2i bl,
int  width,
int  height 
)
static

Definition at line 548 of file rect.cc.

◆ from_left_right_bottom_top()

Recti eu::Recti::from_left_right_bottom_top ( int  left_side,
int  right_side,
int  bottom_side,
int  top_side 
)
static

Definition at line 513 of file rect.cc.

◆ from_left_right_top_bottom()

Recti eu::Recti::from_left_right_top_bottom ( int  left_side,
int  right_side,
int  top_side,
int  bottom_side 
)
static

Definition at line 521 of file rect.cc.

◆ from_point()

Recti eu::Recti::from_point ( const vec2i point)
static

Definition at line 587 of file rect.cc.

◆ from_position_anchor_width_and_height()

Recti eu::Recti::from_position_anchor_width_and_height ( const vec2i pos,
const Scale2f anchor,
int  width,
int  height 
)
static

Definition at line 529 of file rect.cc.

◆ from_top_left_width_height()

Recti eu::Recti::from_top_left_width_height ( const vec2i topleft,
int  width,
int  height 
)
static

Definition at line 561 of file rect.cc.

◆ from_width_height() [1/2]

Recti eu::Recti::from_width_height ( const size2i s)
static

Definition at line 581 of file rect.cc.

◆ from_width_height() [2/2]

Recti eu::Recti::from_width_height ( int  width,
int  height 
)
static

Definition at line 573 of file rect.cc.

◆ get_absolute_center_pos()

vec2i eu::Recti::get_absolute_center_pos ( ) const

Definition at line 652 of file rect.cc.

◆ get_absolute_center_x()

int eu::Recti::get_absolute_center_x ( ) const

Definition at line 640 of file rect.cc.

◆ get_absolute_center_y()

int eu::Recti::get_absolute_center_y ( ) const

Definition at line 646 of file rect.cc.

◆ get_bottom_left()

vec2i eu::Recti::get_bottom_left ( ) const

Definition at line 593 of file rect.cc.

◆ get_bottom_right()

vec2i eu::Recti::get_bottom_right ( ) const

Definition at line 934 of file rect.cc.

◆ get_height()

int eu::Recti::get_height ( ) const

Definition at line 891 of file rect.cc.

◆ get_position_from_bottom_left()

vec2i eu::Recti::get_position_from_bottom_left ( const vec2i v) const

Definition at line 612 of file rect.cc.

◆ get_range_x()

Range< int > eu::Recti::get_range_x ( ) const

Definition at line 910 of file rect.cc.

◆ get_range_y()

Range< int > eu::Recti::get_range_y ( ) const

Definition at line 904 of file rect.cc.

◆ get_relative_center_pos_from_bottom_left()

vec2i eu::Recti::get_relative_center_pos_from_bottom_left ( ) const

Definition at line 630 of file rect.cc.

◆ get_relative_center_x_from_bottom_left()

int eu::Recti::get_relative_center_x_from_bottom_left ( ) const

Definition at line 618 of file rect.cc.

◆ get_relative_center_y_from_bottom_left()

int eu::Recti::get_relative_center_y_from_bottom_left ( ) const

Definition at line 624 of file rect.cc.

◆ get_scaled_around_center_copy()

Recti eu::Recti::get_scaled_around_center_copy ( int  scale) const

Definition at line 706 of file rect.cc.

◆ get_size()

size2i eu::Recti::get_size ( ) const

Definition at line 916 of file rect.cc.

◆ get_top_left()

vec2i eu::Recti::get_top_left ( ) const

Definition at line 922 of file rect.cc.

◆ get_top_right()

vec2i eu::Recti::get_top_right ( ) const

Definition at line 928 of file rect.cc.

◆ get_width()

int eu::Recti::get_width ( ) const

Definition at line 897 of file rect.cc.

◆ include()

void eu::Recti::include ( const Recti o)

Definition at line 789 of file rect.cc.

◆ inset() [1/2]

void eu::Recti::inset ( int  dx,
int  dy 
)

Definition at line 735 of file rect.cc.

◆ inset() [2/2]

void eu::Recti::inset ( int  l,
int  r,
int  t,
int  b 
)

Definition at line 744 of file rect.cc.

◆ inset_copy() [1/2]

Recti eu::Recti::inset_copy ( int  dx,
int  dy 
) const

Definition at line 753 of file rect.cc.

◆ inset_copy() [2/2]

Recti eu::Recti::inset_copy ( int  l,
int  r,
int  t,
int  b 
) const

Definition at line 761 of file rect.cc.

◆ is_empty()

bool eu::Recti::is_empty ( ) const

Definition at line 798 of file rect.cc.

◆ is_valid()

bool eu::Recti::is_valid ( ) const

Definition at line 804 of file rect.cc.

◆ scale()

void eu::Recti::scale ( int  dx,
int  dy 
)

Definition at line 718 of file rect.cc.

◆ scale_copy()

Recti eu::Recti::scale_copy ( int  dx,
int  dy 
) const

Definition at line 727 of file rect.cc.

◆ set_bottom_left_to_copy() [1/2]

Recti eu::Recti::set_bottom_left_to_copy ( const vec2i v) const

Definition at line 878 of file rect.cc.

◆ set_bottom_left_to_copy() [2/2]

Recti eu::Recti::set_bottom_left_to_copy ( int  new_left,
int  new_bottom 
) const

Definition at line 867 of file rect.cc.

◆ set_empty()

void eu::Recti::set_empty ( )

Definition at line 884 of file rect.cc.

◆ set_top_left_to_copy() [1/2]

Recti eu::Recti::set_top_left_to_copy ( const vec2i v) const

Definition at line 861 of file rect.cc.

◆ set_top_left_to_copy() [2/2]

Recti eu::Recti::set_top_left_to_copy ( int  new_left,
int  new_top 
) const

Definition at line 850 of file rect.cc.

◆ to_f()

Rectf eu::Recti::to_f ( ) const

Definition at line 501 of file rect.cc.

◆ translate()

void eu::Recti::translate ( int  dx,
int  dy 
)

Definition at line 810 of file rect.cc.

◆ translate_copy() [1/2]

Recti eu::Recti::translate_copy ( const vec2i d) const

Definition at line 844 of file rect.cc.

◆ translate_copy() [2/2]

Recti eu::Recti::translate_copy ( int  dx,
int  dy 
) const

Definition at line 836 of file rect.cc.

Member Data Documentation

◆ bottom

int eu::Recti::bottom

Definition at line 129 of file rect.h.

◆ left

int eu::Recti::left

Definition at line 126 of file rect.h.

◆ right

int eu::Recti::right

Definition at line 127 of file rect.h.

◆ top

int eu::Recti::top

Definition at line 128 of file rect.h.


The documentation for this struct was generated from the following files: