Package com.stimulsoft.base.drawing
Class StiGradientBrush
java.lang.Object
com.stimulsoft.base.drawing.StiBrush
com.stimulsoft.base.drawing.StiGradientBrush
- All Implemented Interfaces:
IStiInvalidator,IStiSerializable,IStiSerializableToString,Cloneable
Class describes a gradient brush.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of the StiGradientBrush class.StiGradientBrush(StiColor startColor, StiColor endColor, double angle) Creates a new instance of the StiGradientBrush class.StiGradientBrush(StiRectangle rectangle, StiColor startColor, StiColor endColor, double angle) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(String value) booleanfinal doublegetAngle()Gets or sets the angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.final StiColorGets or sets the ending color for the gradient.getPaint()final StiColorGets or sets the starting color for the gradient.inthashCode()voidLoadValuesFromJson(JSONObject jObject) final voidsetAngle(double value) final voidsetEndColor(StiColor value) voidsetEndGradiendPoint(Point2D endGradiendPoint) voidsetRectangle(StiRectangle rectangle) final voidsetStartColor(StiColor value) voidsetStartGradiendPoint(Point2D startGradiendPoint) Methods inherited from class com.stimulsoft.base.drawing.StiBrush
clone, dispose, getBrush, getInvalidator, getReference, invalidate, light, LoadFromJson, setInvalidator, setReference, ToColor
-
Field Details
-
angle
public double angle
-
-
Constructor Details
-
StiGradientBrush
public StiGradientBrush()Creates a new instance of the StiGradientBrush class. -
StiGradientBrush
public StiGradientBrush(StiRectangle rectangle, StiColor startColor, StiColor endColor, double angle) - Parameters:
rectangle-startColor-endColor-angle-
-
StiGradientBrush
Creates a new instance of the StiGradientBrush class.- Parameters:
startColor- the starting color for the gradient.endColor- The ending color for the gradient.angle- The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
-
-
Method Details
-
getStartColor
Gets or sets the starting color for the gradient. -
serialize
-
deserialize
-
setStartColor
-
getEndColor
Gets or sets the ending color for the gradient. -
setEndColor
-
getAngle
public final double getAngle()Gets or sets the angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line. -
setAngle
public final void setAngle(double value) -
hashCode
public int hashCode() -
equals
-
getPaint
- Returns:
- the paint
-
getRectangle
- Returns:
- the rectangle
-
setRectangle
- Parameters:
rectangle- the rectangle to set
-
getStartGradiendPoint
- Returns:
- the startGradiendPoint
-
setStartGradiendPoint
- Parameters:
startGradiendPoint- the startGradiendPoint to set
-
getEndGradiendPoint
- Returns:
- the endGradiendPoint
-
setEndGradiendPoint
- Parameters:
endGradiendPoint- the endGradiendPoint to set
-
LoadValuesFromJson
- Throws:
JSONException
-