public class RMGradientFill extends RMFill
Constructor and Description |
---|
RMGradientFill()
Creates an uninitialized gradient fill.
|
RMGradientFill(double aSX,
double aSY,
double aEX,
double aEY,
Stop[] theStops)
Creates a new gradient fill.
|
RMGradientFill(RMColor aColor1,
RMColor aColor2,
float aRotation)
Creates a gradient fill from the given start color to the given end color with the given roll.
|
Modifier and Type | Method and Description |
---|---|
RMGradientFill |
clone()
Standard clone implementation.
|
RMGradientFill |
copyForColor(Color aColor)
Derives an instance of this class from another fill.
|
RMGradientFill |
copyForPoints(Point begin,
Point end)
Returns a new gradient which is a copy of this gradient with a different gradient axis.
|
RMGradientFill |
copyForReverseStops()
Reverse the order of the color stops
|
RMGradientFill |
copyForRoll(double aRoll)
Returns a new gradient which is a copy of this gradient but with a different roll value.
|
RMGradientFill |
copyForStops(Stop[] theStops)
Resets all the stops from the new list.
|
RMGradientFill |
copyForType(GradientPaint.Type aType)
Returns a new gradient which is a copy of this gradient but of a different type.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
java.lang.Object |
fromXML(XMLArchiver anArchiver,
XMLElement anElement)
XML unarchival.
|
RMColor |
getColor()
Returns the color associated with this fill.
|
double |
getEndX()
Returns the end x.
|
double |
getEndY()
Returns the end y.
|
double |
getRoll()
Returns the gradient's rotation.
|
double |
getStartX()
Returns the start x.
|
double |
getStartY()
Returns the start y.
|
Stop |
getStop(int anIndex)
Returns the individual color stop at given index.
|
RMColor |
getStopColor(int index)
Returns the color of the stop at the given index.
|
int |
getStopCount()
Returns the number of color stops in the gradient
|
double |
getStopOffset(int index)
Returns the position (in the range {0-1}) for the given stop index.
|
Stop[] |
getStops()
Returns the list of color stops.
|
boolean |
isLinear()
Returns whether gradient is linear.
|
boolean |
isRadial()
Returns whether gradient is radial.
|
GradientPaint |
snap()
Returns the snap version of this fill.
|
java.lang.String |
toString()
Standard to string implementation.
|
XMLElement |
toXML(XMLArchiver anArchiver)
XML archival.
|
deriveFill, getName
public RMGradientFill()
public RMGradientFill(RMColor aColor1, RMColor aColor2, float aRotation)
public RMGradientFill(double aSX, double aSY, double aEX, double aEY, Stop[] theStops)
public double getStartX()
public double getStartY()
public double getEndX()
public double getEndY()
public int getStopCount()
public Stop getStop(int anIndex)
public RMColor getStopColor(int index)
public double getStopOffset(int index)
public Stop[] getStops()
public boolean isLinear()
public boolean isRadial()
public double getRoll()
public RMColor getColor()
public GradientPaint snap()
public RMGradientFill copyForPoints(Point begin, Point end)
public RMGradientFill copyForStops(Stop[] theStops)
public RMGradientFill copyForType(GradientPaint.Type aType)
public RMGradientFill copyForColor(Color aColor)
copyForColor
in class RMFill
public RMGradientFill copyForRoll(double aRoll)
public RMGradientFill copyForReverseStops()
public RMGradientFill clone()
public boolean equals(java.lang.Object anObj)
public XMLElement toXML(XMLArchiver anArchiver)
public java.lang.Object fromXML(XMLArchiver anArchiver, XMLElement anElement)