Qt 4.8
Public Functions | Static Public Functions | Properties | List of all members
QMacFontPath Class Reference

Public Functions

void advance (float _x)
 
 QMacFontPath (float _x, float _y, QPainterPath *_path)
 
void setPosition (float _x, float _y)
 

Static Public Functions

static OSStatus closePath (void *)
 
static OSStatus cubicTo (const Float32Point *, const Float32Point *, const Float32Point *, void *)
 
static OSStatus lineTo (const Float32Point *, void *)
 
static OSStatus moveTo (const Float32Point *, void *)
 

Properties

QPainterPathpath
 
float x
 
float y
 

Detailed Description

Definition at line 77 of file qfontengine_mac.mm.

Constructors and Destructors

◆ QMacFontPath()

QMacFontPath::QMacFontPath ( float  _x,
float  _y,
QPainterPath _path 
)
inline

Definition at line 82 of file qfontengine_mac.mm.

82 : x(_x), y(_y), path(_path) { }
QPainterPath * path

Functions

◆ advance()

void QMacFontPath::advance ( float  _x)
inline

Definition at line 84 of file qfontengine_mac.mm.

84 { x += _x; }

◆ closePath()

OSStatus QMacFontPath::closePath ( void *  data)
static

Definition at line 118 of file qfontengine_mac.mm.

Referenced by addGlyphsToPathHelper(), and advance().

119 {
120  static_cast<QMacFontPath*>(data)->path->closeSubpath();
121  return noErr;
122 }
void closeSubpath()
Closes the current subpath by drawing a line to the beginning of the subpath, automatically starting ...
static const char * data(const QByteArray &arr)
QPainterPath * path

◆ cubicTo()

OSStatus QMacFontPath::cubicTo ( const Float32Point *  cp1,
const Float32Point *  cp2,
const Float32Point *  ep,
void *  data 
)
static

Definition at line 100 of file qfontengine_mac.mm.

Referenced by addGlyphsToPathHelper(), and advance().

103 {
104  QMacFontPath *p = static_cast<QMacFontPath*>(data);
105  p->path->cubicTo(p->x + cp1->x, p->y + cp1->y,
106  p->x + cp2->x, p->y + cp2->y,
107  p->x + ep->x, p->y + ep->y);
108  return noErr;
109 }
static const char * data(const QByteArray &arr)
void cubicTo(const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt)
Adds a cubic Bezier curve between the current position and the given endPoint using the control point...
QPainterPath * path

◆ lineTo()

OSStatus QMacFontPath::lineTo ( const Float32Point *  pt,
void *  data 
)
static

Definition at line 92 of file qfontengine_mac.mm.

Referenced by addGlyphsToPathHelper(), and advance().

94 {
95  QMacFontPath *p = static_cast<QMacFontPath*>(data);
96  p->path->lineTo(p->x + pt->x, p->y + pt->y);
97  return noErr;
98 }
void lineTo(const QPointF &p)
Adds a straight line from the current position to the given endPoint.
static const char * data(const QByteArray &arr)
QPainterPath * path

◆ moveTo()

OSStatus QMacFontPath::moveTo ( const Float32Point *  pt,
void *  data 
)
static

Definition at line 111 of file qfontengine_mac.mm.

Referenced by addGlyphsToPathHelper(), and advance().

112 {
113  QMacFontPath *p = static_cast<QMacFontPath*>(data);
114  p->path->moveTo(p->x + pt->x, p->y + pt->y);
115  return noErr;
116 }
void moveTo(const QPointF &p)
Moves the current point to the given point, implicitly starting a new subpath and closing the previou...
static const char * data(const QByteArray &arr)
QPainterPath * path

◆ setPosition()

void QMacFontPath::setPosition ( float  _x,
float  _y 
)
inline

Definition at line 83 of file qfontengine_mac.mm.

Referenced by addGlyphsToPathHelper().

83 { x = _x; y = _y; }

Properties

◆ path

QPainterPath* QMacFontPath::path
private

Definition at line 80 of file qfontengine_mac.mm.

Referenced by closePath(), cubicTo(), lineTo(), and moveTo().

◆ x

float QMacFontPath::x
private

Definition at line 79 of file qfontengine_mac.mm.

Referenced by cubicTo(), lineTo(), and moveTo().

◆ y

float QMacFontPath::y
private

Definition at line 79 of file qfontengine_mac.mm.

Referenced by cubicTo(), lineTo(), and moveTo().


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