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

okular

  • Okular
  • Okular::NormalizedRect
Public Member Functions | Static Public Member Functions | Public Attributes

Okular::NormalizedRect Class Reference

NormalizedRect is a helper class which stores the coordinates of a normalized rect, which is a rectangle of. More...

#include <area.h>

List of all members.

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

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.


Constructor & Destructor Documentation

NormalizedRect::NormalizedRect (  ) 

Creates a null normalized rectangle.

class NormalizedRect

See also:
isNull()

Definition at line 56 of file area.cpp.

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.

NormalizedRect::NormalizedRect ( const NormalizedRect &  rect  ) 

Definition at line 67 of file area.cpp.


Member Function Documentation

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.

NormalizedRect NormalizedRect::fromQRectF ( const QRectF &  rect  )  [static]

Build a normalized rect from a QRectF.

Definition at line 70 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.

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.

bool NormalizedRect::isNull (  )  const

Returns whether this normalized rectangle is a null normalized rect.

Definition at line 80 of file area.cpp.

NormalizedRect & NormalizedRect::operator= ( const NormalizedRect &  other  ) 

Definition at line 125 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.

NormalizedRect NormalizedRect::operator| ( const NormalizedRect &  other  )  const

Returns the normalized bounding rectangle of the normalized rectangle combined with the other normalized rectangle.

Definition at line 105 of file area.cpp.

NormalizedRect & NormalizedRect::operator|= ( const NormalizedRect &  other  ) 

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.

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

double Okular::NormalizedRect::bottom

The normalized bottom coordinate.

Definition at line 209 of file area.h.

double Okular::NormalizedRect::left

The normalized left coordinate.

Definition at line 194 of file area.h.

double Okular::NormalizedRect::right

The normalized right coordinate.

Definition at line 204 of file area.h.

double Okular::NormalizedRect::top

The normalized top coordinate.

Definition at line 199 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