Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QPdfEnginePrivate Class Reference

#include <qpdf_p.h>

+ Inheritance diagram for QPdfEnginePrivate:
+ Collaboration diagram for QPdfEnginePrivate:

Public Member Functions

 QPdfEnginePrivate ()
 
 ~QPdfEnginePrivate ()
 
uint requestObject ()
 
void writeHeader ()
 
void writeTail ()
 
int addImage (const QImage &image, bool *bitmap, bool lossless, qint64 serial_no)
 Adds an image to the pdf and return the pdf-object id.
 
int addConstantAlphaObject (int brushAlpha, int penAlpha=255)
 
int addBrushPattern (const QTransform &matrix, bool *specifyColor, int *gStateObject)
 
void drawTextItem (const QPointF &p, const QTextItemInt &ti)
 
QTransform pageMatrix () const
 
void newPage ()
 
- Public Member Functions inherited from QPaintEnginePrivate
 QPaintEnginePrivate ()
 
virtual ~QPaintEnginePrivate ()
 
void updateSystemClip ()
 
void setSystemTransform (const QTransform &xform)
 
void setSystemViewport (const QRegion &region)
 
void setSystemTransformAndViewport (const QTransform &xform, const QRegion &region)
 
virtual void systemStateChanged ()
 
void drawBoxTextItem (const QPointF &p, const QTextItemInt &ti)
 
virtual QPaintEngineaggregateEngine ()
 
virtual Qt::HANDLE nativeHandle ()
 

Public Attributes

int currentObject
 
QPdfPagecurrentPage
 
QPdf::Stroker stroker
 
QPointF brushOrigin
 
QBrush brush
 
QPen pen
 
QList< QPainterPathclips
 
bool clipEnabled
 
bool allClipped
 
bool hasPen
 
bool hasBrush
 
bool simplePen
 
bool needsTransform
 
qreal opacity
 
QPdfEngine::PdfVersion pdfVersion
 
QHash< QFontEngine::FaceId, QFontSubset * > fonts
 
QPaintDevicepdev
 
QIODeviceoutDevice
 
bool ownsDevice
 
QString outputFileName
 
QString title
 
QString creator
 
bool embedFonts
 
int resolution
 
bool grayscale
 
QPageLayout m_pageLayout
 
- Public Attributes inherited from QPaintEnginePrivate
QPaintDevicepdev
 
QPaintEngineq_ptr
 
QRegion baseSystemClip
 
QRegion systemClip
 
QRect systemRect
 
QRegion systemViewport
 
QTransform systemTransform
 
QPaintDevicecurrentClipDevice
 
uint hasSystemTransform: 1
 
uint hasSystemViewport: 1
 

Additional Inherited Members

- Static Public Member Functions inherited from QPaintEnginePrivate
static QPaintEnginePrivateget (QPaintEngine *paintEngine)
 

Detailed Description

Definition at line 204 of file qpdf_p.h.

Constructor & Destructor Documentation

◆ QPdfEnginePrivate()

QPdfEnginePrivate::QPdfEnginePrivate ( )

Definition at line 1454 of file qpdf.cpp.

References currentObject, currentPage, initResources(), resolution, QPdf::Stroker::stream, and stroker.

+ Here is the call graph for this function:

◆ ~QPdfEnginePrivate()

QPdfEnginePrivate::~QPdfEnginePrivate ( )

Definition at line 1560 of file qpdf.cpp.

References currentPage, fonts, and qDeleteAll().

+ Here is the call graph for this function:

Member Function Documentation

◆ addBrushPattern()

int QPdfEnginePrivate::addBrushPattern ( const QTransform matrix,
bool *  specifyColor,
int *  gStateObject 
)

◆ addConstantAlphaObject()

int QPdfEnginePrivate::addConstantAlphaObject ( int  brushAlpha,
int  penAlpha = 255 
)

Definition at line 2725 of file qpdf.cpp.

References QList< T >::append(), QByteArray::constData(), currentPage, QPdfPage::graphicStates, QListSpecialMethodsBase< T >::indexOf(), QHash< Key, T >::insert(), and QHash< Key, T >::value().

Referenced by addBrushPattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addImage()

int QPdfEnginePrivate::addImage ( const QImage img,
bool *  bitmap,
bool  lossless,
qint64  serial_no 
)

Adds an image to the pdf and return the pdf-object id.

Returns -1 if adding the image failed.

Definition at line 2848 of file qpdf.cpp.

References QByteArray::constData(), contains(), d, QByteArray::data(), QImage::fill(), QImage::Format_ARGB32, QImage::Format_Mono, QImage::Format_MonoLSB, QImage::Format_RGB32, grayscale, hasAlpha(), imageData, QHash< Key, T >::insert(), is_monochrome(), pdfVersion, qAlpha(), qBlue(), qGray(), qGreen(), qRed(), QRgb, QByteArray::resize(), rgb, QImageWriter::setQuality(), QImageWriter::supportedImageFormats(), QHash< Key, T >::value(), QPdfEngine::Version_A1b, Qt::white, and QImageWriter::write().

Referenced by addBrushPattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawTextItem()

void QPdfEnginePrivate::drawTextItem ( const QPointF p,
const QTextItemInt ti 
)

◆ newPage()

void QPdfEnginePrivate::newPage ( )

Definition at line 3183 of file qpdf.cpp.

References QList< T >::append(), currentPage, QPageLayout::fullRectPoints(), QPdf::generateMatrix(), QSize::isEmpty(), m_pageLayout, pageMatrix(), QPdfPage::pageSize, requestObject(), QRect::size(), QPdf::Stroker::stream, and stroker.

+ Here is the call graph for this function:

◆ pageMatrix()

QTransform QPdfEnginePrivate::pageMatrix ( ) const

Definition at line 3171 of file qpdf.cpp.

References QPageLayout::FullPageMode, QPageLayout::fullRectPoints(), QRect::height(), m_pageLayout, QPageLayout::mode(), QPageLayout::paintRectPixels(), resolution, and QTransform::translate().

Referenced by addBrushPattern(), drawTextItem(), and newPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requestObject()

uint QPdfEnginePrivate::requestObject ( )
inline

Definition at line 211 of file qpdf_p.h.

Referenced by drawTextItem(), newPage(), and writeHeader().

+ Here is the caller graph for this function:

◆ writeHeader()

void QPdfEnginePrivate::writeHeader ( )

Definition at line 1567 of file qpdf.cpp.

References QByteArray::isEmpty(), pdfVersion, requestObject(), and QPdfEngine::Version_A1b.

+ Here is the call graph for this function:

◆ writeTail()

void QPdfEnginePrivate::writeTail ( )

Definition at line 2135 of file qpdf.cpp.

References QList< T >::constLast(), QUuid::createUuid(), QCryptographicHash::hash(), i, QCryptographicHash::Md5, pdfVersion, QList< T >::size(), QByteArray::toHex(), QString::toLatin1(), QUuid::toString(), and QPdfEngine::Version_A1b.

+ Here is the call graph for this function:

Member Data Documentation

◆ allClipped

bool QPdfEnginePrivate::allClipped

Definition at line 236 of file qpdf_p.h.

◆ brush

QBrush QPdfEnginePrivate::brush

Definition at line 232 of file qpdf_p.h.

◆ brushOrigin

QPointF QPdfEnginePrivate::brushOrigin

Definition at line 231 of file qpdf_p.h.

Referenced by addBrushPattern().

◆ clipEnabled

bool QPdfEnginePrivate::clipEnabled

Definition at line 235 of file qpdf_p.h.

◆ clips

QList<QPainterPath> QPdfEnginePrivate::clips

Definition at line 234 of file qpdf_p.h.

◆ creator

QString QPdfEnginePrivate::creator

Definition at line 255 of file qpdf_p.h.

◆ currentObject

int QPdfEnginePrivate::currentObject

Definition at line 226 of file qpdf_p.h.

Referenced by QPdfEnginePrivate().

◆ currentPage

QPdfPage* QPdfEnginePrivate::currentPage

◆ embedFonts

bool QPdfEnginePrivate::embedFonts

Definition at line 256 of file qpdf_p.h.

Referenced by drawTextItem().

◆ fonts

QHash<QFontEngine::FaceId, QFontSubset *> QPdfEnginePrivate::fonts

Definition at line 244 of file qpdf_p.h.

Referenced by ~QPdfEnginePrivate(), and drawTextItem().

◆ grayscale

bool QPdfEnginePrivate::grayscale

Definition at line 258 of file qpdf_p.h.

Referenced by addImage().

◆ hasBrush

bool QPdfEnginePrivate::hasBrush

Definition at line 238 of file qpdf_p.h.

◆ hasPen

bool QPdfEnginePrivate::hasPen

Definition at line 237 of file qpdf_p.h.

◆ m_pageLayout

QPageLayout QPdfEnginePrivate::m_pageLayout

Definition at line 261 of file qpdf_p.h.

Referenced by QCupsPrintEnginePrivate::closePrintDevice(), newPage(), and pageMatrix().

◆ needsTransform

bool QPdfEnginePrivate::needsTransform

Definition at line 240 of file qpdf_p.h.

◆ opacity

qreal QPdfEnginePrivate::opacity

Definition at line 241 of file qpdf_p.h.

Referenced by addBrushPattern().

◆ outDevice

◆ outputFileName

QString QPdfEnginePrivate::outputFileName

◆ ownsDevice

bool QPdfEnginePrivate::ownsDevice

Definition at line 250 of file qpdf_p.h.

◆ pdev

QPaintDevice* QPdfEnginePrivate::pdev

Definition at line 246 of file qpdf_p.h.

◆ pdfVersion

QPdfEngine::PdfVersion QPdfEnginePrivate::pdfVersion

Definition at line 242 of file qpdf_p.h.

Referenced by addImage(), drawTextItem(), writeHeader(), and writeTail().

◆ pen

QPen QPdfEnginePrivate::pen

Definition at line 233 of file qpdf_p.h.

Referenced by addBrushPattern().

◆ resolution

int QPdfEnginePrivate::resolution

◆ simplePen

bool QPdfEnginePrivate::simplePen

Definition at line 239 of file qpdf_p.h.

◆ stroker

QPdf::Stroker QPdfEnginePrivate::stroker

Definition at line 229 of file qpdf_p.h.

Referenced by QPdfEnginePrivate(), drawTextItem(), and newPage().

◆ title

QString QPdfEnginePrivate::title

Definition at line 254 of file qpdf_p.h.

Referenced by QCupsPrintEnginePrivate::closePrintDevice().


The documentation for this class was generated from the following files: