• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdegraphics
  • Sitemap
  • Contact Us
 

okular

  • Okular
  • Okular::NormalizedPoint
Public Member Functions | Public Attributes

Okular::NormalizedPoint Class Reference

NormalizedPoint is a helper class which stores the coordinates of a normalized point. More...

#include <area.h>

List of all members.

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 (  ) 

Creates a new empty normalized point.

class NormalizedPoint

Definition at line 27 of file area.cpp.

NormalizedPoint::NormalizedPoint ( double  x,
double  y 
)

Creates a new normalized point with the normalized coordinates (x, y ).

Definition at line 30 of file area.cpp.

NormalizedPoint::NormalizedPoint ( int  x,
int  y,
int  xScale,
int  yScale 
)

Creates a new normalized point with the coordinates (x, y) which are normalized by the scaling factors xScale and yScale.

Definition at line 33 of file area.cpp.


Member Function Documentation

NormalizedPoint & NormalizedPoint::operator= ( const NormalizedPoint &  p  ) 

Definition at line 36 of file area.cpp.

void NormalizedPoint::transform ( const QMatrix &  matrix  ) 

Transforms the normalized point with the operations defined by matrix.

Definition at line 43 of file area.cpp.


Member Data Documentation

double Okular::NormalizedPoint::x

The normalized x coordinate.

Definition at line 77 of file area.h.

double Okular::NormalizedPoint::y

The normalized y coordinate.

Definition at line 82 of file area.h.


The documentation for this class was generated from the following files:
  • area.h
  • area.cpp

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdegraphics

Skip menu "kdegraphics"
  • okular
Generated for kdegraphics by doxygen 1.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal