IXpsOMRadialGradientBrush interface
Specifies a radial gradient.
When to implement
Never. Custom implementation of this interface is not supported.
Members
The IXpsOMRadialGradientBrush interface inherits from IXpsOMGradientBrush. IXpsOMRadialGradientBrush also has these types of members:
- Methods
Methods
The IXpsOMRadialGradientBrush interface has these methods.
Method | Description |
---|---|
Clone | Makes a deep copy of the interface. |
GetCenter | Gets the center point of the radial gradient region ellipse. |
GetGradientOrigin | Gets the origin point of the radial gradient. |
GetRadiiSizes | Gets the sizes of the radii that define the ellipse of the radial gradient region. |
SetCenter | Sets the center point of the radial gradient region ellipse. |
SetGradientOrigin | Sets the origin point of the radial gradient. |
SetRadiiSizes | Sets the sizes of the radii that define ellipse of the radial gradient region. |
Remarks
As shown in the figure that follows, the gradient region of a radial gradient is the area enclosed by the ellipse that is described by the center point and the x and y radii that extend from the center point. The spread area is the area outside of that ellipse. The gradient path (not shown) is a radial line that is drawn between the gradient origin and the ellipse that bounds the gradient region.
The code example that follows illustrates how to create an instance of this interface.
IXpsOMRadialGradientBrush *newInterface;
// The following values are defined outside of
// this example.
// IXpsOMGradientStop *gradStop1, *gradStop2;
// XPS_POINT centerPoint, gradientOrigin;
// XPS_SIZE radiiSizes;
// 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->CreateRadialGradientBrush (
gradStop1,
gradStop2,
¢erPoint,
&gradientOrigin,
&radiiSizes,
&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 |