Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TLineLayoutStyle
Inherited By:
None.
Purpose:
TGraphicOverlay, derived from TLineLayoutStyle, can draw graphics on top of characters. The default implementation draws dots above characters. This is a common member function for emphasizing text in Japanese word processors.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Derive classes to provide a different form of graphic overlay.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
virtual void Info (GCoordinate & returnAscent, GCoordinate & returnDescent, GCoordinate crossStreamShift, TSingleLineOrientation::ELineOrientation direction, const TFont & font, const TStyleSet & characterStyles, const TStyleSet & paragraphStyles) const
Interface Category:
API.
Purpose:
Returns information about how the overlay alters a character's height. The default implementation returns an ascent that is a function of the character point size. Note that overlays cannot affect the width of a character. Default implementation takes super/subscripting into account when calculating ascent, descent.
Calling Context:
Called when drawing to get information on how the overlay alters a character's height.
Parameters:
- GCoordinate & returnAscent -The altered ascent value.
- GCoordinate & returnDescent -The altered descent value.
- const GCoordinate * crossStreamShift -The amount by which to super- or subscript the dot.
- TSingleLineOrientation::ELineOrientation direction -The line direction used in this calculation.
- const TFont & font -The font used in this calculation.
- const TStyleSet & characterStyles -The character styles used in this calculation.
- const TStyleSet & paragraphStyles -The paragraph styles used in this calculation.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Draw (TGrafPort * port, const TAttributeState & bundle, TSingleLineOrientation::ELineOrientation direction, const TFont & font, const TStyleSet & characterStyles, const TStyleSet & paragraphStyles, unsigned long ct, const GlyphCode * glyphIndex, const GCoordinate * posOffsets, const GCoordinate * crossStreamShift, const TGPoint & baseLineOrigin) const
Interface Category:
API.
Purpose:
By default, paints a dot centered above the glyph. The default implementation always super/subscripts the dot by the cross stream shift amount.
Calling Context:
Called to draw the graphic overlay.
Parameters:
- TGrafPort * port -The grafport in which to draw.
- const TAttributeState & bundle -The bundle with which to draw.
- TSingleLineOrientation::ELineOrientation direction -The line direction to use in drawing.
- const TFont & font -The font to use in drawing.
- const TStyleSet & characterStyles -The character styles to use in drawing.
- const TStyleSet & paragraphStyles -The paragraph styles to use in drawing.
- unsigned long ct -The number of characters to draw the overlay over.
- const GlyphCode * glyphIndex -The index within the font of the glyph being drawn.
- const GCoordinate * posOffsets -The offset of the dot.
- const GCoordinate * crossStreamShift -The amount by which to super- or subscript the dot.
- const TGPoint & baseLineOrigin -The base line of the text.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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 ~ TGraphicOverlay ()
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.
- TGraphicOverlay ()
- TGraphicOverlay (const TGraphicOverlay &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
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.