okular
Okular::NormalizedPoint Class Reference
NormalizedPoint is a helper class which stores the coordinates of a normalized point. More...
#include <area.h>
Public Member Functions | |
| NormalizedPoint () | |
| NormalizedPoint (double x, double y) | |
| NormalizedPoint (int x, int y, int xScale, int yScale) | |
| NormalizedPoint & | operator= (const NormalizedPoint &) |
| void | transform (const QMatrix &matrix) |
Public Attributes | |
| double | x |
| double | y |
Detailed Description
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Normalized means that the coordinates are between 0 and 1 so that it is page size independent.
Example: The normalized point is (0.5, 0.3)
If you want to draw it on a 800x600 page, just multiply the x coordinate (0.5) with the page width (800) and the y coordinate (0.3) with the page height (600), so the point will be drawn on the page at (400, 180).
That allows you to zoom the page by just multiplying the normalized points with the zoomed page size.
Definition at line 45 of file area.h.
Constructor & Destructor Documentation
| NormalizedPoint::NormalizedPoint | ( | ) |
| NormalizedPoint::NormalizedPoint | ( | double | x, | |
| double | y | |||
| ) |
| NormalizedPoint::NormalizedPoint | ( | int | x, | |
| int | y, | |||
| int | xScale, | |||
| int | yScale | |||
| ) |
Member Function Documentation
| NormalizedPoint & NormalizedPoint::operator= | ( | const NormalizedPoint & | p | ) |
| void NormalizedPoint::transform | ( | const QMatrix & | matrix | ) |
Member Data Documentation
| double Okular::NormalizedPoint::x |
| double Okular::NormalizedPoint::y |
The documentation for this class was generated from the following files:
KDE 4.0 API Reference