MÉTHODE ID2D1DeviceContext ::CreateBitmapBrush(ID2D1Bitmap*,constD2D1_BITMAP_BRUSH_PROPERTIES1&,constD2D1_BRUSH_PROPERTIES&,ID2D1BitmapBrush1**) (d2d1_1.h)

Crée un pinceau bitmap. L’image d’entrée est un objet bitmap Direct2D.

Syntaxe

HRESULT CreateBitmapBrush(
  [in]           ID2D1Bitmap                           *bitmap,
  [in, optional] const D2D1_BITMAP_BRUSH_PROPERTIES1 & bitmapBrushProperties,
  [in, optional] const D2D1_BRUSH_PROPERTIES &         brushProperties,
  [out]          ID2D1BitmapBrush1                     **bitmapBrush
);

Paramètres

[in] bitmap

Type : ID2D1Bitmap*

Bitmap à utiliser comme pinceau.

[in, optional] bitmapBrushProperties

Type : D2D1_BITMAP_BRUSH_PROPERTIES1*

Structure de propriétés de pinceau bitmap.

[in, optional] brushProperties

Type : D2D1_BRUSH_PROPERTIES*

Structure de propriétés de pinceau.

[out] bitmapBrush

Type : ID2D1BitmapBrush1**

Adresse de l’objet de pinceau bitmap nouvellement créé.

Valeur retournée

Type : HRESULT

Cette méthode retourne un code HRESULT. Les valeurs possibles sont notamment celles figurant dans le tableau suivant.

HRESULT Description
S_OK Aucune erreur ne s'est produite.
E_OUTOFMEMORY Direct2D n’a pas pu allouer suffisamment de mémoire pour terminer l’appel.
E_INVALIDARG Un paramètre non valide a été passé à la fonction de retour.

Configuration requise

   
Client minimal pris en charge Windows 8 et mise à jour de plateforme pour Windows 7 [applications de bureau | Applications UWP]
Serveur minimal pris en charge Windows Server 2012 et mise à jour de plateforme pour Windows Server 2008 R2 [applications de bureau | Applications UWP]
Plateforme cible Windows
En-tête d2d1_1.h
DLL D2d1.dll

Voir aussi

D2D1_BITMAP_BRUSH_PROPERTIES1

D2D1_BRUSH_PROPERTIES

ID2D1Bitmap

ID2D1BitmapBrush1

ID2D1DeviceContext