Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TModifiableImage
Inherited By:
None.
Purpose:
TGrayImage is a concrete 4-bit or 8-bit gray image. When the image is 4-bit gray, the gray component represents intensity, with 0 meaning black and 15 meaning white. When the image is 8-bit gray, the gray component represents intensity, with 0 meaning black and 255 meaning white. Specify either 4-bit or 8-bit gray when creating new instances of this class.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TGrayImage ()
- TGrayImage (const TImage &, EGrayImageType theDepth)
- TGrayImage (const TGrayImage &)
- TGrayImage (const TGPoint & dstOrigin, long widthInPixels, long heightInPixels, EGrayImageType theDepth, TGPoint dpi =TGImage :: k72DPI, TGrafBundle * adoptBundle =NIL, TGImage :: EOrientation orientation =TGImage :: kIdentity, const TColorProfile & theProfile =* TColorProfile :: GetDefaultColorProfile (), const TGPoint & sourceOrigin =TGPoint ( 0, 0 ))
- TGrayImage (const TGPoint & dstOrigin, const TGPoint & imageSizeInWorldSpace, EGrayImageType theDepth, 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:
- Default constructor.
- Creates a TGrayImage from another type of image.
- Copy constructor.
- Creates a TGrayImage initialized with the given parameters.
- Creates a TGrayImage initialized with the given parameters.
Calling Context:
- Called by the stream-in operators.
- Call to create a TGrayImage from another type of image.
- Called to copy an object.
- Call to create a new TGrayImage.
- Call to create a new TGrayImage.
Parameters:
- Takes no parameters.
- const TImage & -The image from which to construct the TGrayImage.
- EGrayImageType theDepth -The image depth of the new gray image.
- const TGrayImage & -The image to be copied.
- const TGPoint & dstOrigin -The origin of the image in world space.
- long widthInPixels -The width of the image measured in pixels.
- long heightInPixels -The height of the image measured in pixels.
- EGrayImageType theDepth -The image depth of the new gray image.
- TGPoint dpi =TGImage :: k72DPI -The vertical and horizontal resolution of the image. The default value for both axes is 72 dpi.
- TGrafBundle * adoptBundle =NIL -The initial attribute bundle for the image. The default value is NIL.
- TGImage :: EOrientation orientation =TGImage :: kIdentity -The initial orientation for the image. The default value is kIdentity; the orientation of the image as stored in memory.
- const TColorProfile & theProfile =* TColorProfile :: GetDefaultColorProfile () -The color profile for the image.
- const TGPoint & sourceOrigin =TGPoint ( 0 , 0 ) -The offscreen origin for the image.
- const TGPoint & dstOrigin -The origin of the image in world space.
- const TGPoint & imageSizeInWorldSpace -The height and width of the image in world space.
- EGrayImageType theDepth -The image depth of the new gray image.
- TGPoint dpi =TGImage :: k72DPI -The vertical and horizontal resolution of the image. The default value for both axes is 72 dpi.
- TGrafBundle * adoptBundle =NIL -The initial attribute bundle for the image. The default value is NIL.
- TGImage :: EOrientation orientation =TGImage :: kIdentity -The initial orientation for the image. The default value is kIdentity; the orientation of the image as stored in memory.
- const TColorProfile & theProfile =* TColorProfile :: GetDefaultColorProfile () -The color profile for the image.
- const TGPoint & sourceOrigin =TGPoint ( 0 , 0 ) -The offscreen origin for the image.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TGrayImage ()
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: TGrayImage::GetGrayLevels
EGrayImageType GetGrayLevels () const
Interface Category:
API.
Purpose:
Returns the gray level or image depth, which is one of the values of the enum EGrayImageType, defined by this class. It indicates whether the image is 4- or 8-bit gray.
Calling Context:
Call to determine the number of gray levels of the image.
Parameters:
Return Value:
Returns an EGrayImageType value indicating the image depth.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGrayImage::operator=
TGrayImage & operator =(const TGrayImage & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TGrayImage & source -The image to be copied.
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: TGrayImage::operator>>=
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream to which the object streams itself out.
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: TGrayImage::operator<<=
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream from which the object streams itself in.
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: TGrayImage::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: TGrayImage::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.