libDaisy
Hardware Library for Daisy
Loading...
Searching...
No Matches
daisy::Rectangle Class Reference

#include <graphics_common.h>

Public Member Functions

 Rectangle ()
 
 Rectangle (int16_t width, int16_t height)
 
 Rectangle (int16_t x, int16_t y, int16_t width, int16_t height)
 
 Rectangle (const Rectangle &other)
 
Rectangleoperator= (const Rectangle &other)
 
bool operator== (const Rectangle &other) const
 
bool operator!= (const Rectangle &other) const
 
bool IsEmpty () const
 
int16_t GetX () const
 
int16_t GetY () const
 
int16_t GetWidth () const
 
int16_t GetHeight () const
 
int16_t GetRight () const
 
int16_t GetBottom () const
 
int16_t GetCenterX () const
 
int16_t GetCenterY () const
 
Rectangle WithX (int16_t x) const
 
Rectangle WithY (int16_t y) const
 
Rectangle WithWidth (int16_t width) const
 
Rectangle WithHeight (int16_t height) const
 
Rectangle WithSize (int16_t width, int16_t height) const
 
Rectangle WithWidthKeepingCenter (int16_t width) const
 
Rectangle WithHeightKeepingCenter (int16_t height) const
 
Rectangle WithSizeKeepingCenter (int16_t width, int16_t height) const
 
Rectangle Reduced (int16_t sizeToReduce) const
 
Rectangle Reduced (int16_t xToReduce, int16_t yToReduce) const
 
Rectangle Translated (int16_t x, int16_t y) const
 
Rectangle WithLeft (int16_t left) const
 
Rectangle WithRight (int16_t right) const
 
Rectangle WithTop (int16_t top) const
 
Rectangle WithBottom (int16_t bottom) const
 
Rectangle WithTrimmedLeft (int16_t pxToTrim) const
 
Rectangle WithTrimmedRight (int16_t pxToTrim) const
 
Rectangle WithTrimmedTop (int16_t pxToTrim) const
 
Rectangle WithTrimmedBottom (int16_t pxToTrim) const
 
Rectangle WithCenterX (int16_t centerX) const
 
Rectangle WithCenterY (int16_t centerY) const
 
Rectangle WithCenter (int16_t centerX, int16_t centerY) const
 
Rectangle RemoveFromLeft (int16_t pxToRemove)
 
Rectangle RemoveFromRight (int16_t pxToRemove)
 
Rectangle RemoveFromTop (int16_t pxToRemove)
 
Rectangle RemoveFromBottom (int16_t pxToRemove)
 
Rectangle AlignedWithin (const Rectangle &other, Alignment alignment) const
 

Constructor & Destructor Documentation

◆ Rectangle() [1/4]

daisy::Rectangle::Rectangle ( )
inline

◆ Rectangle() [2/4]

daisy::Rectangle::Rectangle ( int16_t  width,
int16_t  height 
)
inline

◆ Rectangle() [3/4]

daisy::Rectangle::Rectangle ( int16_t  x,
int16_t  y,
int16_t  width,
int16_t  height 
)
inline

◆ Rectangle() [4/4]

daisy::Rectangle::Rectangle ( const Rectangle other)
inline

Member Function Documentation

◆ AlignedWithin()

Rectangle daisy::Rectangle::AlignedWithin ( const Rectangle other,
Alignment  alignment 
) const
inline

◆ GetBottom()

int16_t daisy::Rectangle::GetBottom ( ) const
inline

◆ GetCenterX()

int16_t daisy::Rectangle::GetCenterX ( ) const
inline

◆ GetCenterY()

int16_t daisy::Rectangle::GetCenterY ( ) const
inline

◆ GetHeight()

int16_t daisy::Rectangle::GetHeight ( ) const
inline

◆ GetRight()

int16_t daisy::Rectangle::GetRight ( ) const
inline

◆ GetWidth()

int16_t daisy::Rectangle::GetWidth ( ) const
inline

◆ GetX()

int16_t daisy::Rectangle::GetX ( ) const
inline

◆ GetY()

int16_t daisy::Rectangle::GetY ( ) const
inline

◆ IsEmpty()

bool daisy::Rectangle::IsEmpty ( ) const
inline

◆ operator!=()

bool daisy::Rectangle::operator!= ( const Rectangle other) const
inline

◆ operator=()

Rectangle & daisy::Rectangle::operator= ( const Rectangle other)
inline

◆ operator==()

bool daisy::Rectangle::operator== ( const Rectangle other) const
inline

◆ Reduced() [1/2]

Rectangle daisy::Rectangle::Reduced ( int16_t  sizeToReduce) const
inline

◆ Reduced() [2/2]

Rectangle daisy::Rectangle::Reduced ( int16_t  xToReduce,
int16_t  yToReduce 
) const
inline

◆ RemoveFromBottom()

Rectangle daisy::Rectangle::RemoveFromBottom ( int16_t  pxToRemove)
inline

◆ RemoveFromLeft()

Rectangle daisy::Rectangle::RemoveFromLeft ( int16_t  pxToRemove)
inline

◆ RemoveFromRight()

Rectangle daisy::Rectangle::RemoveFromRight ( int16_t  pxToRemove)
inline

◆ RemoveFromTop()

Rectangle daisy::Rectangle::RemoveFromTop ( int16_t  pxToRemove)
inline

◆ Translated()

Rectangle daisy::Rectangle::Translated ( int16_t  x,
int16_t  y 
) const
inline

◆ WithBottom()

Rectangle daisy::Rectangle::WithBottom ( int16_t  bottom) const
inline

◆ WithCenter()

Rectangle daisy::Rectangle::WithCenter ( int16_t  centerX,
int16_t  centerY 
) const
inline

◆ WithCenterX()

Rectangle daisy::Rectangle::WithCenterX ( int16_t  centerX) const
inline

◆ WithCenterY()

Rectangle daisy::Rectangle::WithCenterY ( int16_t  centerY) const
inline

◆ WithHeight()

Rectangle daisy::Rectangle::WithHeight ( int16_t  height) const
inline

◆ WithHeightKeepingCenter()

Rectangle daisy::Rectangle::WithHeightKeepingCenter ( int16_t  height) const
inline

◆ WithLeft()

Rectangle daisy::Rectangle::WithLeft ( int16_t  left) const
inline

◆ WithRight()

Rectangle daisy::Rectangle::WithRight ( int16_t  right) const
inline

◆ WithSize()

Rectangle daisy::Rectangle::WithSize ( int16_t  width,
int16_t  height 
) const
inline

◆ WithSizeKeepingCenter()

Rectangle daisy::Rectangle::WithSizeKeepingCenter ( int16_t  width,
int16_t  height 
) const
inline

◆ WithTop()

Rectangle daisy::Rectangle::WithTop ( int16_t  top) const
inline

◆ WithTrimmedBottom()

Rectangle daisy::Rectangle::WithTrimmedBottom ( int16_t  pxToTrim) const
inline

◆ WithTrimmedLeft()

Rectangle daisy::Rectangle::WithTrimmedLeft ( int16_t  pxToTrim) const
inline

◆ WithTrimmedRight()

Rectangle daisy::Rectangle::WithTrimmedRight ( int16_t  pxToTrim) const
inline

◆ WithTrimmedTop()

Rectangle daisy::Rectangle::WithTrimmedTop ( int16_t  pxToTrim) const
inline

◆ WithWidth()

Rectangle daisy::Rectangle::WithWidth ( int16_t  width) const
inline

◆ WithWidthKeepingCenter()

Rectangle daisy::Rectangle::WithWidthKeepingCenter ( int16_t  width) const
inline

◆ WithX()

Rectangle daisy::Rectangle::WithX ( int16_t  x) const
inline

◆ WithY()

Rectangle daisy::Rectangle::WithY ( int16_t  y) const
inline

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