Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::IntRect Struct Reference

#include <Ultralight/Geometry.h>

Details

Integer Rectangle Helper.

Static Public Member Functions

static constexpr IntRect MakeEmpty ()
 

Public Member Functions

int width () const
 
int height () const
 
int x () const
 
int y () const
 
int center_x () const
 
int center_y () const
 
Point origin () const
 
void SetEmpty ()
 
bool IsEmpty () const
 
bool IsValid () const
 
void Inset (int dx, int dy)
 
void Outset (int dx, int dy)
 
void Move (int dx, int dy)
 
int area () const
 
void Join (const IntRect &rhs)
 
void Join (const Point &p)
 
bool Contains (const Point &p) const
 
bool Contains (const IntRect &r) const
 
bool Intersects (const IntRect &rhs) const
 
IntRect Intersect (const IntRect &other) const
 

Public Attributes

int left
 
int top
 
int right
 
int bottom
 

Friends

bool operator== (const IntRect &a, const IntRect &b)
 
bool operator!= (const IntRect &a, const IntRect &b)
 

Member Function Documentation

◆ area()

int ultralight::IntRect::area ( ) const
inline

◆ center_x()

int ultralight::IntRect::center_x ( ) const
inline

◆ center_y()

int ultralight::IntRect::center_y ( ) const
inline

◆ Contains() [1/2]

bool ultralight::IntRect::Contains ( const IntRect r) const
inline

◆ Contains() [2/2]

bool ultralight::IntRect::Contains ( const Point p) const
inline

◆ height()

int ultralight::IntRect::height ( ) const
inline

◆ Inset()

void ultralight::IntRect::Inset ( int  dx,
int  dy 
)
inline

◆ Intersect()

IntRect ultralight::IntRect::Intersect ( const IntRect other) const
inline

◆ Intersects()

bool ultralight::IntRect::Intersects ( const IntRect rhs) const
inline

◆ IsEmpty()

bool ultralight::IntRect::IsEmpty ( ) const
inline

◆ IsValid()

bool ultralight::IntRect::IsValid ( ) const
inline

◆ Join() [1/2]

void ultralight::IntRect::Join ( const IntRect rhs)
inline

◆ Join() [2/2]

void ultralight::IntRect::Join ( const Point p)
inline

◆ MakeEmpty()

static constexpr IntRect ultralight::IntRect::MakeEmpty ( )
inlinestaticconstexpr

◆ Move()

void ultralight::IntRect::Move ( int  dx,
int  dy 
)
inline

◆ origin()

Point ultralight::IntRect::origin ( ) const
inline

◆ Outset()

void ultralight::IntRect::Outset ( int  dx,
int  dy 
)
inline

◆ SetEmpty()

void ultralight::IntRect::SetEmpty ( )
inline

◆ width()

int ultralight::IntRect::width ( ) const
inline

◆ x()

int ultralight::IntRect::x ( ) const
inline

◆ y()

int ultralight::IntRect::y ( ) const
inline

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const IntRect a,
const IntRect b 
)
friend

◆ operator==

bool operator== ( const IntRect a,
const IntRect b 
)
friend

Member Data Documentation

◆ bottom

int ultralight::IntRect::bottom

◆ left

int ultralight::IntRect::left

◆ right

int ultralight::IntRect::right

◆ top

int ultralight::IntRect::top

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