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

#include <Ultralight/Geometry.h>

Details

Float Rectangle Helper.

Static Public Member Functions

static constexpr Rect MakeEmpty ()
 

Public Member Functions

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

Public Attributes

float left
 
float top
 
float right
 
float bottom
 

Friends

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

Member Function Documentation

◆ area()

float ultralight::Rect::area ( ) const
inline

◆ center_x()

float ultralight::Rect::center_x ( ) const
inline

◆ center_y()

float ultralight::Rect::center_y ( ) const
inline

◆ Contains() [1/2]

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

◆ Contains() [2/2]

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

◆ height()

float ultralight::Rect::height ( ) const
inline

◆ Inset()

void ultralight::Rect::Inset ( float  dx,
float  dy 
)
inline

◆ Intersect()

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

◆ Intersects()

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

◆ IsEmpty()

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

◆ IsValid()

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

◆ Join() [1/2]

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

◆ Join() [2/2]

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

◆ MakeEmpty()

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

◆ Move()

void ultralight::Rect::Move ( float  dx,
float  dy 
)
inline

◆ origin()

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

◆ Outset()

void ultralight::Rect::Outset ( float  dx,
float  dy 
)
inline

◆ SetEmpty()

void ultralight::Rect::SetEmpty ( )
inline

◆ ToVec4()

vec4 ultralight::Rect::ToVec4 ( )
inline

◆ width()

float ultralight::Rect::width ( ) const
inline

◆ x()

float ultralight::Rect::x ( ) const
inline

◆ y()

float ultralight::Rect::y ( ) const
inline

Friends And Related Symbol Documentation

◆ operator!=

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

◆ operator==

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

Member Data Documentation

◆ bottom

float ultralight::Rect::bottom

◆ left

float ultralight::Rect::left

◆ right

float ultralight::Rect::right

◆ top

float ultralight::Rect::top

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