Class: TImagePatternPaint

Declaration: ImagePattern.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TPaint

Inherited By:

None.

Purpose:

TImagePatternPaint derives from TPaint and lets you define a repeating image pattern to fill or frame a TImage object. The current TImageSamplingControl attribute of the TImage bundle controls the filtering method used to sample the image. You construct a repeating image pattern from an image geometry or from another image pattern. The repeating image pattern is used to construct the bundle, which is then used to draw the image filled or outlined with the repeating pattern.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TImagePatternPaint::TImagePatternPaint

  1. TImagePatternPaint ()
  2. TImagePatternPaint (const TImagePatternPaint &)
  3. TImagePatternPaint (const TGImage & patternToCopy)
  4. TImagePatternPaint (TGImage * patternToAdopt)

Interface Category:

API.

Purpose:

  1. Default constructor. Initializes the pattern to NIL.
  2. Copy constructor.
  3. Creates a TImagePatternPaint and copies the specified TGImage as its pattern.
  4. Creates a TImagePatternPaint and adopts the specified TGImage as its pattern.

Calling Context:

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

virtual ~ TImagePatternPaint ()

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: TImagePatternPaint::OrphanImage

TGImage * OrphanImage ()

Interface Category:

API.

Purpose:

Removes TImagePatternPaint's reference to the TGImage object used for the pattern. The caller is responsible for deleting the TGImage.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the image previously used as the pattern.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TImagePatternPaint::GetImagePattern

virtual const TGImage * GetImagePattern () const

Interface Category:

API.

Purpose:

Gets the image currently being used for the image pattern.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a pointer to the TGImage object currently used as the pattern.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TImagePatternPaint::operator=

TImagePatternPaint & operator =(const TImagePatternPaint & 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: TImagePatternPaint::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: TImagePatternPaint::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: TImagePatternPaint::GetPaintStyle

virtual EPaintStyle GetPaintStyle () const

Interface Category:

API.

Purpose:

Returns kImagePattern, indicating that this paint style is an image pattern. kImagePattern is one of the tags in the enumerated type EPaintStyle defined in TPaint.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns kImagePattern.

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.