Okular::HighlightAnnotation::Quad

Search for usage in LXR

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 1156 of file annotations.h.

Constructor & Destructor Documentation

HighlightAnnotation::Quad::Quad ( )

Creates a new quad.

Definition at line 1817 of file annotations.cpp.

HighlightAnnotation::Quad::~Quad ( )

Destroys the quad.

Definition at line 1822 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 1880 of file annotations.cpp.

bool HighlightAnnotation::Quad::capStart ( ) const

Returns whether a cap should be used at the start.

Definition at line 1870 of file annotations.cpp.

double HighlightAnnotation::Quad::feather ( ) const

Returns the width of the drawing feather.

Definition at line 1890 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 1849 of file annotations.cpp.

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

Sets whether a cap should be used at the end.

Definition at line 1875 of file annotations.cpp.

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

Sets whether a cap should be used at the start.

Definition at line 1865 of file annotations.cpp.

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

Sets the width of the drawing feather.

Definition at line 1885 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 1841 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 1895 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 1857 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-2021 The KDE developers.
Generated on Fri Jun 18 2021 22:35:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.