Class: THalftoneImage

Declaration: GraphicImage.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TModifiableImage

Inherited By:

None.

Purpose:

THalftoneImage is a concrete halftone image. Halftoning is the process by which grays and colors are simulated by using multiple device pixels to represent a single image pixel. You can see halftoning in action in any newspaper. Look at any picture and you can see that the image is comprised of thousands of tiny dots. This class and its derived classes use frequency, angle, and spot function to implement halftone algorithms. Frequency is the number of halftone cells per inch. Angle defines the angle at which the halftone screen is placed over device space. The spot function defines the shape of the halftone dots. THalftoneImage is a bitmapped image that carries with it its own halftone pixel buffer.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: THalftoneImage::THalftoneImage

  1. THalftoneImage ()
  2. THalftoneImage (const TImage &)
  3. THalftoneImage (const THalftoneImage &)
  4. THalftoneImage (const TGPoint & dstOrigin, long widthInPixels, long heightInPixels, TGPoint dpi =TGImage :: k72DPI, TGrafBundle * adoptBundle =NIL, TGImage :: EOrientation orientation =TGImage :: kIdentity, const TColorProfile & theProfile =* TColorProfile :: GetDefaultColorProfile (), const TGPoint & sourceOrigin =TGPoint ( 0, 0 ))
  5. THalftoneImage (const TGPoint & dstOrigin, const TGPoint & imageSizeInWorldSpace, TGPoint dpi =TGImage :: k72DPI, TGrafBundle * adoptBundle =NIL, TGImage :: EOrientation orientation =TGImage :: kIdentity, const TColorProfile & theProfile =* TColorProfile :: GetDefaultColorProfile (), const TGPoint & sourceOrigin =TGPoint ( 0, 0 ))

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a THalftoneImage from another type of image.
  3. Copy constructor.
  4. Creates a THalftoneImage initialized with the given parameters.
  5. Creates a THalftoneImage initialized with the given parameters.

Calling Context:

  1. Called by the stream-in operators.
  2. Call to create a THalftoneImage from another type of image.
  3. Called to copy an object.
  4. Call to create a new THalftoneImage.
  5. Call to create a new THalftoneImage.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: THalftoneImage::~THalftoneImage

virtual ~ THalftoneImage ()

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: THalftoneImage::CreateHalftoneCopy

THalftoneDither * CreateHalftoneCopy () const

Interface Category:

API.

Purpose:

Creates and returns the THalftoneDither object representing the halftoning algorithm for the image.

Calling Context:

Call to create the halftone dither object for the image.

Parameters:

Return Value:

Returns a reference to the newly created halftone dither object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: THalftoneImage::SetHalftone

void SetHalftone (const THalftoneDither &)

Interface Category:

API.

Purpose:

Establishes the halftone for the image to the specified THalftoneDither object.

Calling Context:

Call to change the halftone dither object for the image.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: THalftoneImage::operator=

THalftoneImage & operator =(const THalftoneImage & 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: THalftoneImage::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: THalftoneImage::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: THalftoneImage::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: THalftoneImage::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.