KItinerary::PdfImage

Search for usage in LXR

KItinerary::PdfImage Class Reference

#include <pdfimage.h>

Public Types

enum  LoadingHint { NoHint = 0 , AbortOnColorHint = 1 , ConvertToGrayscaleHint = 2 }
 
typedef QFlags< LoadingHintLoadingHints
 

Properties

int height
 
int width
 

Public Member Functions

 PdfImage (const PdfImage &)
 
QImage applyAspectRatioTransform (const QImage &image) const
 
bool hasAspectRatioTransform () const
 
bool hasObjectId () const
 
int height () const
 
QImage image () const
 
bool isVectorImage () const
 
PdfImageRef objectId () const
 
PdfImageoperator= (const PdfImage &)
 
int pathElementsCount () const
 
void setLoadingHints (LoadingHints hints)
 
int sourceHeight () const
 
int sourceWidth () const
 
QTransform transform () const
 
PdfImageType type () const
 
int width () const
 

Detailed Description

An image in a PDF document.

Definition at line 73 of file pdfimage.h.

Member Typedef Documentation

◆ LoadingHints

Member Enumeration Documentation

◆ LoadingHint

Hints for loading image data.

Enumerator
NoHint 

Load image data as-is. The default.

AbortOnColorHint 

Abort loading when encountering a non black/white pixel, as a shortcut for barcode detection.

ConvertToGrayscaleHint 

Convert to QImage::Format_Grayscale8 during loading. More efficient than converting later if all you need is grayscale.

Definition at line 100 of file pdfimage.h.

Property Documentation

◆ height

int KItinerary::PdfImage::height
read

Definition at line 77 of file pdfimage.h.

◆ width

int KItinerary::PdfImage::width
read

Definition at line 76 of file pdfimage.h.

Constructor & Destructor Documentation

◆ PdfImage()

PdfImage::PdfImage ( )

Definition at line 138 of file pdfimage.cpp.

Member Function Documentation

◆ applyAspectRatioTransform()

QImage PdfImage::applyAspectRatioTransform ( const QImage & image) const
nodiscard

Applies the aspect ratio changing part of the transform to the given image (which typically should be the one returned by image()).

Definition at line 219 of file pdfimage.cpp.

◆ hasAspectRatioTransform()

bool PdfImage::hasAspectRatioTransform ( ) const
nodiscard

Returns true if this image has an aspect-ratio changing transform.

That might need to be applied before doing barcode decoding for example.

Definition at line 214 of file pdfimage.cpp.

◆ hasObjectId()

bool PdfImage::hasObjectId ( ) const
nodiscard

Returns whether this image has an object id.

Vector graphic "images" don't have that.

Definition at line 194 of file pdfimage.cpp.

◆ height()

int PdfImage::height ( ) const
nodiscard

Height of the image in PDF 1/72 dpi coordinates.

Definition at line 147 of file pdfimage.cpp.

◆ image()

QImage PdfImage::image ( ) const
nodiscard

The source image without display transformations applied.

Definition at line 183 of file pdfimage.cpp.

◆ isVectorImage()

bool PdfImage::isVectorImage ( ) const
nodiscard

Returns whether this is a raster or vector image.

Definition at line 204 of file pdfimage.cpp.

◆ objectId()

PdfImageRef PdfImage::objectId ( ) const
nodiscard

PDF-internal unique identifier of this image.

Use this to detect multiple occurrences of the same image in different places, if that reduces e.g. computation cost.

Definition at line 199 of file pdfimage.cpp.

◆ pathElementsCount()

int PdfImage::pathElementsCount ( ) const
nodiscard

If this is a vector image, this returns the number of vector path elemets.

Definition at line 209 of file pdfimage.cpp.

◆ setLoadingHints()

void PdfImage::setLoadingHints ( LoadingHints hints)

Sets image loading hints.

Definition at line 178 of file pdfimage.cpp.

◆ sourceHeight()

int PdfImage::sourceHeight ( ) const
nodiscard

Height of the source image.

Definition at line 163 of file pdfimage.cpp.

◆ sourceWidth()

int PdfImage::sourceWidth ( ) const
nodiscard

Width of the source image.

Definition at line 168 of file pdfimage.cpp.

◆ transform()

QTransform PdfImage::transform ( ) const
nodiscard

Transformation from source image to final size/position on the page.

Values are 1/72 inch.

Definition at line 173 of file pdfimage.cpp.

◆ type()

PdfImageType PdfImage::type ( ) const
nodiscard

PDF image type.

Definition at line 224 of file pdfimage.cpp.

◆ width()

int PdfImage::width ( ) const
nodiscard

Width of the image in PDF 1/72 dpi coordinates.

Definition at line 155 of file pdfimage.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 Sat Dec 21 2024 16:56:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.