Skip to content

daisy::Rectangle

#include <graphics_common.h>

Public Functions

Name
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)
Rectangle & operator=(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

Public Functions Documentation

function Rectangle

inline Rectangle()

function Rectangle

inline Rectangle(
    int16_t width,
    int16_t height
)

function Rectangle

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

function Rectangle

inline Rectangle(
    const Rectangle & other
)

function operator=

inline Rectangle & operator=(
    const Rectangle & other
)

function operator==

inline bool operator==(
    const Rectangle & other
) const

function operator!=

inline bool operator!=(
    const Rectangle & other
) const

function IsEmpty

inline bool IsEmpty() const

function GetX

inline int16_t GetX() const

function GetY

inline int16_t GetY() const

function GetWidth

inline int16_t GetWidth() const

function GetHeight

inline int16_t GetHeight() const

function GetRight

inline int16_t GetRight() const

function GetBottom

inline int16_t GetBottom() const

function GetCenterX

inline int16_t GetCenterX() const

function GetCenterY

inline int16_t GetCenterY() const

function WithX

inline Rectangle WithX(
    int16_t x
) const

function WithY

inline Rectangle WithY(
    int16_t y
) const

function WithWidth

inline Rectangle WithWidth(
    int16_t width
) const

function WithHeight

inline Rectangle WithHeight(
    int16_t height
) const

function WithSize

inline Rectangle WithSize(
    int16_t width,
    int16_t height
) const

function WithWidthKeepingCenter

inline Rectangle WithWidthKeepingCenter(
    int16_t width
) const

function WithHeightKeepingCenter

inline Rectangle WithHeightKeepingCenter(
    int16_t height
) const

function WithSizeKeepingCenter

inline Rectangle WithSizeKeepingCenter(
    int16_t width,
    int16_t height
) const

function Reduced

inline Rectangle Reduced(
    int16_t sizeToReduce
) const

function Reduced

inline Rectangle Reduced(
    int16_t xToReduce,
    int16_t yToReduce
) const

function Translated

inline Rectangle Translated(
    int16_t x,
    int16_t y
) const

function WithLeft

inline Rectangle WithLeft(
    int16_t left
) const

function WithRight

inline Rectangle WithRight(
    int16_t right
) const

function WithTop

inline Rectangle WithTop(
    int16_t top
) const

function WithBottom

inline Rectangle WithBottom(
    int16_t bottom
) const

function WithTrimmedLeft

inline Rectangle WithTrimmedLeft(
    int16_t pxToTrim
) const

function WithTrimmedRight

inline Rectangle WithTrimmedRight(
    int16_t pxToTrim
) const

function WithTrimmedTop

inline Rectangle WithTrimmedTop(
    int16_t pxToTrim
) const

function WithTrimmedBottom

inline Rectangle WithTrimmedBottom(
    int16_t pxToTrim
) const

function WithCenterX

inline Rectangle WithCenterX(
    int16_t centerX
) const

function WithCenterY

inline Rectangle WithCenterY(
    int16_t centerY
) const

function WithCenter

inline Rectangle WithCenter(
    int16_t centerX,
    int16_t centerY
) const

function RemoveFromLeft

inline Rectangle RemoveFromLeft(
    int16_t pxToRemove
)

function RemoveFromRight

inline Rectangle RemoveFromRight(
    int16_t pxToRemove
)

function RemoveFromTop

inline Rectangle RemoveFromTop(
    int16_t pxToRemove
)

function RemoveFromBottom

inline Rectangle RemoveFromBottom(
    int16_t pxToRemove
)

function AlignedWithin

inline Rectangle AlignedWithin(
    const Rectangle & other,
    Alignment alignment
) const

---

Updated on 2024-01-03 at 19:41:00 +0000