Class: TManualKernStyle

Declaration: LineLayoutStyles.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TLineLayoutStyle

Inherited By:

None.

Purpose:

Derived from TLineLayoutStyle, it is used to manually controlling kerning. In horizontal text, the value assigned to the style is used as the factor for shifting text left and right. For vertical text, this factor is used to shift characters up and down. This shifting behavior is also known as with-stream shifting. The factor itself is multiplied by the point size of the character. This allows the kerning to scale up as a point size changes. For example, a kern factor of 1/12 will move a 12 point character up 1 point and a 24 point character up 2 points. This scaling allows glyphs to be properly positioned when a user changes a character's point size. This value is added to a kerning shift, which does not depend on the character's point size.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Derive classes to provide a different implementation of manual kerning.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TManualKernStyle::GetName

virtual const TStyleName & GetName () const

Interface Category:

API.

Purpose:

Returns the style's internal name. This is not necessarily the class name. For example, there are related underlining styles that are each separate derived classes. However, because they are mutually exclusive, they share the same internal name.

Calling Context:

Called when the name associated with an object is needed; for example, when comparing objects.

Parameters:

Return Value:

The TToken for the associated name.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::operator==

virtual bool operator ==(const TStyle & thatStyle) const

Interface Category:

API.

Purpose:

Equality operator.

Calling Context:

Called to compare two objects.

Parameters:

Return Value:

Returns true if the objects are equal.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Overrides inherited MCollectible function.

Calling Context:

Same as for base class.

Parameters:

Return Value:

The numeric value of the hash.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::GetKernAmount

virtual GCoordinate GetKernAmount (GCoordinate & pointSize) const

Interface Category:

API.

Purpose:

Returns the kerning value for this style object as a absolute number of points.

Calling Context:

Called when laying out a line of text.

Parameters:

Return Value:

The absolute number of points to use as the kerning value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::~TManualKernStyle

virtual ~ TManualKernStyle ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::TManualKernStyle

  1. TManualKernStyle ()
  2. TManualKernStyle (const TManualKernStyle &)
  3. TManualKernStyle (GCoordinate kernFactor)
  4. TManualKernStyle (GCoordinate kernFactor, GCoordinate kernShift)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.
  3. Constructs a manual kerning style object with a specified kerning factor.
  4. Constructs a manual kerning style object with a specified kerning factor and shift value.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.
  3. Call to construct a manual kerning style object with a specified kerning factor.
  4. Call to construct a manual kerning style object with a specified kerning factor and shift value.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::GetKernShift

virtual GCoordinate GetKernShift () const

Interface Category:

API.

Purpose:

Returns the kerning shift for the style instance.

Calling Context:

Used to obtain the kern shift for the style instance.

Parameters:

Return Value:

The kern shift for the style instance.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TManualKernStyle::GetKernFactor

virtual GCoordinate GetKernFactor () const

Interface Category:

API.

Purpose:

Returns the kerning factor for the style instance.

Calling Context:

Used to obtain the kern factor for the style instance.

Parameters:

Return Value:

The kern factor for the style instance.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.