KItinerary::PdfImage
#include <pdfimage.h>
Public Types | |
enum | LoadingHint { NoHint = 0 , AbortOnColorHint = 1 , ConvertToGrayscaleHint = 2 } |
typedef QFlags< LoadingHint > | LoadingHints |
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 |
PdfImage & | operator= (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
Definition at line 105 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 100 of file pdfimage.h.
Property Documentation
◆ height
|
read |
Definition at line 77 of file pdfimage.h.
◆ 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()
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()
|
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()
|
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()
|
nodiscard |
Height of the image in PDF 1/72 dpi coordinates.
Definition at line 147 of file pdfimage.cpp.
◆ image()
|
nodiscard |
The source image without display transformations applied.
Definition at line 183 of file pdfimage.cpp.
◆ isVectorImage()
|
nodiscard |
Returns whether this is a raster or vector image.
Definition at line 204 of file pdfimage.cpp.
◆ objectId()
|
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()
|
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()
|
nodiscard |
Height of the source image.
Definition at line 163 of file pdfimage.cpp.
◆ sourceWidth()
|
nodiscard |
Width of the source image.
Definition at line 168 of file pdfimage.cpp.
◆ transform()
|
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()
|
nodiscard |
PDF image type.
Definition at line 224 of file pdfimage.cpp.
◆ width()
|
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:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.