IXpsOMRadialGradientBrush interface (xpsobjectmodel.h)
Specifies a radial gradient.
Inheritance
The IXpsOMRadialGradientBrush interface inherits from IXpsOMGradientBrush. IXpsOMRadialGradientBrush also has these types of members:
Methods
The IXpsOMRadialGradientBrush interface has these methods.
IXpsOMRadialGradientBrush::Clone Makes a deep copy of the interface. (IXpsOMRadialGradientBrush.Clone) |
IXpsOMRadialGradientBrush::GetCenter Gets the center point of the radial gradient region ellipse. |
IXpsOMRadialGradientBrush::GetGradientOrigin Gets the origin point of the radial gradient. |
IXpsOMRadialGradientBrush::GetRadiiSizes Gets the sizes of the radii that define the ellipse of the radial gradient region. |
IXpsOMRadialGradientBrush::SetCenter Sets the center point of the radial gradient region ellipse. |
IXpsOMRadialGradientBrush::SetGradientOrigin Sets the origin point of the radial gradient. |
IXpsOMRadialGradientBrush::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.
![A figure that shows the terms used in a radial gradient](images/radialgradient1.png)
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
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 |