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
qpaintengine_mac.mm File Reference

(322ec07d0e831044e6bcc9b2021e826892627771)

#include <AppKit/AppKit.h>
#include <CoreGraphics/CoreGraphics.h>
#include "qpaintengine_mac_p.h"
#include "qprintengine_mac_p.h"
#include <qbitmap.h>
#include <qpaintdevice.h>
#include <qpainterpath.h>
#include <qpixmapcache.h>
#include <private/qpaintengine_raster_p.h>
#include <qprinter.h>
#include <qstack.h>
#include <qwidget.h>
#include <qvarlengtharray.h>
#include <qdebug.h>
#include <qcoreapplication.h>
#include <qmath.h>
#include <qpa/qplatformpixmap.h>
#include <private/qfont_p.h>
#include <private/qfontengine_p.h>
#include <private/qfontengine_coretext_p.h>
#include <private/qnumeric_p.h>
#include <private/qpainter_p.h>
#include <private/qpainterpath_p.h>
#include <private/qtextengine_p.h>
#include <private/qcoregraphics_p.h>
#include <string.h>
+ Include dependency graph for qpaintengine_mac.mm:

Go to the source code of this file.

Classes

class  QMacPattern
 
struct  qt_mac_cg_transform_path
 

Macros

#define QMACPATTERN_MASK_MULTIPLIER   32
 

Enumerations

enum  CGCompositeMode {
  kCGCompositeModeClear = 0 , kCGCompositeModeCopy = 1 , kCGCompositeModeSourceOver = 2 , kCGCompositeModeSourceIn = 3 ,
  kCGCompositeModeSourceOut = 4 , kCGCompositeModeSourceAtop = 5 , kCGCompositeModeDestinationOver = 6 , kCGCompositeModeDestinationIn = 7 ,
  kCGCompositeModeDestinationOut = 8 , kCGCompositeModeDestinationAtop = 9 , kCGCompositeModeXOR = 10 , kCGCompositeModePlusDarker = 11 ,
  kCGCompositeModePlusLighter = 12
}
 

Functions

QT_BEGIN_NAMESPACE void qt_mac_cgimage_data_free (void *, const void *memoryToFree, size_t)
 
CGImageRef qt_mac_create_imagemask (const QPixmap &pixmap, const QRectF &sr)
 
static float qt_mac_convert_color_to_cg (int c)
 
CGAffineTransform qt_mac_convert_transform_to_cg (const QTransform &t)
 
static QCFType< CGColorRef > cgColorForQColor (const QColor &col)
 
static CGRect qt_mac_compose_rect (const QRectF &r, float off=0)
 
static CGMutablePathRef qt_mac_compose_path (const QPainterPath &p, float off=0)
 
static void qt_mac_draw_pattern (void *info, CGContextRef c)
 
static void qt_mac_dispose_pattern (void *info)
 
static QPaintEngine::PaintEngineFeatures qt_mac_cg_features ()
 
void CGContextSetCompositeOperation (CGContextRef, int)
 
static const ucharqt_mac_patternForBrush (int brushStyle)
 
void qt_mac_cg_transform_path_apply (void *info, const CGPathElement *element)
 

Macro Definition Documentation

◆ QMACPATTERN_MASK_MULTIPLIER

#define QMACPATTERN_MASK_MULTIPLIER   32

Enumeration Type Documentation

◆ CGCompositeMode

Enumerator
kCGCompositeModeClear 
kCGCompositeModeCopy 
kCGCompositeModeSourceOver 
kCGCompositeModeSourceIn 
kCGCompositeModeSourceOut 
kCGCompositeModeSourceAtop 
kCGCompositeModeDestinationOver 
kCGCompositeModeDestinationIn 
kCGCompositeModeDestinationOut 
kCGCompositeModeDestinationAtop 
kCGCompositeModeXOR 
kCGCompositeModePlusDarker 
kCGCompositeModePlusLighter 

Definition at line 922 of file qpaintengine_mac.mm.

Function Documentation

◆ cgColorForQColor()

static QCFType< CGColorRef > cgColorForQColor ( const QColor & col)
inlinestatic

Definition at line 75 of file qpaintengine_mac.mm.

References QColor::alpha(), QColor::blue(), QColor::green(), qt_mac_convert_color_to_cg(), and QColor::red().

Referenced by QCoreGraphicsPaintEngine::drawPixmap(), qt_mac_draw_pattern(), QCoreGraphicsPaintEnginePrivate::setFillBrush(), and QCoreGraphicsPaintEnginePrivate::setStrokePen().

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

◆ CGContextSetCompositeOperation()

void CGContextSetCompositeOperation ( CGContextRef ,
int  )
extern

◆ qt_mac_cg_features()

◆ qt_mac_cg_transform_path_apply()

void qt_mac_cg_transform_path_apply ( void * info,
const CGPathElement * element )

Definition at line 1268 of file qpaintengine_mac.mm.

References info, Q_ASSERT, and qDebug.

Referenced by QCoreGraphicsPaintEnginePrivate::drawPath().

+ Here is the caller graph for this function:

◆ qt_mac_cgimage_data_free()

QT_BEGIN_NAMESPACE void qt_mac_cgimage_data_free ( void * ,
const void * memoryToFree,
size_t  )

Definition at line 42 of file qpaintengine_mac.mm.

Referenced by qt_mac_create_imagemask().

+ Here is the caller graph for this function:

◆ qt_mac_compose_path()

static CGMutablePathRef qt_mac_compose_path ( const QPainterPath & p,
float off = 0 )
static

Definition at line 168 of file qpaintengine_mac.mm.

References QPainterPath::CurveToDataElement, QPainterPath::CurveToElement, i, QPainterPath::LineToElement, QPainterPath::MoveToElement, Q_ASSERT, qFatal, and ret.

Referenced by QCoreGraphicsPaintEngine::drawPath(), and QCoreGraphicsPaintEngine::updateClipPath().

+ Here is the caller graph for this function:

◆ qt_mac_compose_rect()

static CGRect qt_mac_compose_rect ( const QRectF & r,
float off = 0 )
static

Definition at line 163 of file qpaintengine_mac.mm.

Referenced by QCoreGraphicsPaintEngine::drawRects().

+ Here is the caller graph for this function:

◆ qt_mac_convert_color_to_cg()

static float qt_mac_convert_color_to_cg ( int c)
inlinestatic

Definition at line 70 of file qpaintengine_mac.mm.

Referenced by cgColorForQColor(), and QCoreGraphicsPaintEnginePrivate::setFillBrush().

+ Here is the caller graph for this function:

◆ qt_mac_convert_transform_to_cg()

CGAffineTransform qt_mac_convert_transform_to_cg ( const QTransform & t)

Definition at line 71 of file qpaintengine_mac.mm.

Referenced by QCoreGraphicsPaintEnginePrivate::drawPath(), QCoreGraphicsPaintEnginePrivate::setFillBrush(), and QCoreGraphicsPaintEnginePrivate::setTransform().

+ Here is the caller graph for this function:

◆ qt_mac_create_imagemask()

CGImageRef qt_mac_create_imagemask ( const QPixmap & pixmap,
const QRectF & sr )

Definition at line 47 of file qpaintengine_mac.mm.

References QImage::Format_ARGB32_Premultiplied, pixmap, qRound(), and qt_mac_cgimage_data_free().

Referenced by QCoreGraphicsPaintEngine::drawPixmap(), and qt_mac_draw_pattern().

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

◆ qt_mac_dispose_pattern()

static void qt_mac_dispose_pattern ( void * info)
static

Definition at line 308 of file qpaintengine_mac.mm.

References info.

Referenced by QCoreGraphicsPaintEngine::drawTiledPixmap(), and QCoreGraphicsPaintEnginePrivate::setFillBrush().

+ Here is the caller graph for this function:

◆ qt_mac_draw_pattern()

static void qt_mac_draw_pattern ( void * info,
CGContextRef c )
static

Definition at line 244 of file qpaintengine_mac.mm.

References cgColorForQColor(), QPixmap::fill(), i, info, Q_ASSERT, QMACPATTERN_MASK_MULTIPLIER, qt_mac_create_imagemask(), qt_mac_drawCGImage(), qt_mac_toCGImage(), QPixmap::rect(), and rect.

Referenced by QCoreGraphicsPaintEngine::drawTiledPixmap(), and QCoreGraphicsPaintEnginePrivate::setFillBrush().

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

◆ qt_mac_patternForBrush()

static const uchar * qt_mac_patternForBrush ( int brushStyle)
static

Definition at line 1132 of file qpaintengine_mac.mm.

References Qt::Dense1Pattern, Qt::LinearGradientPattern, Q_ASSERT, and Qt::SolidPattern.

Referenced by QCoreGraphicsPaintEnginePrivate::setFillBrush().

+ Here is the caller graph for this function: