Loading...
Searching...
No Matches
IntRect

#include <Ultralight/Geometry.h>

Overview

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 area ( ) const
inline

◆ center_x()

int center_x ( ) const
inline

◆ center_y()

int center_y ( ) const
inline

◆ Contains() [1/2]

bool Contains ( const IntRect & r) const
inline

◆ Contains() [2/2]

bool Contains ( const Point & p) const
inline

◆ height()

int height ( ) const
inline

◆ Inset()

void Inset ( int dx,
int dy )
inline

◆ Intersect()

IntRect Intersect ( const IntRect & other) const
inline

◆ Intersects()

bool Intersects ( const IntRect & rhs) const
inline

◆ IsEmpty()

bool IsEmpty ( ) const
inline

◆ IsValid()

bool IsValid ( ) const
inline

◆ Join() [1/2]

void Join ( const IntRect & rhs)
inline

◆ Join() [2/2]

void Join ( const Point & p)
inline

◆ MakeEmpty()

static constexpr IntRect MakeEmpty ( )
inlinestaticconstexpr

◆ Move()

void Move ( int dx,
int dy )
inline

◆ origin()

Point origin ( ) const
inline

◆ Outset()

void Outset ( int dx,
int dy )
inline

◆ SetEmpty()

void SetEmpty ( )
inline

◆ width()

int width ( ) const
inline

◆ x()

int x ( ) const
inline

◆ y()

int 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 bottom

◆ left

int left

◆ right

int right

◆ top

int top

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