okular
Okular::NormalizedRect Class Reference
#include <area.h>
List of all members.
Detailed Description
NormalizedRect is a helper class which stores the coordinates of a normalized rect, which is a rectangle of.
- See also:
- NormalizedPoints.
Definition at line 89 of file area.h.
|
Public Member Functions |
| | NormalizedRect () |
| | NormalizedRect (double left, double top, double right, double bottom) |
| | NormalizedRect (const QRect &rectangle, double xScale, double yScale) |
| | NormalizedRect (const NormalizedRect &) |
| NormalizedRect & | operator= (const NormalizedRect &other) |
| bool | isNull () const |
| bool | contains (double x, double y) const |
| bool | intersects (const NormalizedRect &other) const |
| bool | intersects (const NormalizedRect *other) const |
| bool | intersects (double left, double top, double right, double bottom) const |
| QRect | geometry (int xScale, int yScale) const |
| NormalizedRect | operator| (const NormalizedRect &other) const |
| NormalizedRect & | operator|= (const NormalizedRect &other) |
| bool | operator== (const NormalizedRect &other) const |
| void | transform (const QMatrix &matrix) |
Static Public Member Functions |
| static NormalizedRect | fromQRectF (const QRectF &rect) |
Public Attributes |
| double | left |
| double | top |
| double | right |
| double | bottom |
Constructor & Destructor Documentation
| NormalizedRect::NormalizedRect |
( |
|
) |
|
| NormalizedRect::NormalizedRect |
( |
double |
left, |
|
|
double |
top, |
|
|
double |
right, |
|
|
double |
bottom | |
|
) |
| | |
Creates a normalized rectangle with the normalized coordinates left, top, right, bottom.
If you need the x, y, width and height coordinates use the following formulas:
- x = left
- y = top
- width = right - left
- height = bottom - top
Definition at line 59 of file area.cpp.
| NormalizedRect::NormalizedRect |
( |
const QRect & |
rectangle, |
|
|
double |
xScale, |
|
|
double |
yScale | |
|
) |
| | |
Creates a normalized rectangle of the given rectangle which is normalized by the scaling factors xScale and yScale.
Definition at line 63 of file area.cpp.
Member Function Documentation
| bool NormalizedRect::isNull |
( |
|
) |
const |
Returns whether this normalized rectangle is a null normalized rect.
Definition at line 80 of file area.cpp.
| bool NormalizedRect::contains |
( |
double |
x, |
|
|
double |
y | |
|
) |
| | const |
Returns whether the normalized rectangle contains the normalized coordinates x and y.
Definition at line 85 of file area.cpp.
| bool NormalizedRect::intersects |
( |
const NormalizedRect & |
other |
) |
const |
Returns whether the normalized rectangle intersects the other normalized rectangle.
Definition at line 90 of file area.cpp.
| bool NormalizedRect::intersects |
( |
const NormalizedRect * |
other |
) |
const |
This is an overloaded member function, provided for convenience.
It behaves essentially like the above function.
Definition at line 95 of file area.cpp.
| bool NormalizedRect::intersects |
( |
double |
left, |
|
|
double |
top, |
|
|
double |
right, |
|
|
double |
bottom | |
|
) |
| | const |
Returns whether the normalized rectangle intersects an other normalized rectangle, which is defined by left, top, right and bottom.
Definition at line 100 of file area.cpp.
| QRect NormalizedRect::geometry |
( |
int |
xScale, |
|
|
int |
yScale | |
|
) |
| | const |
Returns the rectangle that accrues when the normalized rectangle is multiplyed with the scaling xScale and yScale.
Definition at line 150 of file area.cpp.
Returns the normalized bounding rectangle of the normalized rectangle combined with the other normalized rectangle.
Definition at line 105 of file area.cpp.
Sets the normalized rectangle to the normalized bounding rectangle of itself combined with the other normalized rectangle.
Definition at line 116 of file area.cpp.
| bool NormalizedRect::operator== |
( |
const NormalizedRect & |
other |
) |
const |
Returns whether the normalized rectangle is equal to the other normalized rectangle.
Definition at line 134 of file area.cpp.
| void NormalizedRect::transform |
( |
const QMatrix & |
matrix |
) |
|
Transforms the normalized rectangle with the operations defined by matrix.
Definition at line 160 of file area.cpp.
Member Data Documentation
The normalized left coordinate.
Definition at line 194 of file area.h.
The normalized top coordinate.
Definition at line 199 of file area.h.
The normalized right coordinate.
Definition at line 204 of file area.h.
The normalized bottom coordinate.
Definition at line 209 of file area.h.
The documentation for this class was generated from the following files: