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

◆ ~Quad()

HighlightAnnotation::Quad::~Quad ( )

Destroys the quad.

Definition at line 1956 of file annotations.cpp.

◆ Quad() [2/2]

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

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

◆ capStart()

bool HighlightAnnotation::Quad::capStart ( ) const

Returns whether a cap should be used at the start.

Definition at line 2008 of file annotations.cpp.

◆ feather()

double HighlightAnnotation::Quad::feather ( ) const

Returns the width of the drawing feather.

Definition at line 2028 of file annotations.cpp.

◆ operator=()

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

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

◆ setCapEnd()

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

Sets whether a cap should be used at the end.

Definition at line 2013 of file annotations.cpp.

◆ setCapStart()

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

Sets whether a cap should be used at the start.

Definition at line 2003 of file annotations.cpp.

◆ setFeather()

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

Sets the width of the drawing feather.

Definition at line 2023 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 1976 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 2033 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 1994 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 Fri May 17 2024 11:54:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.