Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
 
QPdfEngine::ColorModel colorModel
 
QHash< QFontEngine::FaceId, QFontSubset * > fonts
 
QPaintDevicepdev
 
QIODeviceoutDevice
 
bool ownsDevice
 
QString outputFileName
 
QString title
 
QString creator
 
bool embedFonts
 
int resolution
 
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 212 of file qpdf_p.h.

Constructor & Destructor Documentation

◆ QPdfEnginePrivate()

QPdfEnginePrivate::QPdfEnginePrivate ( )

Definition at line 1431 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 1539 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 2901 of file qpdf.cpp.

References QList< T >::append(), 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 3024 of file qpdf.cpp.

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

Referenced by addBrushPattern().

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

◆ drawTextItem()

◆ newPage()

void QPdfEnginePrivate::newPage ( )

Definition at line 3390 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 3378 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 219 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 1546 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 2220 of file qpdf.cpp.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ allClipped

bool QPdfEnginePrivate::allClipped

Definition at line 244 of file qpdf_p.h.

◆ brush

QBrush QPdfEnginePrivate::brush

Definition at line 240 of file qpdf_p.h.

◆ brushOrigin

QPointF QPdfEnginePrivate::brushOrigin

Definition at line 239 of file qpdf_p.h.

Referenced by addBrushPattern().

◆ clipEnabled

bool QPdfEnginePrivate::clipEnabled

Definition at line 243 of file qpdf_p.h.

◆ clips

QList<QPainterPath> QPdfEnginePrivate::clips

Definition at line 242 of file qpdf_p.h.

◆ colorModel

QPdfEngine::ColorModel QPdfEnginePrivate::colorModel

Definition at line 251 of file qpdf_p.h.

Referenced by addImage(), and QPdfPrintEnginePrivate::printerColorMode().

◆ creator

QString QPdfEnginePrivate::creator

Definition at line 264 of file qpdf_p.h.

◆ currentObject

int QPdfEnginePrivate::currentObject

Definition at line 234 of file qpdf_p.h.

Referenced by QPdfEnginePrivate().

◆ currentPage

QPdfPage* QPdfEnginePrivate::currentPage

◆ embedFonts

bool QPdfEnginePrivate::embedFonts

Definition at line 265 of file qpdf_p.h.

Referenced by drawTextItem().

◆ fonts

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

Definition at line 253 of file qpdf_p.h.

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

◆ hasBrush

bool QPdfEnginePrivate::hasBrush

Definition at line 246 of file qpdf_p.h.

◆ hasPen

bool QPdfEnginePrivate::hasPen

Definition at line 245 of file qpdf_p.h.

◆ m_pageLayout

QPageLayout QPdfEnginePrivate::m_pageLayout

Definition at line 269 of file qpdf_p.h.

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

◆ needsTransform

bool QPdfEnginePrivate::needsTransform

Definition at line 248 of file qpdf_p.h.

◆ opacity

qreal QPdfEnginePrivate::opacity

Definition at line 249 of file qpdf_p.h.

Referenced by addBrushPattern().

◆ outDevice

◆ outputFileName

QString QPdfEnginePrivate::outputFileName

◆ ownsDevice

bool QPdfEnginePrivate::ownsDevice

Definition at line 259 of file qpdf_p.h.

◆ pdev

QPaintDevice* QPdfEnginePrivate::pdev

Definition at line 255 of file qpdf_p.h.

◆ pdfVersion

QPdfEngine::PdfVersion QPdfEnginePrivate::pdfVersion

Definition at line 250 of file qpdf_p.h.

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

◆ pen

QPen QPdfEnginePrivate::pen

Definition at line 241 of file qpdf_p.h.

Referenced by addBrushPattern().

◆ resolution

int QPdfEnginePrivate::resolution

◆ simplePen

bool QPdfEnginePrivate::simplePen

Definition at line 247 of file qpdf_p.h.

◆ stroker

QPdf::Stroker QPdfEnginePrivate::stroker

Definition at line 237 of file qpdf_p.h.

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

◆ title

QString QPdfEnginePrivate::title

Definition at line 263 of file qpdf_p.h.

Referenced by QCupsPrintEnginePrivate::closePrintDevice().


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