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

ConstructorDescription
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

MethodDescription
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:

ParameterTypeDescription
pointsPointF[]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:

ParameterTypeDescription
pointsPointF[]An array of PointF structures that represents the points that make up the vertices of the path.
wrapModeintA 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:

ParameterTypeDescription
pointsPoint[]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:

ParameterTypeDescription
pointsPoint[]An array of Point structures that represents the points that make up the vertices of the path.
wrapModeintA 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:

ParameterTypeDescription
pathGraphicsPathThe 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:

ParameterTypeDescription
valueColor

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:

ParameterTypeDescription
valueColor[]

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:

ParameterTypeDescription
valuePointF

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:

ParameterTypeDescription
valueBlend

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:

ParameterTypeDescription
valueColorBlend

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:

ParameterTypeDescription
valueMatrix

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:

ParameterTypeDescription
valuePointF

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:

ParameterTypeDescription
valueint

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:

ParameterTypeDescription
focusfloatA 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:

ParameterTypeDescription
focusfloatA 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.
scalefloatA 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:

ParameterTypeDescription
focusfloatA 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:

ParameterTypeDescription
focusfloatA 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.
scalefloatA 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:

ParameterTypeDescription
matrixMatrixThe 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:

ParameterTypeDescription
matrixMatrixThe Matrix that will be multiplied by the brush’s current transformation matrix.
orderintA 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:

ParameterTypeDescription
dxfloatThe value of the translation in x.
dyfloatThe 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:

ParameterTypeDescription
dxfloatThe value of the translation in x.
dyfloatThe value of the translation in y.
orderintThe 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:

ParameterTypeDescription
sxfloatThe transform scale factor in the x-axis direction.
syfloatThe 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:

ParameterTypeDescription
sxfloatThe transform scale factor in the x-axis direction.
syfloatThe transform scale factor in the y-axis direction.
orderintA 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:

ParameterTypeDescription
anglefloatThe 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:

ParameterTypeDescription
anglefloatThe angle (extent) of rotation.
orderintA MatrixOrder that specifies whether to append or prepend the rotation matrix.