Graphics::Graphics method

Creates a Graphics::Graphics object that is associated with an Image object.

Syntax

void Graphics(
  IN Image *image
);

Parameters

image

Type: Image*

Pointer to an Image object that will be associated with the new Graphics::Graphics object.

Return Value

None

Remarks

This constructor fails if the Image object is based on a metafile that was opened for reading. The Image::Image(file) and Metafile::Metafile(file) constructors open a metafile for reading. To open a metafile for recording, use a Metafile constructor that receives a device context handle.

This constructor also fails if the image uses one of the following pixel formats:

  • PixelFormatUndefined
  • PixelFormatDontCare
  • PixelFormat1bppIndexed
  • PixelFormat4bppIndexed
  • PixelFormat8bppIndexed
  • PixelFormat16bppGrayScale
  • PixelFormat16bppARGB1555

Requirements

   
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusgraphics.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See Also

Changes in the Programming Model

Getting Started

Graphics

Graphics Constructors

Image