Share via


Graphics::Graphics(Image*)-Methode (gdiplusgraphics.h)

Erstellt ein Graphics::Graphics-Objekt , das einem Image-Objekt zugeordnet ist.

Syntax

void Graphics(
  [in] Image *image
);

Parameter

[in] image

Typ: Image*

Zeiger auf ein Image-Objekt , das dem neuen Graphics::Graphics-Objekt zugeordnet wird.

Rückgabewert

Keine

Bemerkungen

Dieser Konstruktor schlägt fehl, wenn das Image-Objekt auf einer Metadatei basiert, die zum Lesen geöffnet wurde. Die Konstruktoren Image::Image(file) und Metafile::Metafile(file) öffnen eine Metadatei zum Lesen. Um eine Metadatei für die Aufzeichnung zu öffnen, verwenden Sie einen Metafile-Konstruktor , der ein Gerätekontexthandle empfängt.

Dieser Konstruktor schlägt auch fehl, wenn das Bild eines der folgenden Pixelformate verwendet:

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

Anforderungen

   
Unterstützte Mindestversion (Client) Windows XP, Windows 2000 Professional [nur Desktop-Apps]
Unterstützte Mindestversion (Server) Windows 2000 Server [nur Desktop-Apps]
Zielplattform Windows
Kopfzeile gdiplusgraphics.h (include Gdiplus.h)
Bibliothek Gdiplus.lib
DLL Gdiplus.dll

Weitere Informationen

Änderungen am Programmiermodell

Erste Schritte

Grafiken

Grafikkonstruktoren

Bild