Class: TGraphicOverlay

Declaration: LineLayoutStyles.h

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.

Member Function: TGraphicOverlay::Info

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGraphicOverlay::Draw

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGraphicOverlay::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: TGraphicOverlay::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: TGraphicOverlay::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: TGraphicOverlay::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: TGraphicOverlay::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: TGraphicOverlay::~TGraphicOverlay

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.

Member Function: TGraphicOverlay::TGraphicOverlay

  1. TGraphicOverlay ()
  2. TGraphicOverlay (const TGraphicOverlay &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. 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.