Okular
area.cpp
66 * @brief Calculates distance of the point @p x @p y @p xScale @p yScale to the line segment from @p start to @p end
68double NormalizedPoint::distanceSqr(double x, double y, double xScale, double yScale, const NormalizedPoint &start, const NormalizedPoint &end)
228 str << "[" <<r.left() << "," << r.top() << "] x "<< "[" <<r.right() << "," << r.bottom() << "]";
271 str.nospace() << "NormRect(" << r.left << "," << r.top << " x " << (r.right - r.left) << "+" << (r.bottom - r.top) << ")";
314ObjectRect::ObjectRect(double l, double t, double r, double b, bool ellipse, ObjectType type, void *object)
390 return NormalizedRect(rect.x(), rect.y(), rect.right(), rect.bottom()).distanceSqr(x, y, xScale, yScale);
497NonOwningObjectRect::NonOwningObjectRect(double left, double top, double right, double bottom, bool ellipse, ObjectType type, void *object)
bool contains(double x, double y, double xScale, double yScale) const override
Returns whether the annotation object rectangle contains the point x, y for the scaling factor xScale...
Definition area.cpp:451
AnnotationObjectRect(Annotation *annotation)
Creates a new annotation object rectangle with the given annotation.
Definition area.cpp:427
Annotation * annotation() const
Returns the annotation object of the annotation object rectangle.
Definition area.cpp:433
QRect boundingRect(double xScale, double yScale) const override
Returns the bounding rect of the annotation object rectangle for the scaling factor xScale and yScale...
Definition area.cpp:438
void transform(const QTransform &matrix) override
Transforms the annotation object rectangle with the operations defined by matrix.
Definition area.cpp:463
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:160
Annotation struct holds properties shared by all annotations.
Definition annotations.h:99
HighlightAreaRect(const RegularAreaRect *area=nullptr)
Creates a new highlight area rect with the coordinates of the given area.
Definition area.cpp:299
NonOwningObjectRect(double left, double top, double right, double bottom, bool ellipse, ObjectType type, void *object)
class NonOwningObjectRect
Definition area.cpp:497
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition area.h:117
double distanceSqr(double x, double y, double xScale, double yScale) const
Returns squared distance to normalized point (x, y) on a reference area of size xScale x yScale.
Definition area.cpp:51
NormalizedPoint & operator=(const NormalizedPoint &)
void transform(const QTransform &matrix)
Transforms the normalized point with the operations defined by matrix.
Definition area.cpp:42
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition area.h:189
bool operator==(const NormalizedRect &other) const
Returns whether the normalized rectangle is equal to the other normalized rectangle.
Definition area.cpp:215
double distanceSqr(double x, double y, double xScale, double yScale) const
Returns the squared distance of the normalized point (x, y) to the closest edge, or 0 if the point is...
Definition area.h:387
NormalizedRect & operator=(const NormalizedRect &other)
NormalizedRect operator&(const NormalizedRect &other) const
Returns the intersection of this normalized rectangle with the specified other.
Definition area.cpp:199
NormalizedRect & operator|=(const NormalizedRect &other)
Sets the normalized rectangle to the normalized bounding rectangle of itself combined with the other ...
Definition area.cpp:190
bool contains(double x, double y) const
Returns whether the normalized rectangle contains the normalized point (x, y).
Definition area.cpp:160
static NormalizedRect fromQRectF(const QRectF &rect)
Build a normalized rect from a QRectF, which already has normalized coordinates.
Definition area.cpp:144
bool intersects(const NormalizedRect &other) const
Returns whether the normalized rectangle intersects the other normalized rectangle.
Definition area.cpp:165
QRectF geometryF(float xScale, float yScale) const
Same functionality as geometry, but nothing is converted into int.
Definition area.cpp:246
QRect geometry(int xScale, int yScale) const
Returns the rectangle mapped to a reference area of xScale x yScale.
Definition area.cpp:232
QRect roundedGeometry(int xScale, int yScale) const
Same functionality as geometry, but the output is now rounded before typecasting to int.
Definition area.cpp:239
NormalizedRect operator|(const NormalizedRect &other) const
Returns the normalized bounding rectangle of the normalized rectangle combined with the other normali...
Definition area.cpp:180
void transform(const QTransform &matrix)
Transforms the normalized rectangle with the operations defined by matrix.
Definition area.cpp:253
bool isNull() const
Returns whether this normalized rectangle is a null normalized rect.
Definition area.cpp:155
An area with normalized coordinates that contains a reference to an object.
Definition area.h:458
ObjectType objectType() const
Returns the object type of the object rectangle.
Definition area.cpp:352
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:367
ObjectRect(double left, double top, double right, double bottom, bool ellipse, ObjectType type, void *object)
Creates a new object rectangle.
Definition area.cpp:314
const void * object() const
Returns the storable object of the object rectangle.
Definition area.cpp:357
const QPainterPath & region() const
Returns the region that is covered by the object rectangle.
Definition area.cpp:362
virtual bool contains(double x, double y, double xScale, double yScale) const
Returns whether the object rectangle contains the point with absolute coordinates (x,...
Definition area.cpp:374
double distanceSqr(double x, double y, double xScale, double yScale) const
Returns the squared distance between the object and the point with normalized coordinates (x,...
Definition area.cpp:384
virtual void transform(const QTransform &matrix)
Transforms the object rectangle with the operations defined by matrix.
Definition area.cpp:379
This is a list of NormalizedRect, to describe an area consisting of multiple rectangles using normali...
Definition area.h:927
An area with normalized coordinates, consisting of NormalizedShape objects.
Definition area.h:665
This class describes the object rectangle for a source reference.
Definition area.h:599
SourceRefObjectRect(const NormalizedPoint &point, void *srcRef)
Creates a new source reference object rectangle.
Definition area.cpp:470
bool contains(double x, double y, double xScale, double yScale) const override
Returns whether the source reference object rectangle contains the point x, y for the scaling factor ...
Definition area.cpp:490
QRect boundingRect(double xScale, double yScale) const override
Returns the bounding rect of the source reference object rectangle for the scaling factor xScale and ...
Definition area.cpp:482
Q_SCRIPTABLE Q_NOREPLY void start()
QDebug & nospace()
QDebug & space()
ConstIterator
void append(QList< T > &&value)
iterator begin()
iterator end()
QList< T > & operator=(QList< T > &&other)
void addEllipse(const QPointF ¢er, qreal rx, qreal ry)
void addPolygon(const QPolygonF &polygon)
void addRect(const QRectF &rectangle)
QRectF boundingRect() const const
bool contains(const QPainterPath &p) const const
QPoint center() const const
bool contains(const QPoint &point, bool proper) const const
qreal bottom() const const
qreal height() const const
qreal left() const const
QRectF normalized() const const
qreal right() const const
qreal top() const const
qreal width() const const
qreal x() const const
qreal y() const const
QLine map(const QLine &l) const const
QRect mapRect(const QRect &rectangle) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:46:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:46:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.