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,- java.awt.Paint,- java.awt.PaintContext,- java.awt.Transparency,- java.lang.Cloneable
 
 public class RMContourFill extends RMFill implements java.awt.PaintContext, java.awt.Paint 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.
- 
- 
Constructor SummaryConstructors Constructor Description RMContourFill()Creates a contour fill.RMContourFill(float height)Creates a contour fill with given height.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.PaintContextcreateContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.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].java.awt.image.ColorModelgetColorModel()PaintContext method.java.awt.image.BufferedImagegetMaskImage(int width, int height)Draws the path into a buffered image to use as a maskjava.awt.PaintgetPaint()Paint & PaintContext interface methods.java.awt.image.RastergetRaster(int x, int y, int w, int h)Creates a new raster.intgetTransparency()PaintContext method.voidpaint(RMShapePainter aPntr, RMShape aShape)Paint method.RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.inductiveautomation.rm.graphics.RMFillclone, deriveFill, equals, fromXML, getBounds, getColor, getName, hasAlpha, readAttributes, setColor, toString
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getPaintpublic java.awt.Paint getPaint() Paint & PaintContext interface methods.
 - 
getTransparencypublic int getTransparency() PaintContext method.- Specified by:
- getTransparencyin interface- java.awt.Transparency
 
 - 
getColorModelpublic java.awt.image.ColorModel getColorModel() PaintContext method.- Specified by:
- getColorModelin interface- java.awt.PaintContext
 
 - 
disposepublic void dispose() PaintContext method.- Specified by:
- disposein interface- java.awt.PaintContext
 
 - 
createContextpublic java.awt.PaintContext createContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)Paint & PaintContext interfaces.- Specified by:
- createContextin interface- java.awt.Paint
 
 - 
getRasterpublic java.awt.image.Raster getRaster(int x, int y, int w, int h)Creates a new raster.- Specified by:
- getRasterin interface- java.awt.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.
 - 
paintpublic void paint(RMShapePainter aPntr, RMShape aShape) Paint method.
 - 
getMaskImagepublic java.awt.image.BufferedImage getMaskImage(int width, int height)Draws the path into a buffered image to use as a mask
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.- Specified by:
- toXMLin interface- Archivable
- Overrides:
- toXMLin class- RMFill
 
 
- 
 
-