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

okular

  • Okular
  • NormalizedPoint
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Okular::NormalizedPoint Class Reference

#include <area.h>

Public Member Functions

 NormalizedPoint ()
 
 NormalizedPoint (double x, double y)
 
 NormalizedPoint (int x, int y, int xScale, int yScale)
 
double distanceSqr (double x, double y, double xScale, double yScale) const
 
NormalizedPoint & operator= (const NormalizedPoint &)
 
void transform (const QTransform &matrix)
 

Static Public Member Functions

static double distanceSqr (double x, double y, double xScale, double yScale, const NormalizedPoint &start, const NormalizedPoint &end)
 

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 47 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

double NormalizedPoint::distanceSqr ( double  x,
double  y,
double  xScale,
double  yScale 
) const

Returns squared distance to point x y xScale yScale.

Since
0.17 (KDE 4.11)

Definition at line 52 of file area.cpp.

double NormalizedPoint::distanceSqr ( double  x,
double  y,
double  xScale,
double  yScale,
const NormalizedPoint &  start,
const NormalizedPoint &  end 
)
static

Calculates distance of the point x y xScale yScale to the line segment from start to end.

Since
0.17 (KDE 4.11)

Definition at line 69 of file area.cpp.

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

Definition at line 36 of file area.cpp.

void NormalizedPoint::transform ( const QTransform &  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 92 of file area.h.

double Okular::NormalizedPoint::y

The normalized y coordinate.

Definition at line 97 of file area.h.


The documentation for this class was generated from the following files:
  • area.h
  • area.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

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

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal