42 #ifndef QPAINTENGINE_MAC_P_H 43 #define QPAINTENGINE_MAC_P_H 56 #include "QtGui/qpaintengine.h" 57 #include "private/qt_mac_p.h" 58 #include "private/qpaintengine_p.h" 59 #include "private/qpolygonclipper_p.h" 60 #include "private/qfont_p.h" 61 #include "QtCore/qhash.h" 151 : hd(0), shading(0), stackCount(0), complexXForm(false), disabledSmoothFonts(false)
179 enum { CGStroke=0x01, CGEOFill=0x02, CGFill=0x04 };
184 void setStrokePen(
const QPen &pen);
185 inline void saveGraphicsState();
186 inline void restoreGraphicsState();
189 float adjustPenWidth(
float penWidth);
192 CGContextConcatCTM(hd, CGAffineTransformInvert(CGContextGetCTM(hd)));
193 CGAffineTransform xform = orig_xform;
198 CGContextConcatCTM(hd, xform);
199 CGContextSetTextMatrix(hd, xform);
206 CGContextSaveGState(hd);
213 CGContextRestoreGState(hd);
220 : mCG(cg), mWidth(width), mHeight(height), mBytesPerLine(bytesPerLine)
239 case PdmPhysicalDpiX:
242 case PdmPhysicalDpiY:
257 #endif // QPAINTENGINE_MAC_P_H bool supportsTransformations(qreal, const QTransform &) const
CGContextRef cgContext() const
const struct __CFString * CFStringRef
static CGColorSpaceRef macDisplayColorSpace(const QWidget *widget=0)
QCoreGraphicsPaintEnginePrivate()
static CGColorSpaceRef macGenericColorSpace()
static void cleanUpMacColorSpaces()
#define QT_END_NAMESPACE
This macro expands to.
bool end()
Reimplement this function to finish painting on the current paint device.
QPointer< QWidget > widget
friend void qt_color_profile_changed(CFNotificationCenterRef center, void *, CFStringRef, const void *, CFDictionaryRef)
CompositionMode
Defines the modes supported for digital image compositing.
The QLine class provides a two-dimensional vector using integer precision.
void drawEllipse(const QRect &r)
The default implementation of this function calls the floating point version of this function...
void drawPoints(const QPointF *p, int pointCount)
Draws the first pointCount points in the buffer points.
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
bool begin(QPaintDevice *pdev)
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
QPaintEngineState * state
void updateRenderHints(QPainter::RenderHints hints)
Q_GUI_EXPORT int qt_defaultDpiY()
virtual void drawRects(const QRect *rects, int rectCount)
The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF an...
Q_GUI_EXPORT int qt_defaultDpiX()
void updateClipPath(const QPainterPath &path, Qt::ClipOperation op)
The QPointF class defines a point in the plane using floating point precision.
void updatePen(const QPen &pen)
virtual void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the buffer points.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
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...
void updateBrush(const QBrush &brush, const QPointF &pt)
QPaintEngine * paintEngine() const
int metric(PaintDeviceMetric metric) const
CGContextRef handle() const
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void drawRects(const QRect *rects, int rectCount)
The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF an...
void updateClipRegion(const QRegion ®ion, Qt::ClipOperation op)
The QLineF class provides a two-dimensional vector using floating point precision.
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 re...
static void setClip(QPainter *painter, QGraphicsItem *item)
void drawPath(const QPainterPath &path)
The default implementation ignores the path and does nothing.
void drawEllipse(const QRectF &r)
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect...
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
void updateCompositionMode(QPainter::CompositionMode mode)
friend void qt_mac_display_change_callbk(CGDirectDisplayID, CGDisplayChangeSummaryFlags, void *)
void updateMatrix(const QTransform &matrix)
void drawTextItem(const QPointF &pos, const QTextItem &item)
This function draws the text item textItem at position p.
void drawLines(const QLine *lines, int lineCount)
The default implementation converts the first lineCount lines in lines to a QLineF and calls the floa...
void updateOpacity(qreal opacity)
QPainter::RenderHints supportedRenderHints() const
Q_CORE_EXPORT void qWarning(const char *,...)
static void clearColorSpace(QWidget *w)
The QImage class provides a hardware-independent image representation that allows direct access to th...
Type type() const
Reimplement this function to return the paint engine Type.
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 point...
The QRegion class specifies a clip region for a painter.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
void updateFont(const QFont &font)
void drawLines(const QLineF *lines, int lineCount)
The default implementation splits the list of lines in lines into lineCount separate calls to drawPat...
virtual void drawLines(const QLine *lines, int lineCount)
The default implementation converts the first lineCount lines in lines to a QLineF and calls the floa...
Q_CORE_EXPORT QTextStream & center(QTextStream &s)
~QCoreGraphicsPaintEngine()
void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QMacQuartzPaintDevice(CGContextRef cg, int width, int height, int bytesPerLine)
static QHash< QWidget *, CGColorSpaceRef > m_displayColorSpaceHash
struct CGColorSpace * CGColorSpaceRef
#define Q_DECLARE_PUBLIC(Class)
void drawPoints(const QPoint *p, int pointCount)
Draws the first pointCount points in the buffer points.
virtual void drawEllipse(const QRectF &r)
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect...
The QFont class specifies a font used for drawing text.
static CGColorSpaceRef m_genericColorSpace
The QPoint class defines a point in the plane using integer precision.
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
void drawRects(const QRectF *rects, int rectCount)
Draws the first rectCount rectangles in the buffer rects.
The QRect class defines a rectangle in the plane using integer precision.
CGAffineTransform qt_mac_convert_transform_to_cg(const QTransform &t)
void updateTransform(const QTransform &matrix)
The QPixmap class is an off-screen image representation that can be used as a paint device...
void updateState(const QPaintEngineState &state)
Reimplement this function to update the state of a paint engine.
void setTransform(const QTransform *matrix=0)
The QPaintEngineState class provides information about the active paint engine's current state...
static bool m_postRoutineRegistered
#define Q_DECLARE_PRIVATE(Class)
void restoreGraphicsState()
struct CGContext * CGContextRef
CGAffineTransform orig_xform
The QTextItem class provides all the information required to draw text in a custom paint engine...
QCoreGraphicsPaintEngine()
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r...