Class RMContourFill
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.rm.graphics.RMFill
com.inductiveautomation.rm.graphics.RMContourFill
- All Implemented Interfaces:
- Archivable,- RMPropertyChanger,- Paint,- PaintContext,- Transparency,- Cloneable
RMFill implementation of a shape-burst gradient. Implements Paint & PaintContext methods for scan converting the
 gradient into an ARGB raster. Can be used on its own for a vaguely-interesting fill, or to create a bump map for the
 emboss effect. Currently the edge profile is a 45 degree straight line, but other edge profiles (rounded, cove,
 whatever) can easily be added.
- 
Field SummaryFields inherited from interface java.awt.TransparencyBITMASK, OPAQUE, TRANSLUCENT
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a contour fill.RMContourFill(float height) Creates a contour fill with given height.
- 
Method SummaryModifier and TypeMethodDescriptioncreateContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Paint & PaintContext interfaces.voiddispose()PaintContext method.voiddoShading(int[] samples, int offset, int devicex, int devicey, int w, int h, int rowbytes) Replaces image samples with distance from pixel scaled to the range [0-1].PaintContext method.getMaskImage(int width, int height) Draws the path into a buffered image to use as a maskgetPaint()Paint & PaintContext interface methods.getRaster(int x, int y, int w, int h) Creates a new raster.intPaintContext method.voidpaint(RMShapePainter aPntr, RMShape aShape) Paint method.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.inductiveautomation.rm.graphics.RMFillclone, deriveFill, equals, fromXML, getBounds, getColor, getName, hasAlpha, readAttributes, setColor, toStringMethods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
- 
Constructor Details- 
RMContourFillpublic RMContourFill()Creates a contour fill.
- 
RMContourFillpublic RMContourFill(float height) Creates a contour fill with given height.
 
- 
- 
Method Details- 
getPaintPaint & PaintContext interface methods.
- 
getTransparencypublic int getTransparency()PaintContext method.- Specified by:
- getTransparencyin interface- Transparency
 
- 
getColorModelPaintContext method.- Specified by:
- getColorModelin interface- PaintContext
 
- 
disposepublic void dispose()PaintContext method.- Specified by:
- disposein interface- PaintContext
 
- 
createContextpublic PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Paint & PaintContext interfaces.- Specified by:
- createContextin interface- Paint
 
- 
getRasterCreates a new raster.- Specified by:
- getRasterin interface- PaintContext
 
- 
doShadingpublic void doShading(int[] samples, int offset, int devicex, int devicey, int w, int h, int rowbytes) Replaces image samples with distance from pixel scaled to the range [0-1]. We scale every distance by the maximum. This means that the color of each edge will change with the same slope, and thicker sections will therefore be taller (if edge color is thought of as height). Another possibility would be to scale each edge by its local max, so each section ultimately reaches same height.
- 
paintPaint method.
- 
getMaskImageDraws the path into a buffered image to use as a mask
- 
toXMLXML archival.- Specified by:
- toXMLin interface- Archivable
- Overrides:
- toXMLin class- RMFill
 
 
-