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.
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.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
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.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
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.
virtual bool operator ==(const TStyle & thatStyle) const
Interface Category:
API.
Purpose:
Equality operator.
Calling Context:
Called to compare two objects.
Parameters:
- const TStyle & thatStyle -The object to compare with this object.
Return Value:
Returns true if the objects are equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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:
- GCoordinate & pointSize -The point size of the text.
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.
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.
- TManualKernStyle ()
- TManualKernStyle (const TManualKernStyle &)
- TManualKernStyle (GCoordinate kernFactor)
- TManualKernStyle (GCoordinate kernFactor, GCoordinate kernShift)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Constructs a manual kerning style object with a specified kerning factor.
- Constructs a manual kerning style object with a specified kerning factor and shift value.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
- Call to construct a manual kerning style object with a specified kerning factor.
- Call to construct a manual kerning style object with a specified kerning factor and shift value.
Parameters:
- Takes no parameters.
- const TManualKernStyle & -The object to copy.
- GCoordinate kernFactor -The kerning factor value for this style object.
- GCoordinate kernFactor -The kerning factor value for this style object.
- GCoordinate kernShift -The kerning shift value for this style object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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.