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

Constructor & Destructor Documentation

◆ Quad() [1/2]

HighlightAnnotation::Quad::Quad ( )

Creates a new quad.

Definition at line 1969 of file annotations.cpp.

◆ ~Quad()

HighlightAnnotation::Quad::~Quad ( )

Destroys the quad.

Definition at line 1974 of file annotations.cpp.

◆ Quad() [2/2]

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

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

◆ capStart()

bool HighlightAnnotation::Quad::capStart ( ) const

Returns whether a cap should be used at the start.

Definition at line 2026 of file annotations.cpp.

◆ feather()

double HighlightAnnotation::Quad::feather ( ) const

Returns the width of the drawing feather.

Definition at line 2046 of file annotations.cpp.

◆ operator=()

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

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

◆ setCapEnd()

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

Sets whether a cap should be used at the end.

Definition at line 2031 of file annotations.cpp.

◆ setCapStart()

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

Sets whether a cap should be used at the start.

Definition at line 2021 of file annotations.cpp.

◆ setFeather()

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

Sets the width of the drawing feather.

Definition at line 2041 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 1994 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 2051 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 2012 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 Mon Nov 18 2024 12:14:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.