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

Constructor & Destructor Documentation

◆ Quad() [1/2]

HighlightAnnotation::Quad::Quad ( )

Creates a new quad.

Definition at line 1952 of file annotations.cpp.

◆ ~Quad()

HighlightAnnotation::Quad::~Quad ( )

Destroys the quad.

Definition at line 1957 of file annotations.cpp.

◆ Quad() [2/2]

HighlightAnnotation::Quad::Quad ( const Quad & other)

Definition at line 1962 of file annotations.cpp.

Member Function Documentation

◆ capEnd()

bool HighlightAnnotation::Quad::capEnd ( ) const

Returns whether a cap should be used at the end.

Definition at line 2019 of file annotations.cpp.

◆ capStart()

bool HighlightAnnotation::Quad::capStart ( ) const

Returns whether a cap should be used at the start.

Definition at line 2009 of file annotations.cpp.

◆ feather()

double HighlightAnnotation::Quad::feather ( ) const

Returns the width of the drawing feather.

Definition at line 2029 of file annotations.cpp.

◆ operator=()

HighlightAnnotation::Quad & HighlightAnnotation::Quad::operator= ( const Quad & other)

Definition at line 1968 of file annotations.cpp.

◆ point()

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

Returns the normalized point at index.

index must be between 0 and 3.

Definition at line 1986 of file annotations.cpp.

◆ setCapEnd()

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

Sets whether a cap should be used at the end.

Definition at line 2014 of file annotations.cpp.

◆ setCapStart()

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

Sets whether a cap should be used at the start.

Definition at line 2004 of file annotations.cpp.

◆ setFeather()

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

Sets the width of the drawing feather.

Definition at line 2024 of file annotations.cpp.

◆ setPoint()

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 1977 of file annotations.cpp.

◆ transform()

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 2034 of file annotations.cpp.

◆ transformedPoint()

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 1995 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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.