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
 
int width () const
 

Detailed Description

An image in a PDF document.

Definition at line 72 of file pdfimage.h.

Member Typedef Documentation

◆ LoadingHints

Definition at line 104 of file pdfimage.h.

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 99 of file pdfimage.h.

Property Documentation

◆ height

int KItinerary::PdfImage::height
read

Definition at line 76 of file pdfimage.h.

◆ width

int KItinerary::PdfImage::width
read

Definition at line 75 of file pdfimage.h.

Constructor & Destructor Documentation

◆ PdfImage()

PdfImage::PdfImage ( )

Definition at line 192 of file pdfimage.cpp.

Member Function Documentation

◆ applyAspectRatioTransform()

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

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 273 of file pdfimage.cpp.

◆ hasAspectRatioTransform()

bool PdfImage::hasAspectRatioTransform ( ) const

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 268 of file pdfimage.cpp.

◆ hasObjectId()

bool PdfImage::hasObjectId ( ) const

Returns whether this image has an object id.

Vector graphic "images" don't have that.

Definition at line 248 of file pdfimage.cpp.

◆ height()

int PdfImage::height ( ) const

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

Definition at line 201 of file pdfimage.cpp.

◆ image()

QImage PdfImage::image ( ) const

The source image without display transformations applied.

Definition at line 237 of file pdfimage.cpp.

◆ isVectorImage()

bool PdfImage::isVectorImage ( ) const

Returns whether this is a raster or vector image.

Definition at line 258 of file pdfimage.cpp.

◆ objectId()

PdfImageRef PdfImage::objectId ( ) const

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 253 of file pdfimage.cpp.

◆ pathElementsCount()

int PdfImage::pathElementsCount ( ) const

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

Definition at line 263 of file pdfimage.cpp.

◆ setLoadingHints()

void PdfImage::setLoadingHints ( LoadingHints hints)

Sets image loading hints.

Definition at line 232 of file pdfimage.cpp.

◆ sourceHeight()

int PdfImage::sourceHeight ( ) const

Height of the source image.

Definition at line 217 of file pdfimage.cpp.

◆ sourceWidth()

int PdfImage::sourceWidth ( ) const

Width of the source image.

Definition at line 222 of file pdfimage.cpp.

◆ transform()

QTransform PdfImage::transform ( ) const

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

Values are 1/72 inch.

Definition at line 227 of file pdfimage.cpp.

◆ width()

int PdfImage::width ( ) const

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

Definition at line 209 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 Tue Mar 26 2024 11:14:49 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.