Okular::HighlightAnnotation::Quad

Okular::HighlightAnnotation::Quad Class Reference

#include <annotations.h>

Public Member Functions

 Quad ()
 
 Quad (const Quad &other)
 
 ~Quad ()
 
bool capEnd () const
 
bool capStart () const
 
double feather () const
 
Quadoperator= (const Quad &other)
 
NormalizedPoint point (int index) const
 
void setCapEnd (bool value)
 
void setCapStart (bool value)
 
void setFeather (double width)
 
void setPoint (const NormalizedPoint &point, int index)
 
void transform (const QTransform &matrix)
 
NormalizedPoint transformedPoint (int index) const
 

Detailed Description

Describes a highlight quad of a text markup annotation.

The Quad is a closed path of 4 NormalizedPoints. Another set of 4 NormalizedPoints can be generated with transform(), e. g. to get highlighting coordinates on a rotated PageViewItem. Additionally, Quad stores some geometry related style attributes.

To enable correct rendering of the annotation, the points 0 and 1 must describe the bottom edge of the quad (relative to the text orientation).

See also
NormalizedPoint

Definition at line 1157 of file annotations.h.

Constructor & Destructor Documentation

HighlightAnnotation::Quad::Quad ( )

Creates a new quad.

Definition at line 1820 of file annotations.cpp.

HighlightAnnotation::Quad::~Quad ( )

Destroys the quad.

Definition at line 1825 of file annotations.cpp.

Member Function Documentation

bool HighlightAnnotation::Quad::capEnd ( ) const

Returns whether a cap should be used at the end.

Definition at line 1883 of file annotations.cpp.

bool HighlightAnnotation::Quad::capStart ( ) const

Returns whether a cap should be used at the start.

Definition at line 1873 of file annotations.cpp.

double HighlightAnnotation::Quad::feather ( ) const

Returns the width of the drawing feather.

Definition at line 1893 of file annotations.cpp.

NormalizedPoint HighlightAnnotation::Quad::point ( int  index) const

Returns the normalized point at index.

index must be between 0 and 3.

Definition at line 1852 of file annotations.cpp.

void HighlightAnnotation::Quad::setCapEnd ( bool  value)

Sets whether a cap should be used at the end.

Definition at line 1878 of file annotations.cpp.

void HighlightAnnotation::Quad::setCapStart ( bool  value)

Sets whether a cap should be used at the start.

Definition at line 1868 of file annotations.cpp.

void HighlightAnnotation::Quad::setFeather ( double  width)

Sets the width of the drawing feather.

Definition at line 1888 of file annotations.cpp.

void HighlightAnnotation::Quad::setPoint ( const NormalizedPoint point,
int  index 
)

Sets the normalized point at index.

index must be between 0 and 3.

Definition at line 1844 of file annotations.cpp.

void HighlightAnnotation::Quad::transform ( const QTransform matrix)

Transforms the quad coordinates with the transformation defined by matrix.

The transformed coordinates will be accessible with transformedPoint(). The coordinates returned by point() are not affected.

Definition at line 1898 of file annotations.cpp.

NormalizedPoint HighlightAnnotation::Quad::transformedPoint ( int  index) const

Returns the transformed (e.g.

rotated) normalized point at index.

index must be between 0 and 3.

Definition at line 1860 of file annotations.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 2 2020 22:35:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.