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 &)
 
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 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.

Member Function Documentation

◆ hasObjectId()

bool PdfImage::hasObjectId ( ) const

Returns whether this image has an object id.

Vector graphic "images" don't have that.

Definition at line 242 of file pdfimage.cpp.

◆ height()

int KItinerary::PdfImage::height ( ) const

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

◆ image()

QImage PdfImage::image ( ) const

The source image with display transformations applied.

Definition at line 229 of file pdfimage.cpp.

◆ isVectorImage()

bool PdfImage::isVectorImage ( ) const

Returns whether this is a raster or vector image.

Definition at line 252 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 247 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 257 of file pdfimage.cpp.

◆ setLoadingHints()

void PdfImage::setLoadingHints ( LoadingHints  hints)

Sets image loading hints.

Definition at line 224 of file pdfimage.cpp.

◆ sourceHeight()

int PdfImage::sourceHeight ( ) const

Height of the source image.

Definition at line 209 of file pdfimage.cpp.

◆ sourceWidth()

int PdfImage::sourceWidth ( ) const

Width of the source image.

Definition at line 214 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 219 of file pdfimage.cpp.

◆ width()

int KItinerary::PdfImage::width ( ) const

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


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 04:00:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.