Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCanvasGraphic
Inherited By:
None.
Purpose:
A polygon canvas graphic.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Intended to be used as is but can also be derived.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TCanvasPolygon (const TGPolygon &)
- TCanvasPolygon (const TCanvasPolygon &)
- TCanvasPolygon ()
Interface Category:
API.
Purpose:
- Constructor for creating new canvas polygons.
- Copy constructor.
- Default constructor.
Calling Context:
- Called to create a new canvas polygon.
- Called to copy an object.
- Called by the stream-in operators and constructors of derived classes.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TCanvasPolygon ()
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.
TCanvasPolygon & operator =(const TCanvasPolygon &)
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.
Member Function: TCanvasPolygon::operator>>=
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.
Member Function: TCanvasPolygon::operator<<=
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.
Member Function: TCanvasPolygon::HandleDraw
virtual void HandleDraw (TGrafPort &) const
Interface Category:
API.
Purpose:
Draws the graphic's untransformed geometry.
Calling Context:
Called by MCanvasGraphic::Draw, which links the graphic's transform and bundle 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.
Member Function: TCanvasPolygon::HandleGetBounds
virtual TGRect HandleGetBounds () const
Interface Category:
API.
Purpose:
Returns the bounding rectangle of the untransformed geometry.
Calling Context:
Called by MCanvasGraphic::GetGeometricBounds and MCanvasGraphic::GetLooseFitBounds, which apply the graphic's transform to the returned bounds and expand it as required by the graphic's bundle.
Parameters:
Return Value:
TGRect -The graphic's untransformed geometric bounds.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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 graphic's untransformed geometry.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCanvasPolygon::GetParametric
bool GetParametric (const TGPoint &, GCoordinate & u) const
Interface Category:
API.
Purpose:
Identifies the canvas polygonÕs vertex closest to the specified point. The point must be within 10 pixels of a vertex to succeed.
Calling Context:
Called by clients to edit the canvas polygon after it is created.
Parameters:
- const TGPoint & -A point.
- GCoordinate & u -The closest parametric to the point is returned.
Return Value:
Returns true if a parametric was identified.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Use in conjunction with DragPolygonTo.
Member Function: TCanvasPolygon::DragPolygonTo
void DragPolygonTo (GCoordinate u, const TGPoint &)
Interface Category:
API.
Purpose:
Changes a specified parametric of the canvas polygon.
Calling Context:
Called by clients to edit the canvas polygon after it is created.
Parameters:
- GCoordinate u -The parametric to change.
- const TGPoint & -The new vertex for the parametric.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Use in conjunction with GetParametric.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.