### IGImage

  IGImage provides a device-independent, uneditable, pixel-based geometry.

### IGImage - Member Functions and Data by Group

### Constructors & Destructor

Use these functions to construct and destroy IGImage objects based in a device-independent, uneditable, pixel-based geometry.

~IGImage

      public:
      ~IGImage()

  Destructor.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IGImage
  Creates a 2-D graphics image object of class IGImage.

  Overload 1
  Creates an IGImage object that is a subregion of an image.

      public:
      IGImage(const IGImage&, const IGRect2D&)

  Use this constructor to create an IGImage object that is a subregion of the given original image as defined by the given rectangle.

  IGImage
    A constant reference to the original, whole image whose subregion is used to construct the new image.
  const IGRect2D&
    The specified window, or subregion, of the original image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Creates an IGImage object as a mask image. Only the specified color is allowed to be seen.

      public:
      IGImage( const IGImage& origImage,
               const IBaseColor& tranparentColor )

  Use this constructor to create an IGImage object as a mask image that shows that part of the original image depicted in the color specified by the transparentColor parameter.

  origImage
    The source image to be used to create the mask.
  tranparentColor
    The transparent specified color.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3
  Creates an IGImage using a bitmap handle.

      public:
      IGImage(const IBitmapHandle& bitmapHandle)

  Use this constructor to create an IGImage object from the specified bitmap handle.

  bitmapHandle
    The bitmap handle used to construct the image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

  Creates an IGImage with the specified width, height, type, orientation, and color map.

      public:
      IGImage( unsigned long width,
               unsigned long height,
               EImageType theType,
               ICoordinateSystem::EOrientation orientation = ICoordinateSystem::applicationOrientation ( ),
               IColorMap* colmap = & ( IColorMap::defaultColorMap ( ) ) )

  Use this constructor to create an IGImage object using the specified width, height, type, orientation, and color map.

  width
    The width of the image.
  height
    The height of the image.
  theType
    The type of the image defined by EImageType.
  orientation
    The orientation of the image.
  colmap
    The color map of the image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 5
  Copy constructor.

      public:
      IGImage(const IGImage&)

  Use this constructor to create an IGImage object copied from the given one.

  const IGImage&
    The image to be copied.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 6
  Default constructor.

      public:
      IGImage()

  Use this constructor to creates an empty IGImage object, that is, an IGImage object with empty handles, an empty device context, and an empty graphics port.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Assignment Operator

Use this function to assign one image to another.

operator =

      public:
      const IGImage& operator =(const IGImage& source)

  Assignment operator.

  source
    The image to be copied.

Return
  A reference to the left-hand side object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Capturing the Bitmap Image

Use the functions in this group to capture bitmap images.

captureImage

      public:
      static IBitmapHandle
        captureImage( IPresSpaceHandle& srcDeviceContext,
                      const IGRect2D& imageArea )

  Captures the bitmap image from a given device, such as a screen device.

  srcDeviceContext
    The screen device context for the image to be captured.
  imageArea
    The window onto the image to be captured.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Creating an Image's Color Table and Graphics Port

Use the functions in this group to create aspects of an image, such as its color table and the graphics port for it.

createColorTable

      public:
      IRGBAColorArray* createColorTable() const

  Creates a color table for this image.

Return
  A pointer to the new color array.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

grafPort

      public:
      IGrafPort* grafPort()

  Creates a new graphics port for the image.

Return
  A pointer to the new graphics port (IGrafPort).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Getting Image Boundaries

Use these functions to obtain image boundary information. Use imageBounds to obtain the WYSIWYG, user-space image boundary and rasterBounds to obtain the boundary of the image's defining rectangle.

imageBounds

      public:
      static IGRect2D imageBounds(const IGImage& theImage)

  Calculates and returns the boundary, in user space, for the specified image. This is the WYSIWYG bounds.

  theImage
    The image whose bounding rectangle is calculated.

Return
  An IGRect2D containing the bounding rectangle in user space for the specified image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

rasterBounds

      public:
      IGRect2D rasterBounds() const

  Returns the raster bounds of the image, that is, the rectangle defining the active area.

Return
  An IGRect2D containing the raster bounds for the image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Getting the Image's Color Table

Use this function to obtain the color table for the image.

imageColorTable

      public:
      IRGBAColorArray imageColorTable() const

  Returns the color table for the image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Obtaining a Handle

Use these functions to obtain image handles.

handle
  Gets the handle for the image.

      public:
      IBitmapHandle handle() const

  This function returns an IBitmapHandle for the image. The handle returned by a previous call to this function is rendered invalid if one of the following functions is called: reflectHorizontally, reflectVertically, rotateBy180, rotateBy90, transposeXForY, and sizeTo.

Return
  The handle.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

imageHandle

      public:
      unsigned long imageHandle() const

  Returns a handle to the image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

maskImageHandle

      public:
      IBitmapHandle maskImageHandle() const

  Returns a handle to the mask image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Reflecting the Image

Use these functions to reflect an image horizontally or vertically and obtain a reference to the reflected image.

reflectHorizontally
  Reflects the image horizontally.

      public:
      IGImage& reflectHorizontally()

  This function invalidates the previous call to the handle function. To obtain a valid handle for IGImage, call the handle function again.

Return
  A reference to the reflected image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

reflectVertically
  Reflects the image vertically.

      public:
      IGImage& reflectVertically()

  This function invalidates the previous call to the handle function. To obtain a valid handle for IGImage, call the handle function again.

Return
  A reference to the reflected image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Rotating and Transposing the Image

Use these functions to rotate an image by a certain number of degrees:90, 180. 270 or to transpose it.

rotateBy180
  Rotates the image by 180 degrees.

      public:
      IGImage& rotateBy180()

  This function invalidates the previous call to the handle function. Call it again to obtain a valid handle.

Return
  A reference to the rotated image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

rotateBy270
  Rotates the image by 270 degrees.

      public:
      IGImage& rotateBy270()

  This function invalidates the previous call to the handle function. Call it again to obtain a valid handle.

Return
  A reference to the rotated image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

rotateBy90
  Rotates the image by 90 degrees.

      public:
      IGImage& rotateBy90()

  This function invalidates the previous call to the handle function. Call it again to obtain a valid handle to the image.

Return
  A reference to the rotated image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

transposeXForY
  Transposes the image.

      public:
      IGImage& transposeXForY()

  This function invalidates the previous call to the handle function. Call it again to obtain a valid handle to the image.

Return
  A reference to the transposed image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Scaling an Image

Use this function to scale the image.

sizeTo
  Scales the image to the given size.

      public:
      IGImage& sizeTo(const IGPoint2D& newSize)

  This function invalidates the previous call to the handle function. Call it again to obtain a valid handle to the image.

  newSize
    The specified new size of the image.

Return
  A reference to the scaled image.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming an Image Object In and Out

Use the functions and operators in this group to stream an image object in and out. The streaming functions are readFromStream and writeToStream. The operators as operator <<= and operator >>=.

operator <<=

      public:
      IDataStream& operator <<=(IDataStream& fromWhere)

  Operator that streams in the image object using the polymorphic streaming specified by fromWhere.

  fromWhere
    The stream for streaming in this image object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator >>=

      public:
      IDataStream& operator >>=(IDataStream& toWhere) const

  Operator that streams out the image object using the polymorphic streaming specified by toWhere.

  toWhere
    The stream for streaming out this image object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readFromStream

      public:
      virtual void readFromStream(IDataStream& toWhere)

  Streams in the object using the polymorphic streaming specified by fromWhere.

  fromWhere
    The stream used to stream in this object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeToStream

      public:
      virtual void writeToStream(IDataStream& toWhere) const

  Streams out the image object using the polymorphic streaming specified by toWhere.

  toWhere
    The stream for streaming out this image object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Testing Images for Equality

Use the functions in this group to test two images for equality or inequality.

operator !=

      public:
      bool operator !=(const IGImage&) const

  Tests two images for inequality.

  IGImage
    The image to be compared with this one.

Return
  True if one or more corresponding pixels of the two images are not equal.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator ==

      public:
      bool operator ==(const IGImage&) const

  Tests two images for equality.

  IGImage
    The image to be compared with this one.

Return
  True if all corresponding pixels of the two images are equal.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Working with the Transparency Color and Setting

Use these functions to get and set the transparency color.

setTransparencyColor

      public:
      void setTransparencyColor(const IBaseColor& clr)

  Sets the transparency color.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setTransparencyFlag

      public:
      void setTransparencyFlag(bool)

  Sets the transparency flag.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

transparencyColor

      public:
      IBaseColor transparencyColor() const

  Returns the transparency color.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

transparencyFlag

      public:
      bool transparencyFlag() const

  Returns the transparency flag.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Miscellaneous Members

addRef

      public:
      unsigned long addRef()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

copyBitmap

      public:
      IBitmapHandle copyBitmap() const

  Returns an unreference-counted copy of the image as an IBitmapHandle allowing the handle to be passed to the operating system without the image being destroyed. This function is primarily intended for the internal use of the library.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

removeRef

      public:
      unsigned long removeRef()

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

useCount

      public:
      unsigned long useCount() const

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IGImage - Enumerations

EImageType

      enum EImageType { kMonochrome1Bit=0,
                        k16Color4Bit,
                        k256Color8Bit,
                        kTrueColor24Bit }

  Image type.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IGImage - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None