Okular::NormalizedRect
#include <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 &)  
NormalizedPoint  center () const 
bool  contains (double x, double y) const 
double  distanceSqr (double x, double y, double xScale, double yScale) const 
QRect  geometry (int xScale, int yScale) const 
double  height () const 
bool  intersects (const NormalizedRect &other) const 
bool  intersects (const NormalizedRect *other) const 
bool  intersects (double left, double top, double right, double bottom) const 
bool  isBottom (const NormalizedPoint &pt) const 
bool  isBottomOrLevel (const NormalizedPoint &pt) const 
bool  isLeft (const NormalizedPoint &pt) const 
bool  isNull () const 
bool  isRight (const NormalizedPoint &pt) const 
bool  isTop (const NormalizedPoint &pt) const 
bool  isTopOrLevel (const NormalizedPoint &pt) const 
NormalizedRect  operator& (const NormalizedRect &other) const 
NormalizedRect &  operator= (const NormalizedRect &other) 
bool  operator== (const NormalizedRect &other) const 
NormalizedRect  operator (const NormalizedRect &other) const 
NormalizedRect &  operator= (const NormalizedRect &other) 
QRect  roundedGeometry (int xScale, int yScale) const 
void  transform (const QTransform &matrix) 
double  width () const 
Static Public Member Functions  
static NormalizedRect  fromQRectF (const QRectF &rect) 
Public Attributes  
double  bottom 
double  left 
double  right 
double  top 
Detailed Description
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
It describes a rectangular area on a reference area of undefined size. For more information about the normalized coordinate system, see NormalizedPoint.
In Okular, NormalizedRect can be used e. g. to describe bounding boxes of TextEntity objects, and the highlight area of text selections.
If you need to describe an area which consists of multiple rectangles, you can use RegularAreaRect instead.
 See also
 NormalizedPoint, RegularAreaRect, TextEntity
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
 Note
 The coordinates for
left
andtop
should be lower thanright
andbottom
, respectively. At negative width or height the behaviour of some operations is undefined.
NormalizedRect::NormalizedRect  (  const QRect &  rectangle, 
double  xScale,  
double  yScale  
) 
Creates a normalized rectangle from the given rectangle
on a reference area of size xScale
x yScale
.
 Note
 The rectangle should have positive width and height. You can use e. g. QRect::normalize() to ensure this. At negative width or height the behaviour of some operations is undefined.

default 
Member Function Documentation
NormalizedPoint NormalizedRect::center  (  )  const 
bool NormalizedRect::contains  (  double  x, 
double  y  
)  const 

inline 

static 
QRect NormalizedRect::geometry  (  int  xScale, 
int  yScale  
)  const 

inline 
bool NormalizedRect::intersects  (  const NormalizedRect &  other  )  const 
bool NormalizedRect::intersects  (  const NormalizedRect *  other  )  const 
bool NormalizedRect::intersects  (  double  left, 
double  top,  
double  right,  
double  bottom  
)  const 

inline 

inline 

inline 
bool NormalizedRect::isNull  (  )  const 

inline 

inline 

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

default 
bool NormalizedRect::operator==  (  const NormalizedRect &  other  )  const 
NormalizedRect NormalizedRect::operator  (  const NormalizedRect &  other  )  const 
NormalizedRect & NormalizedRect::operator=  (  const NormalizedRect &  other  ) 
QRect NormalizedRect::roundedGeometry  (  int  xScale, 
int  yScale  
)  const 
void NormalizedRect::transform  (  const QTransform &  matrix  ) 

inline 
Member Data Documentation
double Okular::NormalizedRect::bottom 
double Okular::NormalizedRect::left 
double Okular::NormalizedRect::right 
double Okular::NormalizedRect::top 
The documentation for this class was generated from the following files:
Documentation copyright © 19962020 The KDE developers.
Generated on Wed Sep 23 2020 22:36:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 19972006
KDE's Doxygen guidelines are available online.