Class: TGrafBundle

Declaration: Bundles.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TAttributeState

Inherited By:

None.

Purpose:

A bundle is a collection of attributes that contain imaging information for the rendering device. For instance, paint attributes describe color and pattern. A TGrafBundle collects together the attributes needed to render a 2-D graphic object. The MGraphic class associates a TGrafBundle with a geometry. A descendant of MGraphic can adopt a TGrafBundle, reserving the bundle for its exclusive use until it orphans it. An MGraphic has only one bundle, and only one MGraphic can have the same bundle. However, a TGrafBundle is not always encapsulated in an MGraphic--TGrafPort uses a bundle directly to render a geometry. The standard attributes contained in a bundle include fill attributes, frame attributes, and the image sampling attribute. The fill attributes include the fill paint (which determines the color and pattern applied to a geometry's interior) and the transfer mode (which helps determine the actual color of the paint when the object is drawn). The frame attributes describe properties of the object's border; these include paint and transfer mode, as well as the styles of pen, starting cap, ending cap, and joint. The final standard attribute is the image sampling attribute, used for rendering the pixels of an image. These standard attributes are described by corresponding classes--TPaint, TTransferMode, TPen, TCap, TJoint, and TImageSamplingControl. Each bundle has a drawing operation that determines how the graphic is rendered. The drawing operation is either kFill, which fills the graphic's geometry without framing it; kFrame, which draws the border around the geometry without filling its interior; or kFillAndFrame, which draws both the fill and the frame. In the case of geometries that cannot be filled (such as a line or polyline), the geometry is not drawn if kFill is not set. The TGrafBundle can adopt two TPaint objects. One determines the color and pattern for the fill, and the other determines the color and pattern for the frame. The eventual color of the fill or frame also depends on the transfer mode. The transfer mode specifies how the initial color of the fill or frame is altered when the object is drawn. For example, it can interact with the color that already exists at the location where the object is to be drawn, or it can be turned into a grayscale value. TGrafBundle has member functions for specifying the transfer mode of the fill and the frame. In addition to the standard attributes, several other less frequently used attributes (derived from TGrafAttribute) are available. You can also add arbitrary attributes by creating your own TGrafAttribute derived classes (although the rendering device might not be able to do anything with these attributes). Both of these types of nonstandard attributes--those supplied by the Graphics subsystem and those that you create--are referred to as extended attributes. An extended attribute must be given a name; a good practice is to simply use the name of the attribute's class. A bundle only holds one attribute with a particular name. If a new attribute is added to a bundle that already contains another attribute of the same name, the new attribute replaces the old attribute. TGrafBundle, derived from TAttributeState, supplies member functions to retrieve, adopt, and orphan all of its standard attributes. To iterate through the extended attributes, use a TGrafBundleIterator object, which you access with TGrafBundle::CreateGrafBundleIterator.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGrafBundle::TGrafBundle

  1. TGrafBundle (TPaint * adoptPaint, EDrawOperation attribute =kFrame)
  2. TGrafBundle (TPaint * adoptFillPaint, TPaint * adoptFramePaint, EDrawOperation attribute =kFillAndFrame)
  3. TGrafBundle (const TColor & color, EDrawOperation attribute =kFrame)
  4. TGrafBundle (const TColor & fillColor, const TColor & frameColor, EDrawOperation attribute =kFillAndFrame)
  5. TGrafBundle ()
  6. TGrafBundle (const TGrafBundle &)
  7. TGrafBundle (const TAttributeState &)
  8. TGrafBundle (const TAttribute3DState & state)

Interface Category:

API.

Purpose:

  1. Creates a TGrafBundle and adopts the given fill paint or frame paint, as specified by the second parameter.
  2. Creates a TGrafBundle and adopts the given fill paint and frame paint.
  3. Creates a TGrafBundle of a specified color, which is to be used as an empty frame.
  4. Creates a TGrafBundle of a specified color, which is to be used as a filled polygon with frame.
  5. Default constructor.
  6. Copy constructor.
  7. Creates a TGrafBundle, initializing with data from the given attribute bundle.
  8. Creates a TGrafBundle, initializing with data from the given 3-D attribute bundle.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.
  4. Call this function directly.
  5. Called directly or by the stream-in operators.
  6. Called to copy an object.
  7. Call this function directly.
  8. 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: TGrafBundle::~TGrafBundle

virtual ~ TGrafBundle ()

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: TGrafBundle::GetFillPaint

virtual const TPaint * GetFillPaint () const

Interface Category:

API.

Purpose:

Returns the paint used for the fill (the area within the frame).

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the fill paint.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFramePaint

virtual const TPaint * GetFramePaint () const

Interface Category:

API.

Purpose:

Returns the paint used for the frame (the border of the graphic).

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the frame paint.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFillTransferMode

virtual const TTransferMode * GetFillTransferMode () const

Interface Category:

API.

Purpose:

Returns the transfer mode for the fill. The transfer mode specifies how the initial color of the fill is altered when the object is drawn. For example, it can interact with the color that already exists at the location where the object is to be drawn, or it can be turned into a grayscale value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the fill transfer mode.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFrameTransferMode

virtual const TTransferMode * GetFrameTransferMode () const

Interface Category:

API.

Purpose:

Returns the transfer mode for the frame. The transfer mode specifies how the initial color of the frame is altered when the object is drawn. For example, it can interact with the color that already exists at the location where the object is to be drawn, or it can be turned into a grayscale value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the frame transfer mode (NIL if no frame paint or pen has yet been specified).

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetImageTransferMode

virtual const TTransferMode * GetImageTransferMode () const

Interface Category:

API.

Purpose:

Returns the transfer mode for an image. The transfer mode specifies how the initial color of a pixel is altered when the image is drawn (if an image is used to paint this graphic). For example, the pixel's color can interact with the color that already exists at the location where the pixel is to be drawn, or it can be turned into a grayscale value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the image transfer mode.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFramePen

virtual const TPen * GetFramePen () const

Interface Category:

API.

Purpose:

Returns the pen used to draw the border of the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the frame pen (NIL if no frame paint or pen has yet been specified).

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFrameStartCap

virtual const TCap * GetFrameStartCap () const

Interface Category:

API.

Purpose:

Returns a constant pointer to the TCap that determines the frame start cap style (such as flush or square).

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the frame start cap.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFrameEndCap

virtual const TCap * GetFrameEndCap () const

Interface Category:

API.

Purpose:

Returns a constant pointer to the TCap that determines the frame end cap style (such as flush or square).

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the frame end cap.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetFrameJoint

virtual const TJoint * GetFrameJoint () const

Interface Category:

API.

Purpose:

Returns a constant pointer to the frame joint style (such as round or miter).

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the frame joint style.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetImageSampling

virtual const TImageSamplingControl * GetImageSampling () const

Interface Category:

API.

Purpose:

Returns a constant pointer to the TImageSamplingControl that determines how the image used for the fill or frame is sampled.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the object that stores the image sampling information.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetDrawingOperation

virtual EDrawOperation GetDrawingOperation () const

Interface Category:

API.

Purpose:

Returns the EDrawOperation that determines whether to paint the fill, the frame, or both.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the drawing operation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetPrimaryDitherHint

virtual const TDitherHint * GetPrimaryDitherHint () const

Interface Category:

API.

Purpose:

Returns a pointer to the current dither hint for this graphics bundle.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the pointer to this graphics bundle's primary dither hint.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::GetGrafAttribute

virtual const TGrafAttribute * GetGrafAttribute (const TToken & attributeName) const

Interface Category:

API.

Purpose:

Returns a constant pointer to the attribute that has the given name.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A constant pointer to the attribute (NIL if there is no attribute by this name).

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::SetDrawingOperation

virtual void SetDrawingOperation (EDrawOperation)

Interface Category:

API.

Purpose:

Specifies whether to paint the fill, the frame, or both.

Calling Context:

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: TGrafBundle::AdoptFillPaint

virtual void AdoptFillPaint (TPaint * adoptedPaint)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TPaint, which is subsequently used for filling 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 previous fill paint is deleted. Call OrphanFillPaint first if you want to keep the object.

Member Function: TGrafBundle::AdoptFramePaint

virtual void AdoptFramePaint (TPaint * adoptedPaint)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TPaint, which is subsequently used for framing 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 previous frame paint is deleted. Call OrphanFramePaint first if you want to keep the object.

Member Function: TGrafBundle::AdoptFillTransferMode

virtual void AdoptFillTransferMode (TTransferMode * adoptedMode)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TTransferMode, which is subsequently used when filling 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 previous fill transfer mode is deleted. Call OrphanFillTransferMode first if you want to keep the object.

Member Function: TGrafBundle::AdoptFrameTransferMode

virtual void AdoptFrameTransferMode (TTransferMode * adoptedMode)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TTransferMode, which is subsequently used when framing 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 previous frame transfer mode is deleted. Call OrphanFrameTransferMode first if you want to keep the object.

Member Function: TGrafBundle::AdoptImageTransferMode

virtual void AdoptImageTransferMode (TTransferMode * adoptedMode)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TTransferMode, which is subsequently used when painting with an image.

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 previous image transfer mode is deleted. Call OrphanImageTransferMode first if you want to keep the object.

Member Function: TGrafBundle::AdoptFramePen

virtual void AdoptFramePen (TPen * adoptedPen)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TPen, which is subsequently used when framing 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 previous frame pen is deleted. Call OrphanFramePen first if you want to keep the object.

Member Function: TGrafBundle::AdoptFrameStartCap

virtual void AdoptFrameStartCap (TCap * adoptedCap)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TCap, which is subsequently used when framing 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 previous frame start cap is deleted. Call OrphanFrameStartCap first if you want to keep the object.

Member Function: TGrafBundle::AdoptFrameEndCap

virtual void AdoptFrameEndCap (TCap * adoptedCap)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TCap, which is subsequently used when framing 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 previous frame end cap is deleted. Call OrphanFrameEndCap first if you want to keep the object.

Member Function: TGrafBundle::AdoptFrameJoint

virtual void AdoptFrameJoint (TJoint * adoptedJoint)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TJoint, which is subsequently used when framing 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 previous frame joint style is deleted. Call OrphanFrameJoint first if you want to keep the object.

Member Function: TGrafBundle::AdoptImageSampling

virtual void AdoptImageSampling (TImageSamplingControl * adoptedControl)

Interface Category:

API.

Purpose:

Assumes ownership of the specified TImageSamplingControl, which determines how the image used for the fill or frame is sampled.

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 previous TImageSamplingControl is deleted. Call OrphanImageSampling first if you want to keep the object.

Member Function: TGrafBundle::AdoptPrimaryDitherHint

virtual void AdoptPrimaryDitherHint (TDitherHint * ditherHint)

Interface Category:

API.

Purpose:

Allows for the adoption of a dither hint object. If a primary dither hint is already associated with this graphics bundle, the old dither hint is deleted and replaced by the new hint.

Calling Context:

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: TGrafBundle::AdoptGrafAttribute

virtual void AdoptGrafAttribute (TGrafAttribute * adoptedAttribute)

Interface Category:

API.

Purpose:

Assumes ownership of the specified extended attribute. (To add a standard attribute, call the standard Adopt function provided for that attribute.) This extended attribute object is an instance of a TGrafAttribute derived class, whose meaning and use you determine. Note that if you intend to use this extended attribute for rendering, you also need to modify the rendering pipeline by creating a new TGrafDevice derived class.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

If there is already an attribute with the same name, it is deleted. Call OrphanGrafAttribute first if you want to keep the object.

Member Function: TGrafBundle::OrphanFillPaint

virtual TPaint * OrphanFillPaint ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TPaint currently used for fills.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned fill paint. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFramePaint

virtual TPaint * OrphanFramePaint ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TPaint currently used for framing the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned frame paint. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFillTransferMode

virtual TTransferMode * OrphanFillTransferMode ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TTransferMode currently used when filling the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned transfer mode. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFrameTransferMode

virtual TTransferMode * OrphanFrameTransferMode ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TTransferMode currently used when framing the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned transfer mode. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanImageTransferMode

virtual TTransferMode * OrphanImageTransferMode ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TTransferMode currently used when painting with an image.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned transfer mode. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFramePen

virtual TPen * OrphanFramePen ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TPen currently used when framing the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned pen. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFrameStartCap

virtual TCap * OrphanFrameStartCap ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TCap currently used as the start cap for framing the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned cap. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFrameEndCap

virtual TCap * OrphanFrameEndCap ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TCap currently used as the end cap for framing the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned cap. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanFrameJoint

virtual TJoint * OrphanFrameJoint ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TJoint currently used when framing the graphic.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned joint style. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanImageSampling

virtual TImageSamplingControl * OrphanImageSampling ()

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the TImageSamplingControl currently used when painting with an image.

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned TImageSamplingControl. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanGrafAttribute

virtual TGrafAttribute * OrphanGrafAttribute (const TToken & attributeName)

Interface Category:

API.

Purpose:

Relinquishes knowledge and ownership of the extended attribute that has the specified name. (To remove a standard attribute, call the standard Orphan function provided for that attribute.)

Calling Context:

Call this function directly.

Parameters:

Return Value:

A pointer to the orphaned TImageSamplingControl. It is the caller's responsibility to subsequently delete the orphaned object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::OrphanPrimaryDitherHint

virtual TDitherHint * OrphanPrimaryDitherHint ()

Interface Category:

API.

Purpose:

This causes the graphics bundle to orphan its primary dither hint. This is the object used to suggest what form of dithering to use (if the display platform is capable of performing it).

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the newly-orphaned TDitherHint. If there is no dither hint defined, a NIL pointer is returned.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::AdjustBounds

virtual TGRect AdjustBounds (const TGRect & currentBounds) const

Interface Category:

API.

Purpose:

Computes the bounds of a graphic, taking the TGrafBundle's attributes into consideration. Frame attributes such as pen, joint, and cap styles can cause a graphic to be larger than the bounding rectangle of the geometry that the graphic contains. This function examines any attributes that can affect the bounds, and computes the loose fit bounds, based on the geometrical bounds passed in. TGrafAttribute derived classes should implement CanAdjustBounds and AdjustBounds so that the TGrafBundle object knows how to take those attributes into consideration. Despite its name, this function does not alter anything itself; it merely computes and returns a rectangle to be used elsewhere.

Calling Context:

Normally, this function is called by the Graphics system. However, you can call it directly.

Parameters:

Return Value:

The loose fit bounds.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::CreateGrafBundleIterator

virtual TGrafBundleIterator * CreateGrafBundleIterator ()

Interface Category:

API.

Purpose:

Creates an iterator that can access the bundle's extended attributes, but not the standard attributes. (Each standard attribute is accessible through a corresponding Get function.) If you know the names of the extended attributes, you can retrieve them directly with GetGrafAttribute. The iterator accesses them all without providing names.

Calling Context:

Called by the Graphics system, or directly.

Parameters:

Return Value:

A pointer to the new iterator object. The caller is responsible for subsequently deleting the iterator.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGrafBundle::operator=

TGrafBundle & operator =(const TGrafBundle & source)

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: TGrafBundle::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: TGrafBundle::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.