Numworks Epsilon  1.4.1
Graphing Calculator Operating System
KDRect Class Reference

#include <rect.h>

Public Member Functions

constexpr KDRect (KDCoordinate x, KDCoordinate y, KDCoordinate width, KDCoordinate height)
 
 KDRect (KDPoint p, KDSize s)
 
 KDRect (KDCoordinate x, KDCoordinate y, KDSize s)
 
 KDRect (KDPoint p, KDCoordinate width, KDCoordinate height)
 
KDCoordinate x () const
 
KDCoordinate y () const
 
KDPoint origin () const
 
KDCoordinate width () const
 
KDCoordinate height () const
 
KDSize size () const
 
KDCoordinate top () const
 
KDCoordinate right () const
 
KDCoordinate bottom () const
 
KDCoordinate left () const
 
KDPoint topLeft () const
 
KDPoint bottomRight () const
 
bool operator== (const KDRect &other) const
 
void setOrigin (KDPoint origin)
 
void setSize (KDSize size)
 
KDRect translatedBy (KDPoint p) const
 
KDRect movedTo (KDPoint p) const
 
bool intersects (const KDRect &other) const
 
KDRect intersectedWith (const KDRect &other) const
 
KDRect unionedWith (const KDRect &other) const
 
bool contains (KDPoint p) const
 
bool isEmpty () const
 

Detailed Description

Definition at line 26 of file rect.h.

Constructor & Destructor Documentation

◆ KDRect() [1/4]

constexpr KDRect::KDRect ( KDCoordinate  x,
KDCoordinate  y,
KDCoordinate  width,
KDCoordinate  height 
)
inline

Definition at line 28 of file rect.h.

◆ KDRect() [2/4]

KDRect::KDRect ( KDPoint  p,
KDSize  s 
)

Definition at line 3 of file rect.cpp.

◆ KDRect() [3/4]

KDRect::KDRect ( KDCoordinate  x,
KDCoordinate  y,
KDSize  s 
)

Definition at line 9 of file rect.cpp.

◆ KDRect() [4/4]

KDRect::KDRect ( KDPoint  p,
KDCoordinate  width,
KDCoordinate  height 
)

Definition at line 15 of file rect.cpp.

Member Function Documentation

◆ bottom()

KDCoordinate KDRect::bottom ( ) const
inline

Definition at line 44 of file rect.h.

◆ bottomRight()

KDPoint KDRect::bottomRight ( ) const
inline

Definition at line 48 of file rect.h.

◆ contains()

bool KDRect::contains ( KDPoint  p) const

Definition at line 104 of file rect.cpp.

◆ height()

KDCoordinate KDRect::height ( ) const
inline

Definition at line 40 of file rect.h.

◆ intersectedWith()

KDRect KDRect::intersectedWith ( const KDRect other) const

Definition at line 33 of file rect.cpp.

◆ intersects()

bool KDRect::intersects ( const KDRect other) const

Definition at line 24 of file rect.cpp.

◆ isEmpty()

bool KDRect::isEmpty ( ) const

Definition at line 116 of file rect.cpp.

◆ left()

KDCoordinate KDRect::left ( ) const
inline

Definition at line 45 of file rect.h.

◆ movedTo()

KDRect KDRect::movedTo ( KDPoint  p) const

Definition at line 112 of file rect.cpp.

◆ operator==()

bool KDRect::operator== ( const KDRect other) const
inline

Definition at line 50 of file rect.h.

◆ origin()

KDPoint KDRect::origin ( ) const
inline

Definition at line 38 of file rect.h.

◆ right()

KDCoordinate KDRect::right ( ) const
inline

Definition at line 43 of file rect.h.

◆ setOrigin()

void KDRect::setOrigin ( KDPoint  origin)

Definition at line 21 of file rect.cpp.

◆ setSize()

void KDRect::setSize ( KDSize  size)

Definition at line 22 of file rect.cpp.

◆ size()

KDSize KDRect::size ( ) const
inline

Definition at line 41 of file rect.h.

◆ top()

KDCoordinate KDRect::top ( ) const
inline

Definition at line 42 of file rect.h.

◆ topLeft()

KDPoint KDRect::topLeft ( ) const
inline

Definition at line 47 of file rect.h.

◆ translatedBy()

KDRect KDRect::translatedBy ( KDPoint  p) const

Definition at line 108 of file rect.cpp.

◆ unionedWith()

KDRect KDRect::unionedWith ( const KDRect other) const

Definition at line 71 of file rect.cpp.

◆ width()

KDCoordinate KDRect::width ( ) const
inline

Definition at line 39 of file rect.h.

◆ x()

KDCoordinate KDRect::x ( ) const
inline

Definition at line 36 of file rect.h.

◆ y()

KDCoordinate KDRect::y ( ) const
inline

Definition at line 37 of file rect.h.


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