Class: TMiterLimitJoint

Declaration: GrafJoints.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TJoint

Inherited By:

None.

Purpose:

Derived from TJoint, TMiterLimitJoint implements joints that fill the gap between two edges of a frame by continuing the outer borders of the frame along straight paths until they meet, or until a defined distance is reached. This style of joint is the default--when the attribute bundle contains no joint attribute, the pen uses a miter joint. A limiting value is used to prevent miter joints from becoming too large. When two sides of a polygon meet at a small angle (say, five or ten degrees), the miter joint results in a long point extending a fair distance out from the intersection. You can prevent this by giving an appropriate limiting value, setting a limit to how far beyond the geometrical discontinuity the miter can extend. Any time the miter would extend farther than this limit, the miter is truncated at the limit, with a bevel applied at that point. The limit is specified in units of the frame offset. The frame offset is equal to the pen width, if the TPen::EPenBalance value is kOutsetFrame or kInsetFrame, or one-half the pen width, if the value is kCenterFrame. The kInsetFrame value is applicable when a closed area has a concave angle, as viewed from outside the area. As an example, consider a polygon that outlines an n-pointed star, rendered with the kInsetFrame pen balance and a miter limit joint style. The outside tips of the star have convex angles and thus the joints correspond to the geometry here. But the corners closer to the center, where two arms of the star meet, have concave angles, which are beveled on the interior side of the frame (the side closer to the center of the star) if the miter limit is small enough and the angles are sharp enough. TMiterLimitJoint's behavior is different from limited miter joints in PostScript, which simply replace the entire miter with a normal bevel joint, instead of truncating the miter at some distance from the geometry.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

No special considerations.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMiterLimitJoint::TMiterLimitJoint

  1. TMiterLimitJoint (GCoordinate limit)
  2. TMiterLimitJoint (const TMiterLimitJoint &)
  3. TMiterLimitJoint ()

Interface Category:

API.

Purpose:

  1. Constructor with limit set to the Limit parameter.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Called to copy an object. This function can also be called directly.
  3. Called by the stream-in operators and directly.

Parameters:

Return Value:

None.

Exceptions:

Will throw an exception due to a parameter assert if the upper limit is < 1.0.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMiterLimitJoint::~TMiterLimitJoint

virtual ~ TMiterLimitJoint ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMiterLimitJoint::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: TMiterLimitJoint::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: TMiterLimitJoint::operator=

TMiterLimitJoint & operator =(const TMiterLimitJoint & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

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: TMiterLimitJoint::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. For TAreaJoint, no adjustments need to be made.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The modified bounding rectangle.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMiterLimitJoint::GetMiterLimit

virtual GCoordinate GetMiterLimit () const

Interface Category:

API.

Purpose:

Returns the miter limit of the Joint.

Calling Context:

Call this function directly.

Parameters:

Return Value:

The limit in GCoordinates.

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.