IXpsOMVisualBrush interface (xpsobjectmodel.h)
A brush that uses a visual element as a source.
Inheritance
The IXpsOMVisualBrush interface inherits from IXpsOMTileBrush. IXpsOMVisualBrush also has these types of members:
Methods
The IXpsOMVisualBrush interface has these methods.
IXpsOMVisualBrush::Clone Makes a deep copy of the interface. (IXpsOMVisualBrush.Clone) |
IXpsOMVisualBrush::GetVisual Gets a pointer to the interface of the resolved visual to be used as the source for the brush. |
IXpsOMVisualBrush::GetVisualLocal Gets a pointer to the interface of the local, unshared visual used as the source for the brush. |
IXpsOMVisualBrush::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. |
IXpsOMVisualBrush::SetVisualLocal Sets the interface pointer of the local, unshared visual used as the source for the brush. |
IXpsOMVisualBrush::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
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | xpsobjectmodel.h |