okular
area.cpp
Go to the documentation of this file.
69 double NormalizedPoint::distanceSqr( double x, double y, double xScale, double yScale, const NormalizedPoint& start, const NormalizedPoint& end )
235 str << "[" <<r.left() << "," << r.top() << "] x "<< "[" <<r.right() << "," << r.bottom() << "]";
272 str.nospace() << "NormRect(" << r.left << "," << r.top << " x " << ( r.right - r.left ) << "+" << ( r.bottom - r.top ) << ")";
313 ObjectRect::ObjectRect( double l, double t, double r, double b, bool ellipse, ObjectType type, void * pnt )
387 return NormalizedRect( rect.x(), rect.y(), rect.right(), rect.bottom() ).distanceSqr( x, y, xScale, yScale );
424 kDebug(OkularDebug).nospace() << "Object deletion not implemented for type '" << m_objectType << "'.";
454 return boundingRect( xScale, yScale ).contains( (int)( x * xScale ), (int)( y * yScale ), false );
492 return distanceSqr( x, y, xScale, yScale ) < ( pow( 7.0 / xScale, 2 ) + pow( 7.0 / yScale, 2 ) );
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition: area.h:47
virtual QRect boundingRect(double xScale, double yScale) const
Returns the bounding rect of the object rectangle for the scaling factor xScale and yScale...
Definition: area.cpp:361
This class describes the object rectangle for a source reference.
Definition: area.h:474
RegularAreaRect & operator=(const RegularAreaRect &rar)
Definition: area.cpp:290
void transform(const QTransform &matrix)
Transforms the normalized rectangle with the operations defined by matrix.
Definition: area.cpp:259
NormalizedRect is a helper class which stores the coordinates of a normalized rect, which is a rectangle of.
Definition: area.h:105
NormalizedRect operator&(const NormalizedRect &other) const
Returns the intersection of this normalized rectangle with the specified other.
Definition: area.cpp:196
NormalizedRect & operator|=(const NormalizedRect &other)
Sets the normalized rectangle to the normalized bounding rectangle of itself combined with the other ...
Definition: area.cpp:187
const void * object() const
Returns the storable object of the object rectangle.
Definition: area.cpp:351
Definition: area.h:860
ObjectType objectType() const
Returns the object type of the object rectangle.
Definition: area.cpp:346
AnnotationObjectRect(Annotation *annotation)
Creates a new annotation object rectangle with the given annotation.
Definition: area.cpp:429
NormalizedRect operator|(const NormalizedRect &other) const
Returns the normalized bounding rectangle of the normalized rectangle combined with the other normali...
Definition: area.cpp:176
bool intersects(const NormalizedRect &other) const
Returns whether the normalized rectangle intersects the other normalized rectangle.
Definition: area.cpp:161
QDebug operator<<(QDebug str, const Okular::NormalizedPoint &p)
Debug operator for normalized point.
Definition: area.cpp:118
virtual void transform(const QTransform &matrix)
Transforms the annotation object rectangle with the operations defined by matrix. ...
Definition: area.cpp:464
static QRect annotationGeometry(const Annotation *annotation, double scaleX, double scaleY)
Returns the geometry of the given annotation scaled by scaleX and scaleY.
Definition: annotations.cpp:154
virtual bool contains(double x, double y, double xScale, double yScale) const
Returns whether the annotation object rectangle contains the point x, y for the scaling factor xScale...
Definition: area.cpp:452
ObjectRect(double left, double top, double right, double bottom, bool ellipse, ObjectType type, void *object)
Creates a new object rectangle.
Definition: area.cpp:313
bool contains(double x, double y) const
Returns whether the normalized rectangle contains the normalized coordinates x and y...
Definition: area.cpp:156
NormalizedRect & operator=(const NormalizedRect &other)
Definition: area.cpp:209
NormalizedPoint operator-(const NormalizedPoint &a, const NormalizedPoint &b)
Returns a vector from the given points a and b.
Definition: area.cpp:61
virtual bool contains(double x, double y, double xScale, double yScale) const
Returns whether the source reference object rectangle contains the point x, y for the scaling factor ...
Definition: area.cpp:490
A regular area of NormalizedShape which normalizes a Shape.
Definition: area.h:557
bool operator==(const NormalizedRect &other) const
Returns whether the normalized rectangle is equal to the other normalized rectangle.
Definition: area.cpp:218
virtual void transform(const QTransform &matrix)
Transforms the object rectangle with the operations defined by matrix.
Definition: area.cpp:374
double distanceSqr(double x, double y, double xScale, double yScale) const
Returns squared distance to point x y xScale yScale.
Definition: area.cpp:52
QRect roundedGeometry(int xScale, int yScale) const
Same functionality as geometry, but the output is now rounded before typecasting to int...
Definition: area.cpp:249
QRect geometry(int xScale, int yScale) const
Returns the rectangle that accrues when the normalized rectangle is multiplyed with the scaling xScal...
Definition: area.cpp:239
virtual QRect boundingRect(double xScale, double yScale) const
Returns the bounding rect of the annotation object rectangle for the scaling factor xScale and yScale...
Definition: area.cpp:439
virtual bool contains(double x, double y, double xScale, double yScale) const
Returns whether the object rectangle contains the point x, y for the scaling factor xScale and yScale...
Definition: area.cpp:369
double distanceSqr(double x, double y, double xScale, double yScale) const
Returns the square of the distance between the object and the point x, y for the scaling factor xScal...
Definition: area.cpp:379
Annotation struct holds properties shared by all annotations.
Definition: annotations.h:90
bool isNull() const
Returns whether this normalized rectangle is a null normalized rect.
Definition: area.cpp:151
HighlightAreaRect(const RegularAreaRect *area=0)
Creates a new highlight area rect with the coordinates of the given area.
Definition: area.cpp:297
Annotation * annotation() const
Returns the annotation object of the annotation object rectangle.
Definition: area.cpp:434
const QPainterPath & region() const
Returns the region that is covered by the object rectangle.
Definition: area.cpp:356
NormalizedPoint & operator=(const NormalizedPoint &)
Definition: area.cpp:36
static NormalizedRect fromQRectF(const QRectF &rect)
Build a normalized rect from a QRectF.
Definition: area.cpp:140
virtual QRect boundingRect(double xScale, double yScale) const
Returns the bounding rect of the source reference object rectangle for the scaling factor xScale and ...
Definition: area.cpp:482
void transform(const QTransform &matrix)
Transforms the normalized point with the operations defined by matrix.
Definition: area.cpp:43
SourceRefObjectRect(const NormalizedPoint &point, void *reference)
Creates a new source reference object rectangle.
Definition: area.cpp:471
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.