Share via


Interface IXpsOMSolidColorBrush (xpsobjectmodel.h)

Pinceau unicolore.

Héritage

L’interface IXpsOMSolidColorBrush hérite d’IXpsOMBrush. IXpsOMSolidColorBrush a également ces types de membres :

Méthodes

L’interface IXpsOMSolidColorBrush utilise ces méthodes.

 
IXpsOMSolidColorBrush ::Clone

Effectue une copie complète de l’interface. (IXpsOMSolidColorBrush.Clone)
IXpsOMSolidColorBrush ::GetColor

Obtient la valeur de couleur et le profil de couleur du pinceau.
IXpsOMSolidColorBrush ::SetColor

Définit la valeur de couleur et le profil de couleur du pinceau.

Remarques

L’exemple de code qui suit montre comment créer une instance de cette interface.


IXpsOMSolidColorBrush             *newInterface;
// The following values are defined outside of 
// this example.
//  XPS_COLOR                     color;
//  IXpsOMColorProfileResource    *colorProfile;

// Note the implicit requirement that CoInitializeEx 
//  has previously been called from this thread.

hr = CoCreateInstance(
    __uuidof(XpsOMObjectFactory),
    NULL,
    CLSCTX_INPROC_SERVER,
    _uuidof(IXpsOMObjectFactory),
    reinterpret_cast<LPVOID*>(&xpsFactory)
    );

if (SUCCEEDED(hr))
{
    hr = xpsFactory->CreateSolidColorBrush (
        &color,
        colorProfile,
        &newInterface);

    if (SUCCEEDED(hr))
    {
        // use newInterface

        newInterface->Release();
    }
    xpsFactory->Release();
}
else
{
    // evaluate HRESULT error returned in hr
}

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 xpsobjectmodel.h

Voir aussi

IXpsOMBrush

IXpsOMObjectFactory ::CreateSolidColorBrush

IXpsOMObjectFactory ::CreateSolidColorBrush

Interfaces

XML Paper Specification