Share via


Graphics::Graphics(Image*) , méthode (gdiplusgraphics.h)

Crée un objet Graphics::Graphics associé à un objet Image .

Syntaxe

void Graphics(
  [in] Image *image
);

Paramètres

[in] image

Type : Image*

Pointeur vers un objet Image qui sera associé au nouvel objet Graphics::Graphics .

Valeur de retour

None

Notes

Ce constructeur échoue si l’objet Image est basé sur un métafichier ouvert pour lecture. Les constructeurs Image::Image(file) et Metafile::Metafile(file) ouvrent un métafichier pour la lecture. Pour ouvrir un métafichier pour l’enregistrement, utilisez un constructeur Metafile qui reçoit un handle de contexte d’appareil.

Ce constructeur échoue également si l’image utilise l’un des formats de pixels suivants :

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

Spécifications

   
Client minimal pris en charge Windows XP, Windows 2000 Professionnel [applications de bureau uniquement]
Serveur minimal pris en charge Windows 2000 Server [applications de bureau uniquement]
Plateforme cible Windows
En-tête gdiplusgraphics.h (inclure Gdiplus.h)
Bibliothèque Gdiplus.lib
DLL Gdiplus.dll

Voir aussi

Changements dans le modèle de programmation

Prise en main

Graphismes

Constructeurs graphiques

Image