PathGradientBrush
Inheritance: java.lang.Object, com.aspose.drawing.Brush
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.
Constructors
Constructor | Description |
---|---|
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. |
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(GraphicsPath path) | Initializes a new instance of the PathGradientBrush class with the specified path. |
Methods
Method | Description |
---|---|
getCenterColor() | Gets or sets the color at the center of the path gradient. |
setCenterColor(Color value) | Gets or sets the color at the center of the path gradient. |
getSurroundColors() | Gets or sets an array of colors that correspond to the points in the path this PathGradientBrush fills. |
setSurroundColors(Color[] value) | Gets or sets an array of colors that correspond to the points in the path this PathGradientBrush fills. |
getCenterPoint() | Gets or sets the center point of the path gradient. |
setCenterPoint(PointF value) | Gets or sets the center point of the path gradient. |
getRectangle() | Gets a bounding rectangle for this PathGradientBrush. |
getBlend() | Gets or sets a Blend (.getBlend/.setBlend(Blend)) that specifies positions and factors that define a custom falloff for the gradient. |
setBlend(Blend value) | Gets or sets a Blend (.getBlend/.setBlend(Blend)) that specifies positions and factors that define a custom falloff for the gradient. |
getInterpolationColors() | Gets or sets a ColorBlend that defines a multicolor linear gradient. |
setInterpolationColors(ColorBlend value) | Gets or sets a ColorBlend that defines a multicolor linear gradient. |
getTransform() | Gets or sets a copy of the Matrix that defines a local geometric transform for this PathGradientBrush. |
setTransform(Matrix value) | Gets or sets a copy of the Matrix that defines a local geometric transform for this PathGradientBrush. |
getFocusScales() | Gets or sets the focus point for the gradient falloff. |
setFocusScales(PointF value) | Gets or sets the focus point for the gradient falloff. |
getWrapMode() | Gets or sets a WrapMode (.getWrapMode/.setWrapMode(int)) that indicates the wrap mode for this PathGradientBrush. |
setWrapMode(int value) | Gets or sets a WrapMode (.getWrapMode/.setWrapMode(int)) that indicates the wrap mode for this PathGradientBrush. |
deepClone() | Creates an exact copy of this PathGradientBrush. |
setSigmaBellShape(float focus) | Creates a gradient brush that changes color starting from the center of the path outward to the path’s boundary. |
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. |
setBlendTriangularShape(float focus) | Creates a gradient with a center color and a linear falloff to one surrounding color. |
setBlendTriangularShape(float focus, float scale) | Creates a gradient with a center color and a linear falloff to each surrounding color. |
resetTransform() | Resets the PathGradientBrush.Transform property to identity. |
multiplyTransform(Matrix matrix) | Updates the brush’s transformation matrix with the product of brush’s transformation matrix multiplied by another matrix. |
multiplyTransform(Matrix matrix, int order) | Updates the brush’s transformation matrix with the product of the brush’s transformation matrix multiplied by another matrix. |
translateTransform(float dx, float dy) | Applies the specified translation to the local geometric transform. |
translateTransform(float dx, float dy, int order) | Applies the specified translation to the local geometric transform in the specified order. |
scaleTransform(float sx, float sy) | Scales the local geometric transform by the specified amounts. |
scaleTransform(float sx, float sy, int order) | Scales the local geometric transform by the specified amounts in the specified order. |
rotateTransform(float angle) | Rotates the local geometric transform by the specified amount. |
rotateTransform(float angle, int order) | Rotates the local geometric transform by the specified amount in the specified order. |
PathGradientBrush(PointF[] points)
public PathGradientBrush(PointF[] points)
Initializes a new instance of the PathGradientBrush class with the specified points.
Parameters:
Parameter | Type | Description |
---|---|---|
points | PointF[] | An array of PointF structures that represents the points that make up the vertices of the path. |
PathGradientBrush(PointF[] points, int wrapMode)
public PathGradientBrush(PointF[] points, int wrapMode)
Initializes a new instance of the PathGradientBrush class with the specified points and wrap mode.
Parameters:
Parameter | Type | Description |
---|---|---|
points | PointF[] | An array of PointF structures that represents the points that make up the vertices of the path. |
wrapMode | int | A WrapMode (.getWrapMode/.setWrapMode(int)) that specifies how fills drawn with this PathGradientBrush are tiled. |
PathGradientBrush(Point[] points)
public PathGradientBrush(Point[] points)
Initializes a new instance of the PathGradientBrush class with the specified points.
Parameters:
Parameter | Type | Description |
---|---|---|
points | Point[] | An array of Point structures that represents the points that make up the vertices of the path. |
PathGradientBrush(Point[] points, int wrapMode)
public PathGradientBrush(Point[] points, int wrapMode)
Initializes a new instance of the PathGradientBrush class with the specified points and wrap mode.
Parameters:
Parameter | Type | Description |
---|---|---|
points | Point[] | An array of Point structures that represents the points that make up the vertices of the path. |
wrapMode | int | A WrapMode (.getWrapMode/.setWrapMode(int)) that specifies how fills drawn with this PathGradientBrush are tiled. |
PathGradientBrush(GraphicsPath path)
public PathGradientBrush(GraphicsPath path)
Initializes a new instance of the PathGradientBrush class with the specified path.
Parameters:
Parameter | Type | Description |
---|---|---|
path | GraphicsPath | The GraphicsPath that defines the area filled by this PathGradientBrush. |
getCenterColor()
public Color getCenterColor()
Gets or sets the color at the center of the path gradient.
Returns: Color
setCenterColor(Color value)
public void setCenterColor(Color value)
Gets or sets the color at the center of the path gradient.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color |
getSurroundColors()
public Color[] getSurroundColors()
Gets or sets an array of colors that correspond to the points in the path this PathGradientBrush fills.
Returns: com.aspose.drawing.Color[]
setSurroundColors(Color[] value)
public void setSurroundColors(Color[] value)
Gets or sets an array of colors that correspond to the points in the path this PathGradientBrush fills.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color[] |
getCenterPoint()
public PointF getCenterPoint()
Gets or sets the center point of the path gradient.
Returns: PointF
setCenterPoint(PointF value)
public void setCenterPoint(PointF value)
Gets or sets the center point of the path gradient.
Parameters:
Parameter | Type | Description |
---|---|---|
value | PointF |
getRectangle()
public RectangleF getRectangle()
Gets a bounding rectangle for this PathGradientBrush.
Returns: RectangleF
getBlend()
public Blend getBlend()
Gets or sets a Blend
(.getBlend/.setBlend(Blend)) that specifies positions and factors that define a custom falloff for the gradient.
Returns: Blend
setBlend(Blend value)
public void setBlend(Blend value)
Gets or sets a Blend
(.getBlend/.setBlend(Blend)) that specifies positions and factors that define a custom falloff for the gradient.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Blend |
getInterpolationColors()
public ColorBlend getInterpolationColors()
Gets or sets a ColorBlend that defines a multicolor linear gradient.
Returns: ColorBlend
setInterpolationColors(ColorBlend value)
public void setInterpolationColors(ColorBlend value)
Gets or sets a ColorBlend that defines a multicolor linear gradient.
Parameters:
Parameter | Type | Description |
---|---|---|
value | ColorBlend |
getTransform()
public Matrix getTransform()
Gets or sets a copy of the Matrix that defines a local geometric transform for this PathGradientBrush.
Returns: Matrix
setTransform(Matrix value)
public void setTransform(Matrix value)
Gets or sets a copy of the Matrix that defines a local geometric transform for this PathGradientBrush.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Matrix |
getFocusScales()
public PointF getFocusScales()
Gets or sets the focus point for the gradient falloff.
Returns: PointF
setFocusScales(PointF value)
public void setFocusScales(PointF value)
Gets or sets the focus point for the gradient falloff.
Parameters:
Parameter | Type | Description |
---|---|---|
value | PointF |
getWrapMode()
public int getWrapMode()
Gets or sets a WrapMode
(.getWrapMode/.setWrapMode(int)) that indicates the wrap mode for this PathGradientBrush.
Returns: int
setWrapMode(int value)
public void setWrapMode(int value)
Gets or sets a WrapMode
(.getWrapMode/.setWrapMode(int)) that indicates the wrap mode for this PathGradientBrush.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
deepClone()
public Object deepClone()
Creates an exact copy of this PathGradientBrush.
Returns: java.lang.Object - The PathGradientBrush this method creates, cast as an object.
setSigmaBellShape(float focus)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
focus | float | 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. |
setSigmaBellShape(float focus, float scale)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
focus | float | 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 | float | 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. |
setBlendTriangularShape(float focus)
public void setBlendTriangularShape(float focus)
Creates a gradient with a center color and a linear falloff to one surrounding color.
Parameters:
Parameter | Type | Description |
---|---|---|
focus | float | 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. |
setBlendTriangularShape(float focus, float scale)
public void setBlendTriangularShape(float focus, float scale)
Creates a gradient with a center color and a linear falloff to each surrounding color.
Parameters:
Parameter | Type | Description |
---|---|---|
focus | float | 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 | float | 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. |
resetTransform()
public void resetTransform()
Resets the PathGradientBrush.Transform
property to identity.
multiplyTransform(Matrix matrix)
public void multiplyTransform(Matrix matrix)
Updates the brush’s transformation matrix with the product of brush’s transformation matrix multiplied by another matrix.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The Matrix that will be multiplied by the brush’s current transformation matrix. |
multiplyTransform(Matrix matrix, int order)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
matrix | Matrix | The Matrix that will be multiplied by the brush’s current transformation matrix. |
order | int | A MatrixOrder that specifies in which order to multiply the two matrices. |
translateTransform(float dx, float dy)
public void translateTransform(float dx, float dy)
Applies the specified translation to the local geometric transform. This method prepends the translation to the transform.
Parameters:
Parameter | Type | Description |
---|---|---|
dx | float | The value of the translation in x. |
dy | float | The value of the translation in y. |
translateTransform(float dx, float dy, int order)
public void translateTransform(float dx, float dy, int order)
Applies the specified translation to the local geometric transform in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
dx | float | The value of the translation in x. |
dy | float | The value of the translation in y. |
order | int | The order (prepend or append) in which to apply the translation. |
scaleTransform(float sx, float sy)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
sx | float | The transform scale factor in the x-axis direction. |
sy | float | The transform scale factor in the y-axis direction. |
scaleTransform(float sx, float sy, int order)
public void scaleTransform(float sx, float sy, int order)
Scales the local geometric transform by the specified amounts in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
sx | float | The transform scale factor in the x-axis direction. |
sy | float | The transform scale factor in the y-axis direction. |
order | int | A MatrixOrder that specifies whether to append or prepend the scaling matrix. |
rotateTransform(float angle)
public void rotateTransform(float angle)
Rotates the local geometric transform by the specified amount. This method prepends the rotation to the transform.
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle (extent) of rotation. |
rotateTransform(float angle, int order)
public void rotateTransform(float angle, int order)
Rotates the local geometric transform by the specified amount in the specified order.
Parameters:
Parameter | Type | Description |
---|---|---|
angle | float | The angle (extent) of rotation. |
order | int | A MatrixOrder that specifies whether to append or prepend the rotation matrix. |