#include <KoRect.h>
Public Member Functions | |
| KoRect (const KoPoint &topleft, const KoPoint &bottomright) | |
| KoRect (const KoPoint &topleft, const KoSize &size) | |
| KoRect (const double &left, const double &top, const double &width, const double &height) | |
| bool | isNull () const |
| bool | isEmpty () const |
| bool | isValid () const |
| KoRect | normalize () const |
| double | left () const |
| double | top () const |
| double | right () const |
| double | bottom () const |
| double & | rLeft () |
| double & | rTop () |
| double & | rRight () |
| double & | rBottom () |
| double | x () const |
| double | y () const |
| void | setLeft (const double &left) |
| void | setTop (const double &top) |
| void | setRight (const double &right) |
| void | setBottom (const double &bottom) |
| void | setX (const double &x) |
| void | setY (const double &y) |
| KoPoint | topLeft () const |
| KoPoint | bottomRight () const |
| KoPoint | topRight () const |
| KoPoint | bottomLeft () const |
| KoPoint | center () const |
| void | setTopLeft (const KoPoint &topleft) |
| void | setBottomRight (const KoPoint &bottomright) |
| void | setTopRight (const KoPoint &topright) |
| void | setBottomLeft (const KoPoint &bottomleft) |
| void | moveTopLeft (const KoPoint &topleft) |
| void | moveBottomRight (const KoPoint &bottomright) |
| void | moveTopRight (const KoPoint &topright) |
| void | moveBottomLeft (const KoPoint &bottomleft) |
| void | moveBy (const double &dx, const double &dy) |
| void | setRect (const double &x, const double &y, const double &width, const double &height) |
| void | setRect (const KoRect &rect) |
| void | setCoords (const double &x1, const double &y1, const double &x2, const double &y2) |
| KoSize | size () const |
| double | width () const |
| double | height () const |
| void | setWidth (const double &width) |
| void | setHeight (const double &height) |
| void | setSize (const KoSize &size) |
| KoRect & | operator|= (const KoRect &rhs) |
| KoRect & | operator&= (const KoRect &rhs) |
| bool | contains (const KoPoint &p) const |
| bool | contains (const double &x, const double &y) const |
| bool | contains (const KoRect &r) const |
| KoRect | unite (const KoRect &r) const |
| KoRect | intersect (const KoRect &r) const |
| bool | intersects (const KoRect &r) const |
| KoRect | transform (const TQWMatrix &m) const |
| KoRect | translate (double dx, double dy) const |
| TQRect | toTQRect () const |
Static Public Member Functions | |
| static KoRect | fromTQRect (const TQRect &rect) |
Detailed Description
A rect whose coordinates are floating-point values ( "double"s ).
The API isn't documented, it's a perfect mirror of TQRect.
Constructor & Destructor Documentation
◆ KoRect() [1/4]
◆ KoRect() [2/4]
◆ KoRect() [3/4]
◆ KoRect() [4/4]
|
inline |
◆ ~KoRect()
Member Function Documentation
◆ bottom()
◆ bottomLeft()
◆ bottomRight()
◆ center()
| KoPoint KoRect::center | ( | ) | const |
Definition at line 64 of file KoRect.cpp.
◆ contains() [1/3]
| bool KoRect::contains | ( | const double & | x, |
| const double & | y | ||
| ) | const |
Helper function for the above function.
Definition at line 173 of file KoRect.cpp.
◆ contains() [2/3]
| bool KoRect::contains | ( | const KoPoint & | p | ) | const |
Returns if the point is contained in the rect.
- Parameters
-
p the point to test Will return true if the point is contained in the 2d area this rect represents, this means that it will return true on everthing from the topleft() to the bottomright(); Note that for KoRect(0, 0, 100, 100) the KoPoint(0, 0) as well as KoPoint(100, 100) are mathmatically contained in the rect, this in contrary to pixel based rectangles.
Definition at line 169 of file KoRect.cpp.
◆ contains() [3/3]
| bool KoRect::contains | ( | const KoRect & | r | ) | const |
Helper function for the above function.
Definition at line 177 of file KoRect.cpp.
◆ fromTQRect()
|
static |
Definition at line 271 of file KoRect.cpp.
◆ height()
◆ intersect()
Definition at line 186 of file KoRect.cpp.
◆ intersects()
| bool KoRect::intersects | ( | const KoRect & | r | ) | const |
Definition at line 190 of file KoRect.cpp.
◆ isEmpty()
◆ isNull()
◆ isValid()
◆ left()
◆ moveBottomLeft()
| void KoRect::moveBottomLeft | ( | const KoPoint & | bottomleft | ) |
Definition at line 91 of file KoRect.cpp.
◆ moveBottomRight()
| void KoRect::moveBottomRight | ( | const KoPoint & | bottomright | ) |
Definition at line 76 of file KoRect.cpp.
◆ moveBy()
| void KoRect::moveBy | ( | const double & | dx, |
| const double & | dy | ||
| ) |
Definition at line 99 of file KoRect.cpp.
◆ moveTopLeft()
| void KoRect::moveTopLeft | ( | const KoPoint & | topleft | ) |
Definition at line 69 of file KoRect.cpp.
◆ moveTopRight()
| void KoRect::moveTopRight | ( | const KoPoint & | topright | ) |
Definition at line 83 of file KoRect.cpp.
◆ normalize()
| KoRect KoRect::normalize | ( | ) | const |
Definition at line 21 of file KoRect.cpp.
◆ operator&=()
Definition at line 156 of file KoRect.cpp.
◆ operator|=()
Definition at line 136 of file KoRect.cpp.
◆ rBottom()
◆ right()
◆ rLeft()
◆ rRight()
◆ rTop()
◆ setBottom()
◆ setBottomLeft()
| void KoRect::setBottomLeft | ( | const KoPoint & | bottomleft | ) |
Definition at line 57 of file KoRect.cpp.
◆ setBottomRight()
| void KoRect::setBottomRight | ( | const KoPoint & | bottomright | ) |
Definition at line 46 of file KoRect.cpp.
◆ setCoords()
| void KoRect::setCoords | ( | const double & | x1, |
| const double & | y1, | ||
| const double & | x2, | ||
| const double & | y2 | ||
| ) |
Definition at line 119 of file KoRect.cpp.
◆ setHeight()
◆ setLeft()
◆ setRect() [1/2]
| void KoRect::setRect | ( | const double & | x, |
| const double & | y, | ||
| const double & | width, | ||
| const double & | height | ||
| ) |
Definition at line 107 of file KoRect.cpp.
◆ setRect() [2/2]
| void KoRect::setRect | ( | const KoRect & | rect | ) |
Definition at line 113 of file KoRect.cpp.
◆ setRight()
◆ setSize()
| void KoRect::setSize | ( | const KoSize & | size | ) |
Definition at line 125 of file KoRect.cpp.
◆ setTop()
◆ setTopLeft()
| void KoRect::setTopLeft | ( | const KoPoint & | topleft | ) |
Definition at line 41 of file KoRect.cpp.
◆ setTopRight()
| void KoRect::setTopRight | ( | const KoPoint & | topright | ) |
Definition at line 51 of file KoRect.cpp.
◆ setWidth()
◆ setX()
◆ setY()
◆ size()
| KoSize KoRect::size | ( | ) | const |
Definition at line 131 of file KoRect.cpp.
◆ top()
◆ topLeft()
◆ topRight()
◆ toTQRect()
| TQRect KoRect::toTQRect | ( | ) | const |
Definition at line 265 of file KoRect.cpp.
◆ transform()
| KoRect KoRect::transform | ( | const TQWMatrix & | m | ) | const |
Definition at line 229 of file KoRect.cpp.
◆ translate()
| KoRect KoRect::translate | ( | double | dx, |
| double | dy | ||
| ) | const |
Definition at line 260 of file KoRect.cpp.
◆ unite()
Definition at line 182 of file KoRect.cpp.
◆ width()
◆ x()
◆ y()
The documentation for this class was generated from the following files:
