Euphoria
eu::Rectf Struct Reference

#include <rect.h>

Public Member Functions

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

Static Public Member Functions

static Rectf from_left_right_bottom_top (float left_side, float right_side, float bottom_side, float top_side)
 
static Rectf from_left_right_top_bottom (float left_side, float right_side, float top_side, float bottom_side)
 
static Rectf from_position_anchor_width_and_height (const vec2f &pos, const Scale2f &anchor, float width, float height)
 
static Rectf from_bottom_left_width_height (const vec2f &bl, float width, float height)
 
static Rectf from_top_left_width_height (const vec2f &topleft, float width, float height)
 
static Rectf from_width_height (float width, float height)
 
static Rectf from_width_height (const size2f &s)
 
static Rectf from_point (const vec2f &point)
 

Public Attributes

float left
 
float right
 
float top
 
float bottom
 

Detailed Description

Definition at line 26 of file rect.h.

Constructor & Destructor Documentation

◆ Rectf()

eu::Rectf::Rectf ( )

Definition at line 9 of file rect.cc.

Member Function Documentation

◆ center_inside_other()

Rectf eu::Rectf::center_inside_other ( const Rectf other) const

Definition at line 124 of file rect.cc.

◆ contains_exclusive() [1/3]

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

Definition at line 182 of file rect.cc.

◆ contains_exclusive() [2/3]

bool eu::Rectf::contains_exclusive ( const vec2f p) const

Definition at line 195 of file rect.cc.

◆ contains_exclusive() [3/3]

bool eu::Rectf::contains_exclusive ( float  x,
float  y 
) const

Definition at line 202 of file rect.cc.

◆ contains_inclusive() [1/2]

bool eu::Rectf::contains_inclusive ( const vec2f p) const

Definition at line 214 of file rect.cc.

◆ contains_inclusive() [2/2]

bool eu::Rectf::contains_inclusive ( float  x,
float  y 
) const

Definition at line 221 of file rect.cc.

◆ expand()

void eu::Rectf::expand ( float  expand)

Definition at line 354 of file rect.cc.

◆ expand_copy()

Rectf eu::Rectf::expand_copy ( float  expand) const

Definition at line 364 of file rect.cc.

◆ extend()

void eu::Rectf::extend ( float  dx,
float  dy 
)

Definition at line 298 of file rect.cc.

◆ extend_copy() [1/2]

Rectf eu::Rectf::extend_copy ( float  d) const

Definition at line 314 of file rect.cc.

◆ extend_copy() [2/2]

Rectf eu::Rectf::extend_copy ( float  dx,
float  dy 
) const

Definition at line 305 of file rect.cc.

◆ from_bottom_left_width_height()

Rectf eu::Rectf::from_bottom_left_width_height ( const vec2f bl,
float  width,
float  height 
)
static

Definition at line 74 of file rect.cc.

◆ from_left_right_bottom_top()

Rectf eu::Rectf::from_left_right_bottom_top ( float  left_side,
float  right_side,
float  bottom_side,
float  top_side 
)
static

Definition at line 39 of file rect.cc.

◆ from_left_right_top_bottom()

Rectf eu::Rectf::from_left_right_top_bottom ( float  left_side,
float  right_side,
float  top_side,
float  bottom_side 
)
static

Definition at line 47 of file rect.cc.

◆ from_point()

Rectf eu::Rectf::from_point ( const vec2f point)
static

Definition at line 112 of file rect.cc.

◆ from_position_anchor_width_and_height()

Rectf eu::Rectf::from_position_anchor_width_and_height ( const vec2f pos,
const Scale2f anchor,
float  width,
float  height 
)
static

Definition at line 55 of file rect.cc.

◆ from_top_left_width_height()

Rectf eu::Rectf::from_top_left_width_height ( const vec2f topleft,
float  width,
float  height 
)
static

Definition at line 86 of file rect.cc.

◆ from_width_height() [1/2]

Rectf eu::Rectf::from_width_height ( const size2f s)
static

Definition at line 106 of file rect.cc.

◆ from_width_height() [2/2]

Rectf eu::Rectf::from_width_height ( float  width,
float  height 
)
static

Definition at line 98 of file rect.cc.

◆ get_absolute_center_pos()

vec2f eu::Rectf::get_absolute_center_pos ( ) const

Definition at line 176 of file rect.cc.

◆ get_absolute_center_x()

float eu::Rectf::get_absolute_center_x ( ) const

Definition at line 164 of file rect.cc.

◆ get_absolute_center_y()

float eu::Rectf::get_absolute_center_y ( ) const

Definition at line 170 of file rect.cc.

◆ get_bottom_left()

vec2f eu::Rectf::get_bottom_left ( ) const

Definition at line 118 of file rect.cc.

◆ get_bottom_right()

vec2f eu::Rectf::get_bottom_right ( ) const

Definition at line 473 of file rect.cc.

◆ get_height()

float eu::Rectf::get_height ( ) const

Definition at line 430 of file rect.cc.

◆ get_position_from_bottom_left()

vec2f eu::Rectf::get_position_from_bottom_left ( const vec2f v) const

Definition at line 136 of file rect.cc.

◆ get_range_x()

Range< float > eu::Rectf::get_range_x ( ) const

Definition at line 449 of file rect.cc.

◆ get_range_y()

Range< float > eu::Rectf::get_range_y ( ) const

Definition at line 443 of file rect.cc.

◆ get_relative_center_pos_from_bottom_left()

vec2f eu::Rectf::get_relative_center_pos_from_bottom_left ( ) const

Definition at line 154 of file rect.cc.

◆ get_relative_center_x_from_bottom_left()

float eu::Rectf::get_relative_center_x_from_bottom_left ( ) const

Definition at line 142 of file rect.cc.

◆ get_relative_center_y_from_bottom_left()

float eu::Rectf::get_relative_center_y_from_bottom_left ( ) const

Definition at line 148 of file rect.cc.

◆ get_scaled_around_center_copy()

Rectf eu::Rectf::get_scaled_around_center_copy ( float  scale) const

Definition at line 232 of file rect.cc.

◆ get_size()

size2f eu::Rectf::get_size ( ) const

Definition at line 455 of file rect.cc.

◆ get_top_left()

vec2f eu::Rectf::get_top_left ( ) const

Definition at line 461 of file rect.cc.

◆ get_top_right()

vec2f eu::Rectf::get_top_right ( ) const

Definition at line 467 of file rect.cc.

◆ get_width()

float eu::Rectf::get_width ( ) const

Definition at line 436 of file rect.cc.

◆ include()

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

Definition at line 320 of file rect.cc.

◆ inset() [1/2]

void eu::Rectf::inset ( float  dx,
float  dy 
)

Definition at line 263 of file rect.cc.

◆ inset() [2/2]

void eu::Rectf::inset ( float  l,
float  r,
float  t,
float  b 
)

Definition at line 273 of file rect.cc.

◆ inset_copy() [1/2]

Rectf eu::Rectf::inset_copy ( float  dx,
float  dy 
) const

Definition at line 282 of file rect.cc.

◆ inset_copy() [2/2]

Rectf eu::Rectf::inset_copy ( float  l,
float  r,
float  t,
float  b 
) const

Definition at line 290 of file rect.cc.

◆ is_empty()

bool eu::Rectf::is_empty ( ) const

Definition at line 330 of file rect.cc.

◆ is_valid()

bool eu::Rectf::is_valid ( ) const

Definition at line 337 of file rect.cc.

◆ operator==()

bool eu::Rectf::operator== ( const Rectf rhs)
delete

◆ scale()

void eu::Rectf::scale ( float  dx,
float  dy 
)

Definition at line 244 of file rect.cc.

◆ scale_copy()

Rectf eu::Rectf::scale_copy ( float  dx,
float  dy 
) const

Definition at line 254 of file rect.cc.

◆ set_bottom_left_to_copy() [1/2]

Rectf eu::Rectf::set_bottom_left_to_copy ( const vec2f v) const

Definition at line 416 of file rect.cc.

◆ set_bottom_left_to_copy() [2/2]

Rectf eu::Rectf::set_bottom_left_to_copy ( float  new_left,
float  new_bottom 
) const

Definition at line 404 of file rect.cc.

◆ set_empty()

void eu::Rectf::set_empty ( )

Definition at line 423 of file rect.cc.

◆ set_top_left_to_copy() [1/2]

Rectf eu::Rectf::set_top_left_to_copy ( const vec2f v) const

Definition at line 398 of file rect.cc.

◆ set_top_left_to_copy() [2/2]

Rectf eu::Rectf::set_top_left_to_copy ( float  new_left,
float  new_top 
) const

Definition at line 387 of file rect.cc.

◆ to_i()

Recti eu::Rectf::to_i ( ) const

Definition at line 27 of file rect.cc.

◆ translate()

void eu::Rectf::translate ( float  dx,
float  dy 
)

Definition at line 344 of file rect.cc.

◆ translate_copy() [1/2]

Rectf eu::Rectf::translate_copy ( const vec2f d) const

Definition at line 380 of file rect.cc.

◆ translate_copy() [2/2]

Rectf eu::Rectf::translate_copy ( float  dx,
float  dy 
) const

Definition at line 372 of file rect.cc.

Member Data Documentation

◆ bottom

float eu::Rectf::bottom

Definition at line 31 of file rect.h.

◆ left

float eu::Rectf::left

Definition at line 28 of file rect.h.

◆ right

float eu::Rectf::right

Definition at line 29 of file rect.h.

◆ top

float eu::Rectf::top

Definition at line 30 of file rect.h.


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