Class: TModifiableImage

Declaration: GraphicImage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TImage

Inherited By:

TA1R5G5B5Image TA8R8G8B8Image TAlpha8Gray8Image TC8M8Y8K8Image TGrayImage THalftoneImage TIndexedImage TR8G8B8Image Tb1R5G5B5Image Tb8R8G8B8Image

Purpose:

TModifiableImage provides a wrapper for TGModifiableImage, which is a geometry class representing a device-independent, pixel-based, editable image. Classes derived from TModifiableImage support various image storage formats such as continuous tone monochrome or color images, and transparent RGB images.

Instantiation:

Abstract base class; do not instantiate.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TModifiableImage::~TModifiableImage

virtual ~ TModifiableImage ()

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: TModifiableImage::GetImage

virtual const TGImage * GetImage () const

Interface Category:

API.

Purpose:

Returns an uneditable version of the image.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a const reference to the image geometry.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::GetGrafPort

TGrafPort * GetGrafPort ()

Interface Category:

API.

Purpose:

Returns the port used to draw into the image.

Calling Context:

Call to determine the image's graphics port.

Parameters:

Return Value:

Returns a reference to the graphics port used to draw the image.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::GetModifiableImage

TGModifiableImage * GetModifiableImage () const

Interface Category:

API.

Purpose:

Returns the image geometry for which this class is a wrapper. The returned image geometry is editable.

Calling Context:

Call to get an editable version of the image.

Parameters:

Return Value:

A reference to an editable version of the image.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::GetSourceBounds

virtual TGRect GetSourceBounds () const

Interface Category:

API.

Purpose:

Calculates and returns the bounding rectangle of the source image for the image object (in pixel space).

Calling Context:

Call to determine the bounds of the source image.

Parameters:

Return Value:

Returns the smallest rectangle that fully encloses the source image.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::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: TModifiableImage::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: TModifiableImage::TModifiableImage

  1. TModifiableImage ()
  2. TModifiableImage (const TModifiableImage &)
  3. TModifiableImage (const TImage &)
  4. TModifiableImage (const TGrafMatrix &, TGrafBundle * adoptBundle =NIL)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.
  3. Creates an editable version of a uneditable image.
  4. Creates an editable image initialized with the specified transformation matrix and attribute bundle.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.
  3. Call to create an editable version of a uneditable image.
  4. Call to create a TModifiableImage initialized with a transformation matrix and attribute bundle.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

TModifiableImage is an abstract base class. Do not allocate.

Member Function: TModifiableImage::operator=

TModifiableImage & operator =(const TModifiableImage & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Called when an object is assigned to another compatible object.

Parameters:

Return Value:

Returns a 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: TModifiableImage::AdoptImage

void AdoptImage (TGModifiableImage * theImage)

Interface Category:

API.

Purpose:

Allows caller to change the image of a modifiable image object.

Calling Context:

Called when changing the image of a preexistent modifiable image object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::AdoptGrafDevice

void AdoptGrafDevice (TGrafDevice * theGrafDevice)

Interface Category:

API.

Purpose:

Allows caller to change the device used by a modifiable image object.

Calling Context:

Called when changing the device of a preexistent modifiable image object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::CreateGrafDevice

virtual TGrafDevice * CreateGrafDevice ()

Interface Category:

API.

Purpose:

Creates a new rendering pipeline device for an image object.

Calling Context:

Called when no graphics device has been defined for the object.

Parameters:

Return Value:

Returns a pointer to a new graphics device.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TModifiableImage::GetSourceOrigin

virtual TGPoint GetSourceOrigin () const

Interface Category:

API.

Purpose:

Returns the defined origin for the source image of a given object.

Calling Context:

Called when the user needs to determine the origin of the source image.

Parameters:

Return Value:

Returns the coordinate which corresponds to the location of the origin of the source image (in pixel space).

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.