Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCanvasGraphic
Inherited By:
None.
Purpose:
A canvas graphic that can be constructed from any MGraphic.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Intended to be used as is, not likely to be derived but can be derived.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TBasicCanvasGraphic (const MGraphic & thePrototype)
- TBasicCanvasGraphic (MGraphic * adoptPrototype)
- TBasicCanvasGraphic (const TBasicCanvasGraphic &)
Interface Category:
API.
Purpose:
- Constructs from a reference to an MGraphic.
- Constructs from an adopted pointer to an MGraphic.
- Copy constructor.
Calling Context:
- Called to create a new basic canvas graphic.
- Called to create a new basic canvas graphic.
- Called to copy a basic canvas graphic.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TBasicCanvasGraphic ()
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:
Not multithread safe.
Other Considerations:
None.
TBasicCanvasGraphic & operator =(const TBasicCanvasGraphic &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream the object is streamed 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:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream the object is streamed 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:
Not multithread safe.
Other Considerations:
None.
virtual void AdoptBundle (TGrafBundle *)
Interface Category:
API.
Purpose:
Adopts a bundle into the graphic.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The adopted bundle is simply adopted into the MGraphic that the basic canvas graphic wraps.
virtual TGrafBundle * OrphanBundle ()
Interface Category:
API.
Purpose:
Orphans the current bundle of the graphic.
Calling Context:
Call this function directly.
Parameters:
Return Value:
TGrafBundle * -The orphaned bundle.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The orphaned bundle is simply orphaned from the MGraphic that the basic canvas graphic wraps.
virtual const TGrafBundle * GetBundle () const
Interface Category:
API.
Purpose:
Gets the current bundle of the graphic for read-only access.
Calling Context:
Call this function directly.
Parameters:
Return Value:
const TGrafBundle * -A const pointer to the graphic's current bundle.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The bundle is simply the bundle returned from GetBundle of the MGraphic that the basic canvas graphic wraps.
virtual void HandleDraw (TGrafPort &) const
Interface Category:
API.
Purpose:
Draws the MGraphic that the basic canvas graphic wraps.
Calling Context:
Called by MCanvasGraphic::Draw, which links the graphic's transform to the port before calling HandleDraw.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TGRect HandleGetBounds () const
Interface Category:
API.
Purpose:
Returns the bounding rectangle of the MGraphic that the basic canvas graphic wraps.
Calling Context:
Called by MCanvasGraphic::GetGeometricBounds and MCanvasGraphic::GetLooseFitBounds, which apply the graphic's transform to the returned bounds.
Parameters:
Return Value:
TGRect -The bounds.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Simply returns the TGRect returned from the GetLooseFitBounds of the MGraphic that the basic canvas graphic wraps.
virtual bool HandleHit (const TGPoint &) const
Interface Category:
API.
Purpose:
Detects the intersection of the point with the graphic's untransformed geometry.
Calling Context:
Called by MCanvasGraphic::Hit, which provides a point that has been untransformed by the graphic's transform.
Parameters:
- const TGPoint & -The point to detect a hit against.
Return Value:
Returns true if the point intersects ( hits ) the wrapped MGraphic; false, otherwise.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Basic canvas graphics interpret a hit as an intersection of the point with the wrapped MGraphic's loose fit bounds.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.