public final class PathGradientBrush extends Brush
Encapsulates a Brush object that fills the interior of a GraphicsPath object with a gradient.
This class cannot be inherited.
| Constructor and Description |
|---|
PathGradientBrush(GraphicsPath path)
Initializes a new instance of the
PathGradientBrush class with the specified path. |
PathGradientBrush(Point[] points)
Initializes a new instance of the
PathGradientBrush class with the specified points. |
PathGradientBrush(Point[] points,
int wrapMode)
Initializes a new instance of the
PathGradientBrush class with the specified points and wrap mode. |
PathGradientBrush(PointF[] points)
Initializes a new instance of the
PathGradientBrush class with the specified points. |
PathGradientBrush(PointF[] points,
int wrapMode)
Initializes a new instance of the
PathGradientBrush class with the specified points and wrap mode. |
| Modifier and Type | Method and Description |
|---|---|
Object |
deepClone()
Creates an exact copy of this
PathGradientBrush. |
Blend |
getBlend()
Gets or sets a
Blend(PathGradientBrush.getBlend()/PathGradientBrush.setBlend(Blend)) that specifies positions and factors that define
a custom falloff for the gradient. |
Color |
getCenterColor()
Gets or sets the color at the center of the path gradient.
|
PointF |
getCenterPoint()
Gets or sets the center point of the path gradient.
|
PointF |
getFocusScales()
Gets or sets the focus point for the gradient falloff.
|
ColorBlend |
getInterpolationColors()
Gets or sets a
ColorBlend that defines a multicolor linear gradient. |
RectangleF |
getRectangle()
Gets a bounding rectangle for this
PathGradientBrush. |
Color[] |
getSurroundColors()
Gets or sets an array of colors that correspond to the points in the path
this
PathGradientBrush fills. |
Matrix |
getTransform()
Gets or sets a copy of the
Matrix that defines a local geometric transform
for this PathGradientBrush. |
int |
getWrapMode()
Gets or sets a
WrapMode(PathGradientBrush.getWrapMode()/PathGradientBrush.setWrapMode(int)) that indicates the wrap mode
for this PathGradientBrush. |
void |
multiplyTransform(Matrix matrix)
Updates the brush's transformation matrix with the product of brush's transformation matrix
multiplied by another matrix.
|
void |
multiplyTransform(Matrix matrix,
int order)
Updates the brush's transformation matrix with the product of the brush's transformation matrix
multiplied by another matrix.
|
void |
resetTransform()
Resets the
PathGradientBrush.Transform property to identity. |
void |
rotateTransform(float angle)
Rotates the local geometric transform by the specified amount.
|
void |
rotateTransform(float angle,
int order)
Rotates the local geometric transform by the specified amount in the specified order.
|
void |
scaleTransform(float sx,
float sy)
Scales the local geometric transform by the specified amounts.
|
void |
scaleTransform(float sx,
float sy,
int order)
Scales the local geometric transform by the specified amounts in the specified order.
|
void |
setBlend(Blend value)
Gets or sets a
Blend(PathGradientBrush.getBlend()/PathGradientBrush.setBlend(Blend)) that specifies positions and factors that define
a custom falloff for the gradient. |
void |
setBlendTriangularShape(float focus)
Creates a gradient with a center color and a linear falloff to one surrounding color.
|
void |
setBlendTriangularShape(float focus,
float scale)
Creates a gradient with a center color and a linear falloff to each surrounding color.
|
void |
setCenterColor(Color value)
Gets or sets the color at the center of the path gradient.
|
void |
setCenterPoint(PointF value)
Gets or sets the center point of the path gradient.
|
void |
setFocusScales(PointF value)
Gets or sets the focus point for the gradient falloff.
|
void |
setInterpolationColors(ColorBlend value)
Gets or sets a
ColorBlend that defines a multicolor linear gradient. |
void |
setSigmaBellShape(float focus)
Creates a gradient brush that changes color starting from the center of the path outward to the path's boundary.
|
void |
setSigmaBellShape(float focus,
float scale)
Creates a gradient brush that changes color starting from the center of the path outward to the path's boundary.
|
void |
setSurroundColors(Color[] value)
Gets or sets an array of colors that correspond to the points in the path
this
PathGradientBrush fills. |
void |
setTransform(Matrix value)
Gets or sets a copy of the
Matrix that defines a local geometric transform
for this PathGradientBrush. |
void |
setWrapMode(int value)
Gets or sets a
WrapMode(PathGradientBrush.getWrapMode()/PathGradientBrush.setWrapMode(int)) that indicates the wrap mode
for this PathGradientBrush. |
void |
translateTransform(float dx,
float dy)
Applies the specified translation to the local geometric transform.
|
void |
translateTransform(float dx,
float dy,
int order)
Applies the specified translation to the local geometric transform in the specified order.
|
public PathGradientBrush(PointF[] points)
Initializes a new instance of the PathGradientBrush class with the specified points.
points - An array of PointF structures that represents the points
that make up the vertices of the path.public PathGradientBrush(PointF[] points, int wrapMode)
Initializes a new instance of the PathGradientBrush class with the specified points and wrap mode.
points - An array of PointF structures that represents the points
that make up the vertices of the path.wrapMode - A WrapMode(PathGradientBrush.getWrapMode()/PathGradientBrush.setWrapMode(int)) that specifies how fills drawn with
this PathGradientBrush are tiled.public PathGradientBrush(Point[] points)
Initializes a new instance of the PathGradientBrush class with the specified points.
points - An array of Point structures that represents the points
that make up the vertices of the path.public PathGradientBrush(Point[] points, int wrapMode)
Initializes a new instance of the PathGradientBrush class with the specified points and wrap mode.
points - An array of Point structures that represents the points that make up
the vertices of the path.wrapMode - A WrapMode(PathGradientBrush.getWrapMode()/PathGradientBrush.setWrapMode(int)) that specifies how fills drawn with
this PathGradientBrush are tiled.public PathGradientBrush(GraphicsPath path)
Initializes a new instance of the PathGradientBrush class with the specified path.
path - The GraphicsPath that defines the area filled by
this PathGradientBrush.public Color getCenterColor()
Gets or sets the color at the center of the path gradient.
public void setCenterColor(Color value)
Gets or sets the color at the center of the path gradient.
public Color[] getSurroundColors()
Gets or sets an array of colors that correspond to the points in the path
this PathGradientBrush fills.
public void setSurroundColors(Color[] value)
Gets or sets an array of colors that correspond to the points in the path
this PathGradientBrush fills.
public PointF getCenterPoint()
Gets or sets the center point of the path gradient.
public void setCenterPoint(PointF value)
Gets or sets the center point of the path gradient.
public RectangleF getRectangle()
Gets a bounding rectangle for this PathGradientBrush.
public Blend getBlend()
Gets or sets a Blend(PathGradientBrush.getBlend()/PathGradientBrush.setBlend(Blend)) that specifies positions and factors that define
a custom falloff for the gradient.
public void setBlend(Blend value)
Gets or sets a Blend(PathGradientBrush.getBlend()/PathGradientBrush.setBlend(Blend)) that specifies positions and factors that define
a custom falloff for the gradient.
public ColorBlend getInterpolationColors()
Gets or sets a ColorBlend that defines a multicolor linear gradient.
public void setInterpolationColors(ColorBlend value)
Gets or sets a ColorBlend that defines a multicolor linear gradient.
public Matrix getTransform()
Gets or sets a copy of the Matrix that defines a local geometric transform
for this PathGradientBrush.
public void setTransform(Matrix value)
Gets or sets a copy of the Matrix that defines a local geometric transform
for this PathGradientBrush.
public PointF getFocusScales()
Gets or sets the focus point for the gradient falloff.
public void setFocusScales(PointF value)
Gets or sets the focus point for the gradient falloff.
public int getWrapMode()
Gets or sets a WrapMode(PathGradientBrush.getWrapMode()/PathGradientBrush.setWrapMode(int)) that indicates the wrap mode
for this PathGradientBrush.
public void setWrapMode(int value)
Gets or sets a WrapMode(PathGradientBrush.getWrapMode()/PathGradientBrush.setWrapMode(int)) that indicates the wrap mode
for this PathGradientBrush.
public Object deepClone()
Creates an exact copy of this PathGradientBrush.
deepClone in class BrushPathGradientBrush this method creates, cast as an object.public void setSigmaBellShape(float focus)
Creates a gradient brush that changes color starting from the center of the path outward to the path's boundary. The transition from one color to another is based on a bell-shaped curve.
focus - A value from 0 through 1 that specifies where, along any radial from the center of the path
to the path's boundary, the center color will be at its highest intensity.
A value of 1 (the default) places the highest intensity at the center of the path.public void setSigmaBellShape(float focus,
float scale)
Creates a gradient brush that changes color starting from the center of the path outward to the path's boundary. The transition from one color to another is based on a bell-shaped curve.
focus - A value from 0 through 1 that specifies where, along any radial from the center of the path
to the path's boundary, the center color will be at its highest intensity.
A value of 1 (the default) places the highest intensity at the center of the path.scale - A value from 0 through 1 that specifies the maximum intensity of the center color that gets
blended with the boundary color. A value of 1 causes the highest possible intensity of the center color,
and it is the default value.public void setBlendTriangularShape(float focus)
Creates a gradient with a center color and a linear falloff to one surrounding color.
focus - A value from 0 through 1 that specifies where, along any radial from the center of the path
to the path's boundary, the center color will be at its highest intensity.
A value of 1 (the default) places the highest intensity at the center of the path.public void setBlendTriangularShape(float focus,
float scale)
Creates a gradient with a center color and a linear falloff to each surrounding color.
focus - A value from 0 through 1 that specifies where, along any radial from the center of the path
to the path's boundary, the center color will be at its highest intensity.
A value of 1 (the default) places the highest intensity at the center of the path.scale - A value from 0 through 1 that specifies the maximum intensity of the center color that gets
blended with the boundary color. A value of 1 causes the highest possible intensity of the center color,
and it is the default value.public void resetTransform()
Resets the PathGradientBrush.Transform property to identity.
public void multiplyTransform(Matrix matrix)
Updates the brush's transformation matrix with the product of brush's transformation matrix multiplied by another matrix.
matrix - The Matrix that will be multiplied by the brush's current transformation matrix.public void multiplyTransform(Matrix matrix, int order)
Updates the brush's transformation matrix with the product of the brush's transformation matrix multiplied by another matrix.
matrix - The Matrix that will be multiplied by the brush's current transformation matrix.order - A MatrixOrder that specifies in which order to multiply the two matrices.public void translateTransform(float dx,
float dy)
Applies the specified translation to the local geometric transform. This method prepends the translation to the transform.
dx - The value of the translation in x.dy - The value of the translation in y.public void translateTransform(float dx,
float dy,
int order)
Applies the specified translation to the local geometric transform in the specified order.
dx - The value of the translation in x.dy - The value of the translation in y.order - The order (prepend or append) in which to apply the translation.public void scaleTransform(float sx,
float sy)
Scales the local geometric transform by the specified amounts. This method prepends the scaling matrix to the transform.
sx - The transform scale factor in the x-axis direction.sy - The transform scale factor in the y-axis direction.public void scaleTransform(float sx,
float sy,
int order)
Scales the local geometric transform by the specified amounts in the specified order.
sx - The transform scale factor in the x-axis direction.sy - The transform scale factor in the y-axis direction.order - A MatrixOrder that specifies whether to append or prepend the scaling matrix.public void rotateTransform(float angle)
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
angle - The angle (extent) of rotation.public void rotateTransform(float angle,
int order)
Rotates the local geometric transform by the specified amount in the specified order.
angle - The angle (extent) of rotation.order - A MatrixOrder that specifies whether to append or prepend the rotation matrix.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.