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

#include <qpdf_p.h>

+ Inheritance diagram for QPdfEngine:
+ Collaboration diagram for QPdfEngine:

Public Types

enum  PdfVersion { Version_1_4 , Version_A1b , Version_1_6 }
 
- Public Types inherited from QPaintEngine
enum  PaintEngineFeature {
  PrimitiveTransform = 0x00000001 , PatternTransform = 0x00000002 , PixmapTransform = 0x00000004 , PatternBrush = 0x00000008 ,
  LinearGradientFill = 0x00000010 , RadialGradientFill = 0x00000020 , ConicalGradientFill = 0x00000040 , AlphaBlend = 0x00000080 ,
  PorterDuff = 0x00000100 , PainterPaths = 0x00000200 , Antialiasing = 0x00000400 , BrushStroke = 0x00000800 ,
  ConstantOpacity = 0x00001000 , MaskedBrush = 0x00002000 , PerspectiveTransform = 0x00004000 , BlendModes = 0x00008000 ,
  ObjectBoundingModeGradients = 0x00010000 , RasterOpModes = 0x00020000 , PaintOutsidePaintEvent = 0x20000000 , AllFeatures = 0xffffffff
}
 This enum is used to describe the features or capabilities that the paint engine has. More...
 
enum  DirtyFlag {
  DirtyPen = 0x0001 , DirtyBrush = 0x0002 , DirtyBrushOrigin = 0x0004 , DirtyFont = 0x0008 ,
  DirtyBackground = 0x0010 , DirtyBackgroundMode = 0x0020 , DirtyTransform = 0x0040 , DirtyClipRegion = 0x0080 ,
  DirtyClipPath = 0x0100 , DirtyHints = 0x0200 , DirtyCompositionMode = 0x0400 , DirtyClipEnabled = 0x0800 ,
  DirtyOpacity = 0x1000 , AllDirty = 0xffff
}
 \value DirtyPen The pen is dirty and needs to be updated. More...
 
enum  PolygonDrawMode { OddEvenMode , WindingMode , ConvexMode , PolylineMode }
 \value OddEvenMode The polygon should be drawn using OddEven fill rule. More...
 
enum  Type {
  X11 , Windows , QuickDraw , CoreGraphics ,
  MacPrinter , QWindowSystem , OpenGL , Picture ,
  SVG , Raster , Direct3D , Pdf ,
  OpenVG , OpenGL2 , PaintBuffer , Blitter ,
  Direct2D , User = 50 , MaxUser = 100
}
 \value X11 \value Windows \value MacPrinter \value CoreGraphics \macos's Quartz2D (CoreGraphics) \value QuickDraw \macos's QuickDraw \value QWindowSystem Qt for Embedded Linux \value OpenGL \value Picture QPicture format \value SVG Scalable Vector Graphics XML format \value Raster \value Direct3D Windows only, Direct3D based engine \value Pdf Portable Document Format \value OpenVG \value User First user type ID \value MaxUser Last user type ID \value OpenGL2 \value PaintBuffer \value Blitter \value Direct2D Windows only, Direct2D based engine More...
 

Public Member Functions

 QPdfEngine ()
 
 QPdfEngine (QPdfEnginePrivate &d)
 
 ~QPdfEngine ()
 
void setOutputFilename (const QString &filename)
 
void setResolution (int resolution)
 
int resolution () const
 
void setPdfVersion (PdfVersion version)
 
void setDocumentXmpMetadata (const QByteArray &xmpMetadata)
 
QByteArray documentXmpMetadata () const
 
void addFileAttachment (const QString &fileName, const QByteArray &data, const QString &mimeType)
 
bool begin (QPaintDevice *pdev) override
 Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.
 
bool end () override
 Reimplement this function to finish painting on the current paint device.
 
void drawPoints (const QPointF *points, int pointCount) override
 Draws the first pointCount points in the buffer points.
 
void drawLines (const QLineF *lines, int lineCount) override
 The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.
 
void drawRects (const QRectF *rects, int rectCount) override
 Draws the first rectCount rectangles in the buffer rects.
 
void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
void drawPath (const QPainterPath &path) override
 The default implementation ignores the path and does nothing.
 
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 This function draws the text item textItem at position p.
 
void drawPixmap (const QRectF &rectangle, const QPixmap &pixmap, const QRectF &sr) override
 Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
 
void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
 Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.
 
void drawTiledPixmap (const QRectF &rectangle, const QPixmap &pixmap, const QPointF &point) override
 Reimplement this function to draw the pixmap in the given rect, starting at the given p.
 
void drawHyperlink (const QRectF &r, const QUrl &url)
 
void updateState (const QPaintEngineState &state) override
 Reimplement this function to update the state of a paint engine.
 
int metric (QPaintDevice::PaintDeviceMetric metricType) const
 
Type type () const override
 Reimplement this function to return the paint engine \l{Type}.
 
bool newPage ()
 
void setPageLayout (const QPageLayout &pageLayout)
 
void setPageSize (const QPageSize &pageSize)
 
void setPageOrientation (QPageLayout::Orientation orientation)
 
void setPageMargins (const QMarginsF &margins, QPageLayout::Unit units=QPageLayout::Point)
 
QPageLayout pageLayout () const
 
void setPen ()
 
void setBrush ()
 
void setupGraphicsState (QPaintEngine::DirtyFlags flags)
 
- Public Member Functions inherited from QPaintEngine
 QPaintEngine (PaintEngineFeatures features=PaintEngineFeatures())
 Creates a paint engine with the featureset specified by caps.
 
virtual ~QPaintEngine ()
 Destroys the paint engine.
 
bool isActive () const
 Returns true if the paint engine is actively drawing; otherwise returns false.
 
void setActive (bool newState)
 Sets the active state of the paint engine to state.
 
virtual bool begin (QPaintDevice *pdev)=0
 Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.
 
virtual bool end ()=0
 Reimplement this function to finish painting on the current paint device.
 
virtual void updateState (const QPaintEngineState &state)=0
 Reimplement this function to update the state of a paint engine.
 
virtual void drawRects (const QRect *rects, int rectCount)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function.
 
virtual void drawRects (const QRectF *rects, int rectCount)
 Draws the first rectCount rectangles in the buffer rects.
 
virtual void drawLines (const QLine *lines, int lineCount)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this function.
 
virtual void drawLines (const QLineF *lines, int lineCount)
 The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.
 
virtual void drawEllipse (const QRectF &r)
 Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
 
virtual void drawEllipse (const QRect &r)
 The default implementation of this function calls the floating point version of this function.
 
virtual void drawPath (const QPainterPath &path)
 The default implementation ignores the path and does nothing.
 
virtual void drawPoints (const QPointF *points, int pointCount)
 Draws the first pointCount points in the buffer points.
 
virtual void drawPoints (const QPoint *points, int pointCount)
 Draws the first pointCount points in the buffer points.
 
virtual void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode)
 Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
virtual void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
 
virtual void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr)=0
 Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
 
virtual void drawTextItem (const QPointF &p, const QTextItem &textItem)
 This function draws the text item textItem at position p.
 
virtual void drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s)
 Reimplement this function to draw the pixmap in the given rect, starting at the given p.
 
virtual void drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
 Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.
 
void setPaintDevice (QPaintDevice *device)
 
QPaintDevicepaintDevice () const
 Returns the device that this engine is painting on, if painting is active; otherwise returns \nullptr.
 
void setSystemClip (const QRegion &baseClip)
 
QRegion systemClip () const
 
void setSystemRect (const QRect &rect)
 
QRect systemRect () const
 
virtual QPoint coordinateOffset () const
 
virtual Type type () const =0
 Reimplement this function to return the paint engine \l{Type}.
 
void fix_neg_rect (int *x, int *y, int *w, int *h)
 
bool testDirty (DirtyFlags df)
 
void setDirty (DirtyFlags df)
 
void clearDirty (DirtyFlags df)
 
bool hasFeature (PaintEngineFeatures feature) const
 Returns true if the paint engine supports the specified feature; otherwise returns false.
 
QPainterpainter () const
 Returns the paint engine's painter.
 
void syncState ()
 
bool isExtended () const
 
virtual QPixmap createPixmap (QSize size)
 
virtual QPixmap createPixmapFromImage (QImage image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 

Friends

class QPdfWriter
 

Additional Inherited Members

- Protected Member Functions inherited from QPaintEngine
 QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=PaintEngineFeatures())
 
- Protected Attributes inherited from QPaintEngine
QPaintEngineStatestate
 
PaintEngineFeatures gccaps
 
uint active: 1
 
uint selfDestruct: 1
 
uint extended: 1
 
QScopedPointer< QPaintEnginePrivated_ptr
 

Detailed Description

Definition at line 131 of file qpdf_p.h.

Member Enumeration Documentation

◆ PdfVersion

Enumerator
Version_1_4 
Version_A1b 
Version_1_6 

Definition at line 137 of file qpdf_p.h.

Constructor & Destructor Documentation

◆ QPdfEngine() [1/2]

QPdfEngine::QPdfEngine ( )

Definition at line 766 of file qpdf.cpp.

◆ QPdfEngine() [2/2]

QPdfEngine::QPdfEngine ( QPdfEnginePrivate d)

Definition at line 761 of file qpdf.cpp.

◆ ~QPdfEngine()

QPdfEngine::~QPdfEngine ( )
inline

Definition at line 146 of file qpdf_p.h.

Member Function Documentation

◆ addFileAttachment()

void QPdfEngine::addFileAttachment ( const QString fileName,
const QByteArray data,
const QString mimeType 
)

Definition at line 1554 of file qpdf.cpp.

References d, fileName, and mimeType.

◆ begin()

bool QPdfEngine::begin ( QPaintDevice pdev)
overridevirtual

Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.

Return true if the initialization was successful; otherwise return false.

See also
end(), isActive()

Implements QPaintEngine.

Reimplemented in QPdfPrintEngine.

Definition at line 1473 of file qpdf.cpp.

References d, file, newPage(), QFile::open(), QPaintEngine::setActive(), QIODeviceBase::Truncate, and QIODeviceBase::WriteOnly.

Referenced by QPdfPrintEngine::begin().

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

◆ documentXmpMetadata()

QByteArray QPdfEngine::documentXmpMetadata ( ) const

Definition at line 1372 of file qpdf.cpp.

References d.

◆ drawHyperlink()

void QPdfEngine::drawHyperlink ( const QRectF r,
const QUrl url 
)

Definition at line 1043 of file qpdf.cpp.

References QVarLengthArray< T, Prealloc >::append(), QRectF::bottom(), QVarLengthArray< T, Prealloc >::constData(), d, j, QRectF::left(), qt_real_to_string(), QVarLengthArray< T, Prealloc >::reserve(), QRectF::right(), QByteArray::size(), QUrl::toEncoded(), QRectF::top(), url, and Version_A1b.

+ Here is the call graph for this function:

◆ drawImage()

void QPdfEngine::drawImage ( const QRectF r,
const QImage pm,
const QRectF sr,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
overridevirtual

Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.

Reimplemented from QPaintEngine.

Definition at line 949 of file qpdf.cpp.

References QImage::cacheKey(), d, QPdf::generateMatrix(), QImage::height(), QRectF::height(), QRectF::isEmpty(), QPainter::LosslessImageRendering, QPaintEngine::painter(), qRound(), setBrush(), QPainter::testRenderHint(), QRectF::toRect(), Version_A1b, QImage::width(), QRectF::width(), QRectF::x(), and QRectF::y().

+ Here is the call graph for this function:

◆ drawLines()

void QPdfEngine::drawLines ( const QLineF lines,
int  lineCount 
)
overridevirtual

The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.

Reimplemented from QPaintEngine.

Definition at line 796 of file qpdf.cpp.

References d, drawPath(), i, p1, and p2.

+ Here is the call graph for this function:

◆ drawPath()

void QPdfEngine::drawPath ( const QPainterPath path)
overridevirtual

The default implementation ignores the path and does nothing.

Reimplemented from QPaintEngine.

Definition at line 878 of file qpdf.cpp.

References d, QPdf::FillAndStrokePath, QPdf::FillPath, QPdf::generatePath(), setBrush(), and QPdf::StrokePath.

Referenced by drawLines(), drawPoints(), drawPolygon(), and drawRects().

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

◆ drawPixmap()

void QPdfEngine::drawPixmap ( const QRectF r,
const QPixmap pm,
const QRectF sr 
)
overridevirtual

Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.

Implements QPaintEngine.

Definition at line 906 of file qpdf.cpp.

References QPixmap::cacheKey(), d, QPdf::generateMatrix(), QRectF::height(), QRectF::isEmpty(), QPainter::LosslessImageRendering, QPaintEngine::painter(), pixmap, qRound(), setBrush(), QPainter::testRenderHint(), QPixmap::toImage(), QRectF::toRect(), Version_A1b, QRectF::width(), QRectF::x(), and QRectF::y().

+ Here is the call graph for this function:

◆ drawPoints()

void QPdfEngine::drawPoints ( const QPointF points,
int  pointCount 
)
overridevirtual

Draws the first pointCount points in the buffer points.

Reimplemented from QPaintEngine.

Definition at line 778 of file qpdf.cpp.

References d, drawPath(), and i.

+ Here is the call graph for this function:

◆ drawPolygon()

void QPdfEngine::drawPolygon ( const QPointF points,
int  pointCount,
PolygonDrawMode  mode 
)
overridevirtual

Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.

Note
At least one of the drawPolygon() functions must be reimplemented.

Reimplemented from QPaintEngine.

Definition at line 842 of file qpdf.cpp.

References QPaintEngine::ConvexMode, d, drawPath(), i, Qt::OddEvenFill, QPaintEngine::OddEvenMode, QPaintEngine::PolylineMode, Qt::WindingFill, and QPaintEngine::WindingMode.

+ Here is the call graph for this function:

◆ drawRects()

void QPdfEngine::drawRects ( const QRectF rects,
int  rectCount 
)
overridevirtual

Draws the first rectCount rectangles in the buffer rects.

The default implementation of this function calls drawPath() or drawPolygon() depending on the feature set of the paint engine.

Reimplemented from QPaintEngine.

Definition at line 813 of file qpdf.cpp.

References d, drawPath(), QPdf::generateMatrix(), QRectF::height(), i, QRectF::width(), QRectF::x(), and QRectF::y().

Referenced by drawTiledPixmap().

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

◆ drawTextItem()

void QPdfEngine::drawTextItem ( const QPointF p,
const QTextItem textItem 
)
overridevirtual

This function draws the text item textItem at position p.

The default implementation of this function converts the text to a QPainterPath and paints the resulting path.

Reimplemented from QPaintEngine.

Definition at line 1013 of file qpdf.cpp.

References d, QPaintEngine::drawTextItem(), QTextItemInt::fontEngine, QPdf::generateMatrix(), QFontEngine::Multi, Q_ASSERT, setBrush(), QTransform::TxProject, and QFontEngine::type().

+ Here is the call graph for this function:

◆ drawTiledPixmap()

void QPdfEngine::drawTiledPixmap ( const QRectF rect,
const QPixmap pixmap,
const QPointF p 
)
overridevirtual

Reimplement this function to draw the pixmap in the given rect, starting at the given p.

The pixmap will be drawn repeatedly until the rect is filled.

Reimplemented from QPaintEngine.

Definition at line 983 of file qpdf.cpp.

References d, drawRects(), pixmap, and setBrush().

+ Here is the call graph for this function:

◆ end()

bool QPdfEngine::end ( )
overridevirtual

Reimplement this function to finish painting on the current paint device.

Return true if painting was finished successfully; otherwise return false.

See also
begin(), isActive()

Implements QPaintEngine.

Reimplemented in QPdfPrintEngine.

Definition at line 1529 of file qpdf.cpp.

References d, qDeleteAll(), and QPaintEngine::setActive().

Referenced by QPdfPrintEngine::end().

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

◆ metric()

int QPdfEngine::metric ( QPaintDevice::PaintDeviceMetric  metricType) const

Definition at line 1410 of file qpdf.cpp.

References d, QPaintDevice::devicePixelRatioFScale(), QPageLayout::Millimeter, QPaintDevice::PdmDepth, QPaintDevice::PdmDevicePixelRatio, QPaintDevice::PdmDevicePixelRatioScaled, QPaintDevice::PdmDpiX, QPaintDevice::PdmDpiY, QPaintDevice::PdmHeight, QPaintDevice::PdmHeightMM, QPaintDevice::PdmNumColors, QPaintDevice::PdmPhysicalDpiX, QPaintDevice::PdmPhysicalDpiY, QPaintDevice::PdmWidth, QPaintDevice::PdmWidthMM, qRound(), and qWarning.

Referenced by QPdfPrintEngine::metric().

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

◆ newPage()

bool QPdfEngine::newPage ( )

Definition at line 1329 of file qpdf.cpp.

References d, QPaintEngine::DirtyBrush, QPaintEngine::DirtyClipPath, QPaintEngine::DirtyPen, QFileDevice::error(), QPaintEngine::isActive(), QFileDevice::NoError, and setupGraphicsState().

Referenced by begin(), and QPdfPrintEngine::newPage().

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

◆ pageLayout()

QPageLayout QPdfEngine::pageLayout ( ) const

Definition at line 1403 of file qpdf.cpp.

References d.

Referenced by QPdfPagedPaintDevicePrivate::pageLayout(), setPageLayout(), QCupsPrintEngine::setProperty(), and QPdfPrintEngine::setProperty().

+ Here is the caller graph for this function:

◆ resolution()

int QPdfEngine::resolution ( ) const

Definition at line 1354 of file qpdf.cpp.

References d.

Referenced by setResolution().

+ Here is the caller graph for this function:

◆ setBrush()

void QPdfEngine::setBrush ( )

Definition at line 1293 of file qpdf.cpp.

References QColor::blueF(), d, QColor::greenF(), Qt::NoBrush, qGray(), QColor::redF(), and QColor::rgba().

Referenced by drawImage(), drawPath(), drawPixmap(), drawTextItem(), drawTiledPixmap(), and setupGraphicsState().

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

◆ setDocumentXmpMetadata()

void QPdfEngine::setDocumentXmpMetadata ( const QByteArray xmpMetadata)

Definition at line 1366 of file qpdf.cpp.

References d.

◆ setOutputFilename()

void QPdfEngine::setOutputFilename ( const QString filename)

Definition at line 771 of file qpdf.cpp.

References d.

◆ setPageLayout()

void QPdfEngine::setPageLayout ( const QPageLayout pageLayout)

Definition at line 1378 of file qpdf.cpp.

References d, and pageLayout().

Referenced by QPdfPagedPaintDevicePrivate::setPageLayout().

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

◆ setPageMargins()

void QPdfEngine::setPageMargins ( const QMarginsF margins,
QPageLayout::Unit  units = QPageLayout::Point 
)

Definition at line 1396 of file qpdf.cpp.

References d.

Referenced by QPdfPagedPaintDevicePrivate::setPageMargins().

+ Here is the caller graph for this function:

◆ setPageOrientation()

void QPdfEngine::setPageOrientation ( QPageLayout::Orientation  orientation)

Definition at line 1390 of file qpdf.cpp.

References d.

Referenced by QPdfPagedPaintDevicePrivate::setPageOrientation().

+ Here is the caller graph for this function:

◆ setPageSize()

void QPdfEngine::setPageSize ( const QPageSize pageSize)

Definition at line 1384 of file qpdf.cpp.

References d.

Referenced by QPdfPagedPaintDevicePrivate::setPageSize().

+ Here is the caller graph for this function:

◆ setPdfVersion()

void QPdfEngine::setPdfVersion ( PdfVersion  version)

Definition at line 1360 of file qpdf.cpp.

References d.

Referenced by QPdfPrintEngine::QPdfPrintEngine().

+ Here is the caller graph for this function:

◆ setPen()

void QPdfEngine::setPen ( )

Definition at line 1234 of file qpdf.cpp.

References Qt::BevelJoin, QColor::blueF(), d, Qt::FlatCap, QPdf::generateDashes(), QColor::greenF(), Qt::MiterJoin, Qt::NoPen, Q_ASSERT, qGray(), qMax(), QColor::redF(), QColor::rgba(), Qt::RoundCap, Qt::RoundJoin, Qt::SolidPattern, Qt::SquareCap, and Qt::SvgMiterJoin.

Referenced by setupGraphicsState().

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

◆ setResolution()

void QPdfEngine::setResolution ( int  resolution)

Definition at line 1348 of file qpdf.cpp.

References d, and resolution().

+ Here is the call graph for this function:

◆ setupGraphicsState()

void QPdfEngine::setupGraphicsState ( QPaintEngine::DirtyFlags  flags)

Definition at line 1165 of file qpdf.cpp.

References QPdf::ClipPath, d, QPaintEngine::DirtyBrush, QPaintEngine::DirtyClipPath, QPaintEngine::DirtyPen, QPaintEngine::DirtyTransform, QPdf::generateMatrix(), QPdf::generatePath(), i, setBrush(), and setPen().

Referenced by newPage(), and updateState().

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

◆ type()

QPaintEngine::Type QPdfEngine::type ( ) const
overridevirtual

Reimplement this function to return the paint engine \l{Type}.

Implements QPaintEngine.

Definition at line 1343 of file qpdf.cpp.

References QPaintEngine::Pdf.

◆ updateState()

void QPdfEngine::updateState ( const QPaintEngineState state)
overridevirtual

Reimplement this function to update the state of a paint engine.

When implemented, this function is responsible for checking the paint engine's current state and update the properties that are changed. Use the QPaintEngineState::state() function to find out which properties that must be updated, then use the corresponding \l {GetFunction}{get function} to retrieve the current values for the given properties.

See also
QPaintEngineState

Implements QPaintEngine.

Definition at line 1078 of file qpdf.cpp.

References QColor::alpha(), QPaintEngineState::brush(), QPen::brush(), QPaintEngineState::brushOrigin(), QPaintEngineState::clipOperation(), QPaintEngineState::clipPath(), QPaintEngineState::clipRegion(), QPen::color(), d, QPaintEngine::DirtyBrush, QPaintEngine::DirtyBrushOrigin, QPaintEngine::DirtyClipEnabled, QPaintEngine::DirtyClipPath, QPaintEngine::DirtyClipRegion, QPaintEngine::DirtyHints, QPaintEngine::DirtyOpacity, QPaintEngine::DirtyPen, QPaintEngine::DirtyTransform, QPaintEngineState::isClipEnabled(), QBrush::isOpaque(), Qt::NoBrush, Qt::NoPen, QPaintEngineState::opacity(), QPaintEngineState::pen(), rect, removeTransparencyFromBrush(), QPaintEngineState::renderHints(), QColor::setAlpha(), QPen::setBrush(), QPen::setColor(), setupGraphicsState(), Qt::SolidPattern, QPaintEngine::state, QPaintEngineState::state(), QBrush::style(), QPaintEngineState::transform(), and Version_A1b.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QPdfWriter

friend class QPdfWriter
friend

Definition at line 134 of file qpdf_p.h.


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