PathGradientBrush Functions

Windows GDI+ exposes a flat API that consists of about 600 functions, which are implemented in Gdiplus.dll and declared in Gdiplusflat.h. The functions in the GDI+ flat API are wrapped by a collection of about 40 C++ classes. It is recommended that you do not directly call the functions in the flat API. Whenever you make calls to GDI+, you should do so by calling the methods and functions provided by the C++ wrappers. Microsoft Product Support Services will not provide support for code that calls the flat API directly. For more information on using these wrapper methods, see GDI+ Flat API.

The following flat API functions are wrapped by the PathGradientBrush C++ class.

PathGradientBrush Functions and Corresponding Wrapper Methods

Flat function Wrapper method Remarks
GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF* points, INT count, GpWrapMode wrapMode, GpPathGradient **polyGradient)
PathGradientBrush::PathGradientBrush( IN const PointF* points, IN INT count, IN WrapMode wrapMode = WrapModeClamp)
Creates a PathGradientBrush object based on an array of points. Initializes the wrap mode of the path gradient brush.
GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint* points, INT count, GpWrapMode wrapMode, GpPathGradient **polyGradient)
PathGradientBrush::PathGradientBrush( IN const Point* points, IN INT count, IN WrapMode wrapMode = WrapModeClamp)
Creates a PathGradientBrush object based on an array of points. Initializes the wrap mode of the path gradient brush.
GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath* path, GpPathGradient **polyGradient)
PathGradientBrush::PathGradientBrush( IN const GraphicsPath* path )
Creates a PathGradientBrush object based on a GraphicsPath object.
GpStatus WINGDIPAPI GdipGetPathGradientCenterColor( GpPathGradient *brush, ARGB* colors)
Status PathGradientBrush::GetCenterColor(OUT Color* color) const
Gets the color of the center point of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientCenterColor( GpPathGradient *brush, ARGB colors)
Status PathGradientBrush::SetCenterColor(IN const Color& color)
Sets the center color of this path gradient brush. The center color is the color that appears at the brush's center point.
GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount( GpPathGradient *brush, ARGB* color, INT* count)
Status PathGradientBrush::GetSurroundColors(OUT Color* colors, IN OUT INT* count) const
Gets the surround colors currently specified for this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount( GpPathGradient *brush, GDIPCONST ARGB* color, INT* count)
Status PathGradientBrush::SetSurroundColors(IN const Color* colors, IN OUT INT* count)
Sets the surround colors of this path gradient brush. The surround colors are colors specified for discrete points on the brush's boundary path.
GpStatus WINGDIPAPI GdipGetPathGradientPath(GpPathGradient *brush, GpPath *path)
Status PathGradientBrush::GetGraphicsPath(OUT GraphicsPath* path) const
Is not implemented in GDI+ version 1.0.
GpStatus WINGDIPAPI GdipSetPathGradientPath(GpPathGradient *brush, GDIPCONST GpPath *path)
Status PathGradientBrush::SetGraphicsPath(IN const GraphicsPath* path)
Is not implemented in GDI+ version 1.0.
GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint( GpPathGradient *brush, GpPointF* points)
Status PathGradientBrush::GetCenterPoint(OUT PointF* point) const
Gets the center point of this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI( GpPathGradient *brush, GpPoint* points)
Status PathGradientBrush::GetCenterPoint(OUT Point* point) const
Gets the center point of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint( GpPathGradient *brush, GDIPCONST GpPointF* points)
Status PathGradientBrush::SetCenterPoint(IN const PointF& point)
Sets the center point of this path gradient brush. By default, the center point is at the centroid of the brush's boundary path, but you can set the center point to any location inside or outside the path.
GpStatus WINGDIPAPI GdipSetPathGradientCenterPointI( GpPathGradient *brush, GDIPCONST GpPoint* points)
Status PathGradientBrush::SetCenterPoint(IN const Point& point)
Sets the center point of this path gradient brush. By default, the center point is at the centroid of the brush's boundary path, but you can set the center point to any location inside or outside the path.
GpStatus WINGDIPAPI GdipGetPathGradientRect(GpPathGradient *brush, GpRectF *rect)
Status PathGradientBrush::GetRectangle(OUT RectF* rect) const
Gets the smallest rectangle that encloses the boundary path of this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientRectI(GpPathGradient *brush, GpRect *rect)
Status PathGradientBrush::GetRectangle(OUT Rect* rect) const
Gets the smallest rectangle that encloses the boundary path of this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient *brush, INT* count)
INT PathGradientBrush::GetPointCount() const
Gets the number of points in the array of points that defines this brush's boundary path.
GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorCount(GpPathGradient *brush, INT* count)
INT PathGradientBrush::GetSurroundColorCount() const
Gets the number of colors that have been specified for the boundary path of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient *brush, BOOL useGammaCorrection)
Status PathGradientBrush::SetGammaCorrection(IN BOOL useGammaCorrection)
Specifies whether gamma correction is enabled for this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient *brush, BOOL *useGammaCorrection)
BOOL PathGradientBrush::GetGammaCorrection() const
Determines whether gamma correction is enabled for this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientBlendCount(GpPathGradient *brush, INT *count)
INT PathGradientBrush::GetBlendCount() const
Gets the number of blend factors currently set for this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientBlend(GpPathGradient *brush, REAL *blend, REAL *positions, INT count)
PathGradientBrush::GetBlend(OUT REAL* blendFactors, OUT REAL* blendPositions, IN INT count) const
Gets the blend factors and the corresponding blend positions currently set for this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientBlend(GpPathGradient *brush, GDIPCONST REAL *blend, GDIPCONST REAL *positions, INT count)
Status PathGradientBrush::SetBlend(IN const REAL* blendFactors, IN const REAL* blendPositions, IN INT count)
Sets the blend factors and the blend positions of this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientPresetBlendCount(GpPathGradient *brush, INT *count)
INT PathGradientBrush::GetInterpolationColorCount() const
Gets the number of preset colors currently specified for this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientPresetBlend(GpPathGradient *brush, ARGB *blend, REAL* positions, INT count)
Status PathGradientBrush::GetInterpolationColors(OUT Color* presetColors, OUT REAL* blendPositions, IN INT count) const
Gets the preset colors and blend positions currently specified for this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientPresetBlend(GpPathGradient *brush, GDIPCONST ARGB *blend, GDIPCONST REAL* positions, INT count)
Status PathGradientBrush::SetInterpolationColors(IN const Color* presetColors, IN const REAL* blendPositions, IN INT count)
Sets the preset colors and the blend positions of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientSigmaBlend(GpPathGradient *brush, REAL focus, REAL scale)
Status PathGradientBrush::SetBlendBellShape(IN REAL focus, IN REAL scale = 1.0)
Sets the blend shape of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientLinearBlend(GpPathGradient *brush, REAL focus, REAL scale)
Status PathGradientBrush::SetBlendTriangularShape( IN REAL focus, IN REAL scale = 1.0 )
Sets the blend shape of this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient *brush, GpWrapMode *wrapmode)
WrapMode PathGradientBrush::GetWrapMode() const
Gets the wrap mode currently set for this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient *brush, GpWrapMode wrapmode)
Status PathGradientBrush::SetWrapMode(IN WrapMode wrapMode)
Sets the wrap mode of this path gradient brush.
GpStatus WINGDIPAPI GdipGetPathGradientTransform(GpPathGradient *brush, GpMatrix *matrix)
Status PathGradientBrush::GetTransform(OUT Matrix *matrix) const
Gets transformation matrix of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientTransform(GpPathGradient *brush, GpMatrix *matrix)
Status PathGradientBrush::SetTransform(IN const Matrix* matrix)
Sets the transformation matrix of this path gradient brush.
GpStatus WINGDIPAPI GdipResetPathGradientTransform(GpPathGradient* brush)
Status PathGradientBrush::ResetTransform()
Resets the transformation matrix of this path gradient brush to the identity matrix. This means that no transformation will take place.
GpStatus WINGDIPAPI GdipMultiplyPathGradientTransform(GpPathGradient* brush, GDIPCONST GpMatrix *matrix, GpMatrixOrder order)
Status PathGradientBrush::MultiplyTransform(IN const Matrix* matrix, IN MatrixOrder order = MatrixOrderPrepend)
Updates the brush's transformation matrix with the product of itself and another matrix.
GpStatus WINGDIPAPI GdipTranslatePathGradientTransform(GpPathGradient* brush, REAL dx, REAL dy, GpMatrixOrder order)
Status PathGradientBrush::TranslateTransform(IN REAL dx, IN REAL dy, IN MatrixOrder order = MatrixOrderPrepend)
Updates this brush's current transformation matrix with the product of itself and a translation matrix.
GpStatus WINGDIPAPI GdipScalePathGradientTransform(GpPathGradient* brush, REAL sx, REAL sy, GpMatrixOrder order)
Status PathGradientBrush::ScaleTransform(IN REAL sx, IN REAL sy, IN MatrixOrder order = MatrixOrderPrepend)
Updates this brush's current transformation matrix with the product of itself and a scaling matrix.
GpStatus WINGDIPAPI GdipRotatePathGradientTransform(GpPathGradient* brush, REAL angle, GpMatrixOrder order)
Status PathGradientBrush::RotateTransform(IN REAL angle, IN MatrixOrder order = MatrixOrderPrepend)
Updates this brush's current transformation matrix with the product of itself and a rotation matrix.
GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient *brush, REAL* xScale, REAL* yScale)
Status PathGradientBrush::GetFocusScales(OUT REAL* xScale, OUT REAL* yScale) const
Gets the focus scales of this path gradient brush.
GpStatus WINGDIPAPI GdipSetPathGradientFocusScales(GpPathGradient *brush, REAL xScale, REAL yScale)
Status PathGradientBrush::SetFocusScales(IN REAL xScale, IN REAL yScale)
Sets the focus scales of this path gradient brush