Freigeben über


IXpsOMVisualBrush interface

A brush that uses a visual element as a source.

When to implement

Never. Custom implementation of this interface is not supported.

Members

The IXpsOMVisualBrush interface inherits from IXpsOMTileBrush. IXpsOMVisualBrush also has these types of members:

  • Methods

Methods

The IXpsOMVisualBrush interface has these methods.

Method Description
Clone

Makes a deep copy of the interface.

GetVisual

Gets a pointer to the interface of the resolved visual to be used as the source for the brush.

GetVisualLocal

Gets a pointer to the interface of the local, unshared visual used as the source for the brush.

GetVisualLookup

Gets the lookup key name of a visual in a resource dictionary; the visual is to be used as the source for the brush.

SetVisualLocal

Sets the interface pointer of the local, unshared visual used as the source for the brush.

SetVisualLookup

Sets the lookup key name of the shared visual, which is stored in a resource dictionary, to be used as the source for the brush.

 

Remarks

The code example that follows illustrates how to create an instance of this interface.

IXpsOMVisualBrush        *newInterface;

// 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->CreateVisualBrush (
        &viewBox,
        &viewPort,
        &newInterface);

    if (SUCCEEDED(hr))
    {
        // assign visual using one of the following:
        newInterface->SetVisualLocal (localVisual);
        // or
        newInterface->SetVisualLookup (visualLookupKey);
        // use newInterface

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

newInterface->Release();
xpsFactory->Release();

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMTileBrush

IXpsOMObjectFactory::CreateVisualBrush

IXpsOMCanvas

IXpsOMGlyphs

IXpsOMPath

IXpsOMVisual

Interfaces

XML Paper Specification