Package com.reportmill.graphics
Class RMGradientFill
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.graphics.RMFill
- 
- com.reportmill.graphics.RMGradientFill
 
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class RMGradientFill extends RMFill This class represents a fill that draws a gradient of colors from the basic fill color to the end color.
- 
- 
Constructor SummaryConstructors Constructor Description RMGradientFill()Creates an unitialized graident 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.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object anObj)Standard equals implementation.java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.RMColorgetColor2()Returns the gradients end color.RMColorgetEndColor()Returns the gradients end color (obsolete).voidgetGradientAxis(RMShape aShape, RMPath aPath, java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)Returns the 2 points, in the shape's coordinate system, which define the gradient.java.awt.geom.Rectangle2DgetGradientBounds(java.awt.Shape aShape)Returns the gradient bounds for a given shape which is the bounds required to encompass the entire shape in the coordinates of the gradient rotation (effectively the bounds of the shape rotated by opposite gradient rotation).floatgetRoll()Returns the gradients rotation.java.lang.ObjectinitWithArchiver(RMArchiver anArchiver)Legacy unarchival.voidpaintShape(RMShape aShape, RMPath aPath, java.awt.Graphics2D g, RMShapePainter sp)Render this fill in a Java2D Graphics2D.RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.reportmill.graphics.RMFillderiveFill, getBounds, getChild, getChildCount, getColor, setColor
 - 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getColor2public RMColor getColor2() Returns the gradients end color.
 - 
getEndColorpublic RMColor getEndColor() Returns the gradients end color (obsolete).
 - 
getRollpublic float getRoll() Returns the gradients rotation.
 - 
getGradientBoundspublic java.awt.geom.Rectangle2D getGradientBounds(java.awt.Shape aShape) Returns the gradient bounds for a given shape which is the bounds required to encompass the entire shape in the coordinates of the gradient rotation (effectively the bounds of the shape rotated by opposite gradient rotation). The gradient should be defined in these bounds so that rendered shapes completely utilizes the color range.
 - 
getGradientAxispublic void getGradientAxis(RMShape aShape, RMPath aPath, java.awt.geom.Point2D p1, java.awt.geom.Point2D p2) Returns the 2 points, in the shape's coordinate system, which define the gradient.
 - 
paintShapepublic void paintShape(RMShape aShape, RMPath aPath, java.awt.Graphics2D g, RMShapePainter sp) Render this fill in a Java2D Graphics2D.- Overrides:
- paintShapein class- RMFill
 
 - 
equalspublic boolean equals(java.lang.Object anObj) Standard equals implementation.
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.
 - 
fromXMLpublic java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.
 - 
initWithArchiverpublic java.lang.Object initWithArchiver(RMArchiver anArchiver) Legacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMFill
 
 
- 
 
-