ID2D1RenderTarget ::CreateBitmapBrush(ID2D1Bitmap*,ID2D1BitmapBrush**) méthode (d2d1.h)
Crée un objet ID2D1BitmapBrush à partir de la bitmap spécifiée. Le pinceau utilise les valeurs par défaut pour son mode d’extension, son mode d’interpolation, son opacité et sa transformation.
Syntaxe
HRESULT CreateBitmapBrush(
[in] ID2D1Bitmap *bitmap,
[out] ID2D1BitmapBrush **bitmapBrush
);
Paramètres
[in] bitmap
Type : ID2D1Bitmap*
Contenu bitmap du nouveau pinceau.
[out] bitmapBrush
Type : ID2D1BitmapBrush**
Lorsque cette méthode est retournée, contient un pointeur vers un pointeur vers le nouveau pinceau. Ce paramètre est passé sans être initialisé.
Valeur retournée
Type : HRESULT
Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT .
Remarques
Le pinceau bitmap créé par cette méthode a D2D1_EXTEND_MODE_CLAMP modes d’extension horizontal et vertical et le mode d’interpolation D2D1_BITMAP_INTERPOLATION_MODE_LINEAR . Son opacité est 1.0f et sa transformation est la matrice d’identité.
Exemples
Pour obtenir un exemple montrant comment peindre une zone avec un pinceau bitmap, consultez How to Create a Bitmap Brush.
Configuration requise
Condition requise | Valeur |
---|---|
Client minimal pris en charge | Windows 7, Windows Vista avec SP2 et Mise à jour de plateforme pour Windows Vista [applications de bureau | Applications UWP] |
Serveur minimal pris en charge | Windows Server 2008 R2, Windows Server 2008 avec SP2 et Platform Update pour Windows Server 2008 [applications de bureau | Applications UWP] |
Plateforme cible | Windows |
En-tête | d2d1.h |
Bibliothèque | D2d1.lib |
DLL | D2d1.dll |