Class: TJoint

Declaration: GrafJoints.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TBevelJoint TMiterLimitJoint TRoundJoint

Purpose:

When a TPen draws a frame, it can encounter a corner--more precisely, a C1 discontinuity in the geometry. Assume, for purposes of explanation, that the discontinuity occurs at the meeting point of two straight line segments (rather than curved edges). To draw these line segments, the pen can simply create two rectangles of exactly the same length as the geometry's corresponding line segments. The two sides then join at the corner; in fact, the rectangles overlap on the concave side of the corner. However, there is a gap between the rectangles at the convex edge of the corner. The TJoint fills in this gap. The style of joint is determined by each derived class. The joint is dependent upon the style (geometry) of the derived classes and on the pen type. A NIL pen parameter results in choosing a pen of thickness 1.0.

Instantiation:

Abstract base class; do not allocate.

Deriving Classes:

Provided classes: TAreaJoint, TRoundJoint, TBevelJoint, TMiterJoint, and descendants of TMiterJoint. (The extension mechansim for this class is yet to be implemented.)

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TJoint::~TJoint

virtual ~ TJoint ()

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.

Member Function: TJoint::operator>>=

virtual TStream & operator >>=(TStream &) 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:

Not multithread safe.

Other Considerations:

None.

Member Function: TJoint::operator<<=

virtual TStream & operator <<= (TStream &)

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:

Not multithread safe.

Other Considerations:

None.

Member Function: TJoint::TJoint

  1. TJoint ()
  2. TJoint (const TJoint &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators. Abstract class, do not call this function directly.
  2. Called to copy an object. Abstract class, do not call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TJoint is an abstract base class--all the constructors are protected. Do not instantiate this class. You must override the constructors in the derived classes.

Member Function: TJoint::operator=

TJoint & operator =(const TJoint & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Do not call this function directly, it is an abstract base class function.

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:

TJoint is an abstract base class--the assignment operator is protected. Do not instantiate this class. You must override the assignment operator in the derived classes.

Member Function: TJoint::AdjustBounds

virtual TGRect AdjustBounds (const TGRect & currentBounds, const TPen * pen =NIL) const

Interface Category:

API.

Purpose:

Adjusts the size of the bounding rectangle to account for the thickness of the pen used. This is overridden by the derived classes if any changes need to be made. In the default case the bounding rectangle is unchanged.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A TGRect that is the modified version of the rectangle passed as the current bounds.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not 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.