PathGradientBrush

Inheritance: java.lang.Object, com.aspose.psd.DisposableObject, com.aspose.psd.Brush, com.aspose.psd.brushes.TransformBrush, com.aspose.psd.brushes.PathGradientBrushBase

public final class PathGradientBrush extends PathGradientBrushBase

Encapsulates a Aspose.Imaging.Brush object with a gradient. This class cannot be inherited.

The center color is white by default. A user can changed this value at any time later.

The surround colors array is initialized by single element containing white color by default. The surround colors may be changed later, however at least single element is required when setting up the surround colors.

See the Blend for more details about its initialization.

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
close()Implements the Closable interface and can be used in the try-with-resources statement since JDK 1.7.
deepClone()Creates a new deep clone of the current Brush .
dispose()Disposes the current instance.
equals(Object arg0)
getBlend()Gets a Aspose.Imaging.Blend that specifies positions and factors that define a custom falloff for the gradient.
getCenterColor()Gets the color at the center of the path gradient.
getCenterPoint()Gets or sets the center point of the path gradient.
getClass()
getDisposed()Gets a value indicating whether this instance is disposed.
getFocusScales()Gets the focus point for the gradient falloff.
getGraphicsPath()Gets the graphics path this brush was build upon.
getInterpolationColors()Gets a com.aspose.psd.ColorBlend that defines a multicolor linear gradient.
getOpacity()Gets the brush opacity.
getPathPoints()Gets the path points this brush was build upon.
getSurroundColors()Gets an array of colors that correspond to the points in the path this PathGradientBrush fills.
getTransform()Gets or sets a copy Aspose.Imaging.Matrix that defines a local geometric transform for this TransformBrush .
getWrapMode()Gets or sets a Aspose.Imaging.WrapMode enumeration that indicates the wrap mode for this TransformBrush .
hashCode()
isTransformChanged()Gets a value indicating whether transformations were changed in some way.
multiplyTransform(Matrix matrix)Multiplies the Aspose.Imaging.Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Aspose.Imaging.Matrix by prepending the specified Aspose.Imaging.Matrix .
multiplyTransform(Matrix matrix, int order)Multiplies the Aspose.Imaging.Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Aspose.Imaging.Matrix in the specified order.
notify()
notifyAll()
resetTransform()Resets the TransformBrush.Transform property to identity.
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.
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.
setBlend(Blend value)Sets a Aspose.Imaging.Blend that specifies positions and factors that define a custom falloff for the gradient.
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.
setCenterColor(Color value)Sets the color at the center of the path gradient.
setCenterPoint(PointF value)Gets or sets the center point of the path gradient.
setFocusScales(PointF value)Gets or sets the focus point for the gradient falloff.
setInterpolationColors(ColorBlend value)Sets a com.aspose.psd.ColorBlend that defines a multicolor linear gradient.
setOpacity(float value)Sets the brush opacity.
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.
setSurroundColors(Color[] value)Sets an array of colors that correspond to the points in the path this PathGradientBrush fills.
setTransform(Matrix value)Gets or sets a copy Aspose.Imaging.Matrix that defines a local geometric transform for this TransformBrush .
setWrapMode(int value)Gets or sets a Aspose.Imaging.WrapMode enumeration that indicates the wrap mode for this TransformBrush .
toString()
translateTransform(float dx, float dy)Translates the local geometric transform by the specified dimensions.
translateTransform(float dx, float dy, int order)Translates the local geometric transform by the specified dimensions in the specified order.
wait()
wait(long arg0)
wait(long arg0, int arg1)

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 Aspose.Imaging.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 Aspose.Imaging.PointF structures that represents the points that make up the vertices of the path.
wrapModeintA Aspose.Imaging.WrapMode 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 Aspose.Imaging.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 Aspose.Imaging.Point structures that represents the points that make up the vertices of the path.
wrapModeintA Aspose.Imaging.WrapMode 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 .

close()

public void close()

Implements the Closable interface and can be used in the try-with-resources statement since JDK 1.7. This method simply call dispose method.

deepClone()

public Brush deepClone()

Creates a new deep clone of the current Brush .

Returns: Brush - A new Brush which is the deep clone of this Brush instance.

dispose()

public final void dispose()

Disposes the current instance.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getBlend()

public Blend getBlend()

Gets a Aspose.Imaging.Blend that specifies positions and factors that define a custom falloff for the gradient.

Returns: Blend - A Aspose.Imaging.Blend that represents a custom falloff for the gradient.

getCenterColor()

public Color getCenterColor()

Gets the color at the center of the path gradient.

Returns: Color - A com.aspose.psd.Color that represents the color at the center of the path gradient.

getCenterPoint()

public PointF getCenterPoint()

Gets or sets the center point of the path gradient.

Returns: PointF - A Aspose.Imaging.PointF that represents the center point of the path gradient.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDisposed()

public final boolean getDisposed()

Gets a value indicating whether this instance is disposed.

Returns: boolean - true if disposed; otherwise, false .

getFocusScales()

public PointF getFocusScales()

Gets the focus point for the gradient falloff.

Returns: PointF - A Aspose.Imaging.PointF that represents the focus point for the gradient falloff.

getGraphicsPath()

public GraphicsPath getGraphicsPath()

Gets the graphics path this brush was build upon.

Returns: GraphicsPath - The graphics path.

getInterpolationColors()

public ColorBlend getInterpolationColors()

Gets a com.aspose.psd.ColorBlend that defines a multicolor linear gradient.

Returns: ColorBlend - A com.aspose.psd.ColorBlend that defines a multicolor linear gradient.

getOpacity()

public float getOpacity()

Gets the brush opacity. The value should be between 0 and 1. Value of 0 means that brush is fully visible, value of 1 means the brush is fully opaque.

Returns: float - The brush opacity value.

getPathPoints()

public PointF[] getPathPoints()

Gets the path points this brush was build upon.

Returns: com.aspose.psd.PointF[] - The path points.

getSurroundColors()

public Color[] getSurroundColors()

Gets an array of colors that correspond to the points in the path this PathGradientBrush fills.

Returns: com.aspose.psd.Color[] - An array of com.aspose.psd.Color structures that represents the colors associated with each point in the path this PathGradientBrush fills.

getTransform()

public Matrix getTransform()

Gets or sets a copy Aspose.Imaging.Matrix that defines a local geometric transform for this TransformBrush .

Returns: Matrix - A copy of the Aspose.Imaging.Matrix that defines a geometric transform that applies only to fills drawn with this TransformBrush .

getWrapMode()

public int getWrapMode()

Gets or sets a Aspose.Imaging.WrapMode enumeration that indicates the wrap mode for this TransformBrush .

Returns: int - A Aspose.Imaging.WrapMode that specifies how fills drawn with this TransformBrush are tiled.

hashCode()

public native int hashCode()

Returns: int

isTransformChanged()

public boolean isTransformChanged()

Gets a value indicating whether transformations were changed in some way. For example setting the transformation matrix or calling any of the methods altering the transformation matrix. The property is introduced for backward compatibility with GDI+.

Value: True if transformation was changed; otherwise, false .

Returns: boolean

multiplyTransform(Matrix matrix)

public void multiplyTransform(Matrix matrix)

Multiplies the Aspose.Imaging.Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Aspose.Imaging.Matrix by prepending the specified Aspose.Imaging.Matrix .

Parameters:

ParameterTypeDescription
matrixMatrixThe Aspose.Imaging.Matrix by which to multiply the geometric transform.

multiplyTransform(Matrix matrix, int order)

public void multiplyTransform(Matrix matrix, int order)

Multiplies the Aspose.Imaging.Matrix that represents the local geometric transform of this LinearGradientBrush by the specified Aspose.Imaging.Matrix in the specified order.

Parameters:

ParameterTypeDescription
matrixMatrixThe Aspose.Imaging.Matrix by which to multiply the geometric transform.
orderintA Aspose.Imaging.MatrixOrder that specifies in which order to multiply the two matrices.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

resetTransform()

public void resetTransform()

Resets the TransformBrush.Transform property to identity.

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 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 of rotation.
orderintA Aspose.Imaging.MatrixOrder that specifies whether to append or prepend the rotation matrix.

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 amount by which to scale the transform in the x-axis direction.
syfloatThe amount by which to scale the transform 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 amount by which to scale the transform in the x-axis direction.
syfloatThe amount by which to scale the transform in the y-axis direction.
orderintA Aspose.Imaging.MatrixOrder that specifies whether to append or prepend the scaling matrix.

setBlend(Blend value)

public void setBlend(Blend value)

Sets a Aspose.Imaging.Blend that specifies positions and factors that define a custom falloff for the gradient.

Parameters:

ParameterTypeDescription
valueBlendA Aspose.Imaging.Blend that represents a custom falloff for the gradient.

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.

setCenterColor(Color value)

public void setCenterColor(Color value)

Sets the color at the center of the path gradient.

Parameters:

ParameterTypeDescription
valueColorA com.aspose.psd.Color that represents the color at the center of the path gradient.

setCenterPoint(PointF value)

public void setCenterPoint(PointF value)

Gets or sets the center point of the path gradient.

Parameters:

ParameterTypeDescription
valuePointFA Aspose.Imaging.PointF that represents the center point of the path gradient.

setFocusScales(PointF value)

public void setFocusScales(PointF value)

Gets or sets the focus point for the gradient falloff.

Parameters:

ParameterTypeDescription
valuePointFA Aspose.Imaging.PointF that represents the focus point for the gradient falloff.

setInterpolationColors(ColorBlend value)

public void setInterpolationColors(ColorBlend value)

Sets a com.aspose.psd.ColorBlend that defines a multicolor linear gradient.

Parameters:

ParameterTypeDescription
valueColorBlendA com.aspose.psd.ColorBlend that defines a multicolor linear gradient.

setOpacity(float value)

public void setOpacity(float value)

Sets the brush opacity. The value should be between 0 and 1. Value of 0 means that brush is fully visible, value of 1 means the brush is fully opaque.

Parameters:

ParameterTypeDescription
valuefloatThe brush opacity value.

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.

setSurroundColors(Color[] value)

public void setSurroundColors(Color[] value)

Sets an array of colors that correspond to the points in the path this PathGradientBrush fills.

Parameters:

ParameterTypeDescription
valueColor[]An array of com.aspose.psd.Color structures that represents the colors associated with each point in the path this PathGradientBrush fills.

setTransform(Matrix value)

public void setTransform(Matrix value)

Gets or sets a copy Aspose.Imaging.Matrix that defines a local geometric transform for this TransformBrush .

Parameters:

ParameterTypeDescription
valueMatrix

setWrapMode(int value)

public void setWrapMode(int value)

Gets or sets a Aspose.Imaging.WrapMode enumeration that indicates the wrap mode for this TransformBrush .

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

translateTransform(float dx, float dy)

public void translateTransform(float dx, float dy)

Translates the local geometric transform by the specified dimensions. 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)

Translates the local geometric transform by the specified dimensions 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.

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int