Share via


IXpsOMImageBrush interface

A brush that uses a raster image as a source.

When to implement

Never. Custom implementation of this interface is not supported.

Members

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

  • Methods

Methods

The IXpsOMImageBrush interface has these methods.

Method Description
Clone

Makes a deep copy of the interface.

GetColorProfileResource

Gets a pointer to the IXpsOMColorProfileResource interface, which contains the color profile resource that is associated with the image.

GetImageResource

Gets a pointer to the IXpsOMImageResource interface, which contains the image resource to be used as the source for the brush.

SetColorProfileResource

Sets a pointer to the IXpsOMColorProfileResource interface, which contains the color profile resource that is associated with the image.

SetImageResource

Sets a pointer to the IXpsOMImageResource interface that contains the image resource to be used as the source for the brush.

 

Remarks

The image used by this brush is defined in a coordinate space that is specified by the image's resolution. The image type must be JPEG, PNG, TIFF 6.0, or HD Photo.

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

IXpsOMImageBrush            *newInterface;
// The following values are defined outside of 
// this example.
//  IXpsOMImageResource     *image;
//  XPS_RECT                viewBox;
//  XPS_RECT                viewPort;

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

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

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

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::CreateImageBrush

Interfaces

XML Paper Specification