Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qcosmeticstroker.cpp File Reference

(a74b550e2c38679c329cd40d2119ab440668468e)

#include "qcosmeticstroker_p.h"
#include "private/qpainterpath_p.h"
#include "private/qrgba64_p.h"
#include <qdebug.h>
Include dependency graph for qcosmeticstroker.cpp:

Go to the source code of this file.

Macros

#define toF26Dot6(x)

Typedefs

typedef void(* DrawPixel) (QCosmeticStroker *stroker, int x, int y, int coverage)

Enumerations

enum  StrokeSelection {
  Aliased = 0 , AntiAliased = 1 , Solid = 0 , Dashed = 2 ,
  RegularDraw = 0 , FastDraw = 4 , Aliased = 0 , AntiAliased = 1 ,
  Solid = 0 , Dashed = 2 , RegularDraw = 0 , FastDraw = 4
}
enum  StrokeSelection {
  Aliased = 0 , AntiAliased = 1 , Solid = 0 , Dashed = 2 ,
  RegularDraw = 0 , FastDraw = 4 , Aliased = 0 , AntiAliased = 1 ,
  Solid = 0 , Dashed = 2 , RegularDraw = 0 , FastDraw = 4
}

Functions

static uint sourceOver (uint d, uint color)
static FDot16 FDot16FixedDiv (int x, int y)
template<DrawPixel drawPixel, class Dasher>
static bool drawLine (QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps)
template<DrawPixel drawPixel, class Dasher>
static bool drawLineAA (QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps)
void drawPixel (QCosmeticStroker *stroker, int x, int y, int coverage)
void drawPixelARGB32 (QCosmeticStroker *stroker, int x, int y, int coverage)
void drawPixelARGB32Opaque (QCosmeticStroker *stroker, int x, int y, int)
static StrokeLine strokeLine (int strokeSelection)
static const QPainterPath::ElementTypesubPath (const QPainterPath::ElementType *t, const QPainterPath::ElementType *end, const qreal *points, bool *closed)
static void splitCubic (QCosmeticStroker::PointF *points)
static int swapCaps (int caps)
static void capAdjust (int caps, int &x1, int &x2, FDot16 &y, FDot16 yinc)

Variables

QT_BEGIN_NAMESPACE typedef int FDot16

Macro Definition Documentation

◆ toF26Dot6

#define toF26Dot6 ( x)
Value:
static_cast<int>((x) * 64.)
GLint GLint GLint GLint GLint x

Definition at line 31 of file qcosmeticstroker.cpp.

Typedef Documentation

◆ DrawPixel

typedef void(* DrawPixel)(QCosmeticStroker *stroker, int x, int y, int coverage)

Definition at line 49 of file qcosmeticstroker.cpp.

Enumeration Type Documentation

◆ StrokeSelection [1/2]

Enumerator
Aliased 
AntiAliased 
Solid 
Dashed 
RegularDraw 
FastDraw 
Aliased 
AntiAliased 
Solid 
Dashed 
RegularDraw 
FastDraw 

Definition at line 162 of file qcosmeticstroker.cpp.

◆ StrokeSelection [2/2]

Enumerator
Aliased 
AntiAliased 
Solid 
Dashed 
RegularDraw 
FastDraw 
Aliased 
AntiAliased 
Solid 
Dashed 
RegularDraw 
FastDraw 

Definition at line 162 of file qcosmeticstroker.cpp.

Function Documentation

◆ capAdjust()

void capAdjust ( int caps,
int & x1,
int & x2,
FDot16 & y,
FDot16 yinc )
inlinestatic

Definition at line 693 of file qcosmeticstroker.cpp.

References QCosmeticStroker::CapBegin, and QCosmeticStroker::CapEnd.

Referenced by drawLine(), and drawLineAA().

Here is the caller graph for this function:

◆ drawLine()

template<DrawPixel drawPixel, class Dasher>
bool drawLine ( QCosmeticStroker * stroker,
qreal x1,
qreal y1,
qreal x2,
qreal y2,
int caps )
static

◆ drawLineAA()

template<DrawPixel drawPixel, class Dasher>
bool drawLineAA ( QCosmeticStroker * stroker,
qreal x1,
qreal y1,
qreal x2,
qreal y2,
int caps )
static

Definition at line 911 of file qcosmeticstroker.cpp.

References capAdjust(), FDot16, FDot16FixedDiv(), and swapCaps().

Here is the call graph for this function:

◆ drawPixel()

void drawPixel ( QCosmeticStroker * stroker,
int x,
int y,
int coverage )
inline

Definition at line 118 of file qcosmeticstroker.cpp.

References QCosmeticStroker::current_span, QCosmeticStroker::NSPANS, and QCosmeticStroker::opacity.

Referenced by strokeLine().

Here is the caller graph for this function:

◆ drawPixelARGB32()

void drawPixelARGB32 ( QCosmeticStroker * stroker,
int x,
int y,
int coverage )
inline

Definition at line 141 of file qcosmeticstroker.cpp.

References QCosmeticStroker::ppl.

Referenced by strokeLine().

Here is the caller graph for this function:

◆ drawPixelARGB32Opaque()

void drawPixelARGB32Opaque ( QCosmeticStroker * stroker,
int x,
int y,
int  )
inline

Definition at line 152 of file qcosmeticstroker.cpp.

References QCosmeticStroker::ppl.

Referenced by strokeLine().

Here is the caller graph for this function:

◆ FDot16FixedDiv()

FDot16 FDot16FixedDiv ( int x,
int y )
inlinestatic

Definition at line 38 of file qcosmeticstroker.cpp.

Referenced by drawLine(), and drawLineAA().

Here is the caller graph for this function:

◆ sourceOver()

uint sourceOver ( uint d,
uint color )
inlinestatic

Definition at line 33 of file qcosmeticstroker.cpp.

◆ splitCubic()

void splitCubic ( QCosmeticStroker::PointF * points)
static

Definition at line 639 of file qcosmeticstroker.cpp.

◆ strokeLine()

StrokeLine strokeLine ( int strokeSelection)
static

Definition at line 171 of file qcosmeticstroker.cpp.

References Aliased, AntiAliased, Dashed, drawPixel(), drawPixelARGB32(), drawPixelARGB32Opaque(), FastDraw, RegularDraw, and Solid.

Here is the call graph for this function:

◆ subPath()

const QPainterPath::ElementType * subPath ( const QPainterPath::ElementType * t,
const QPainterPath::ElementType * end,
const qreal * points,
bool * closed )
inlinestatic

Definition at line 476 of file qcosmeticstroker.cpp.

◆ swapCaps()

int swapCaps ( int caps)
inlinestatic

Definition at line 686 of file qcosmeticstroker.cpp.

References QCosmeticStroker::CapBegin, and QCosmeticStroker::CapEnd.

Referenced by drawLine(), and drawLineAA().

Here is the caller graph for this function:

Variable Documentation

◆ FDot16

QT_BEGIN_NAMESPACE typedef int FDot16

Definition at line 28 of file qcosmeticstroker.cpp.

Referenced by drawLine(), and drawLineAA().