Kerning Struct Reference

#include <customgui_kerning.h>

详细描述

Holds the kerning parameters for one character in a string.

公共成员函数

  Kerning ()
  Kerning (const Kerning &source)
  Kerning ( Float kerning, Float tracking, Float scale, Float scaleH, Float scaleV, Float baselineShift, Float leading)
Bool   ReadHF ( HyperFile *hf, Int32 level)
Bool   WriteHF ( HyperFile *hf) const
向量   GetOffsetVector () const
向量   GetScaleVector () const
String   ToString () const

Public Attributes

Float   _kerning
Float   _tracking
Float   _scale
Float   _scaleH
Float   _scaleV
Float   _baselineShift
Float   _leading

Friends

Bool   operator== (const Kerning &k1, const Kerning &k2)
Bool   operator!= (const Kerning &k1, const Kerning &k2)
Kerning   Combine (const Kerning &k1, const Kerning &k2)

构造函数 & 析构函数文档编制

◆  Kerning() [1/3]

Kerning ( )

Default constructor.

◆  Kerning() [2/3]

Kerning ( const Kerning source )

Copy constructor.

参数
[in] source The Kerning object to copy members from.

◆  Kerning() [3/3]

Kerning ( Float   kerning ,
Float   tracking ,
Float   scale ,
Float   scaleH ,
Float   scaleV ,
Float   baselineShift ,
Float   leading  
)

Constructor with parameters.

参数
[in] kerning Assigned to _kerning .
[in] tracking Assigned to _tracking .
[in] scale Assigned to _scale .
[in] scaleH Assigned to _scaleH .
[in] scaleV Assigned to _scaleV .
[in] baselineShift Assigned to _baselineShift .
[in] leading Assigned to _leading .

成员函数文档编制

◆  ReadHF()

Bool ReadHF ( HyperFile hf ,
Int32   level  
)

Reads the Kerning object from a HyperFile .

参数
[in] hf The HyperFile to read from. The caller owns the pointed HyperFile .
[in] level The file level.
返回
true if successful, otherwise false .

◆  WriteHF()

Bool WriteHF ( HyperFile hf ) const

Writes the Kerning object to a HyperFile .

参数
[in] hf The HyperFile to write to. The caller owns the pointed HyperFile .
返回
true if successful, otherwise false .

◆  GetOffsetVector()

向量 GetOffsetVector ( ) const

Computes a vector that combines kerning, tracking, baseline shift and leading.

返回
The offset vector.

◆  GetScaleVector()

向量 GetScaleVector ( ) const

Computes a vector that combines scale, horizontal scale and vertical scale.

返回
The scale vector.

◆  ToString()

String ToString ( ) const

Converts the Kerning value to a readable string.

返回
The string.

Friends And Related Function Documentation

◆  operator==

Bool operator== ( const Kerning k1 ,
const Kerning k2  
)
friend

Equality operator.

返回
true if equal, otherwise false .

◆  operator!=

Bool operator!= ( const Kerning k1 ,
const Kerning k2  
)
friend

Inequality operator.

返回
true if not equal, otherwise false .

◆  Combine

Kerning Combine ( const Kerning k1 ,
const Kerning k2  
)
friend

Combines two Kerning 对象。

注意
Offsets are added, scales are taken from second Kerning 对象。
参数
[in] k1 The first Kerning 对象。
[in] k2 The second Kerning 对象。
返回
The resulting Kerning 对象。

Member Data Documentation

◆  _kerning

Float _kerning

Moves the character along its X axis, to create (or remove) space before the character.

◆  _tracking

Float _tracking

Like _kerning , but for a group of characters.

◆  _scale

Float _scale

Scales the character.

◆  _scaleH

Float _scaleH

Scales the character along its X axis.

◆  _scaleV

Float _scaleV

Scales the character along its Y axis.

◆  _baselineShift

Float _baselineShift

Moves the character along its Y axis.

◆  _leading

Float _leading

Not used currently.