Class RMImageFill
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.graphics.RMFill
-
- com.inductiveautomation.rm.graphics.RMImageFill
-
- All Implemented Interfaces:
Archivable
,RMPropertyChanger
,java.lang.Cloneable
public class RMImageFill extends RMFill
This class is used to fill a shape's path with an image.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_ROLL
static java.lang.String
ATTRIBUTE_SCALE_X
static java.lang.String
ATTRIBUTE_SCALE_Y
static java.lang.String
ATTRIBUTE_TILED
static java.lang.String
ATTRIBUTE_X
static java.lang.String
ATTRIBUTE_Y
-
Constructor Summary
Constructors Constructor Description RMImageFill()
Creates a plain image fill.RMImageFill(java.lang.Object aSource)
Creates an image fill from an image source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RMImageFill
deriveFill(RMImageData anImageData)
Creates a new image fill from this fill, but with a new image.RMImageFill
deriveFill(java.lang.String aName, java.lang.Number aValue)
Creates a new image fill identical to this image fill, but with new value for given attribute.boolean
equals(java.lang.Object anObj)
Standard equals implementation.java.lang.Object
fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.RMImageData
getImageData()
Returns the image data associated with this image fill.double
getImageHeight()
Returns the actual display height of the image in printer's points using the image DPI if available.double
getImageWidth()
Returns the actual display width of the image in printer's points using the image DPI if available.double
getRoll()
Returns the rotation of the image fill image.double
getScaleX()
Returns the scale x of the image fill image.double
getScaleY()
Returns the scale y of the image fill image.java.lang.String
getType()
Returns the type of the image for this image fill (gif, jpg, png, etc.).double
getX()
Returns the X location (offset) of the image fill image.double
getY()
Returns the Y location (offset) of the image fill image.boolean
isTiled()
Returns whether to tile fill image.void
paint(RMShapePainter aPntr, RMShape aShape)
Render this fill in a shape painter.void
setTiled(boolean aValue)
Sets whether to tile fill image.RXElement
toXML(RXArchiver anArchiver)
XML archival.-
Methods inherited from class com.inductiveautomation.rm.graphics.RMFill
clone, deriveFill, getBounds, getColor, getName, hasAlpha, readAttributes, setColor, toString
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Field Detail
-
ATTRIBUTE_TILED
public static final java.lang.String ATTRIBUTE_TILED
- See Also:
- Constant Field Values
-
ATTRIBUTE_X
public static final java.lang.String ATTRIBUTE_X
- See Also:
- Constant Field Values
-
ATTRIBUTE_Y
public static final java.lang.String ATTRIBUTE_Y
- See Also:
- Constant Field Values
-
ATTRIBUTE_ROLL
public static final java.lang.String ATTRIBUTE_ROLL
- See Also:
- Constant Field Values
-
ATTRIBUTE_SCALE_X
public static final java.lang.String ATTRIBUTE_SCALE_X
- See Also:
- Constant Field Values
-
ATTRIBUTE_SCALE_Y
public static final java.lang.String ATTRIBUTE_SCALE_Y
- See Also:
- Constant Field Values
-
-
Method Detail
-
getImageData
public RMImageData getImageData()
Returns the image data associated with this image fill.
-
isTiled
public boolean isTiled()
Returns whether to tile fill image.
-
setTiled
public void setTiled(boolean aValue)
Sets whether to tile fill image.
-
getX
public double getX()
Returns the X location (offset) of the image fill image.
-
getY
public double getY()
Returns the Y location (offset) of the image fill image.
-
getRoll
public double getRoll()
Returns the rotation of the image fill image.
-
getScaleX
public double getScaleX()
Returns the scale x of the image fill image.
-
getScaleY
public double getScaleY()
Returns the scale y of the image fill image.
-
deriveFill
public RMImageFill deriveFill(RMImageData anImageData)
Creates a new image fill from this fill, but with a new image.
-
deriveFill
public RMImageFill deriveFill(java.lang.String aName, java.lang.Number aValue)
Creates a new image fill identical to this image fill, but with new value for given attribute.
-
getType
public java.lang.String getType()
Returns the type of the image for this image fill (gif, jpg, png, etc.).
-
getImageWidth
public double getImageWidth()
Returns the actual display width of the image in printer's points using the image DPI if available.
-
getImageHeight
public double getImageHeight()
Returns the actual display height of the image in printer's points using the image DPI if available.
-
paint
public void paint(RMShapePainter aPntr, RMShape aShape)
Render this fill in a shape painter.
-
equals
public boolean equals(java.lang.Object anObj)
Standard equals implementation.
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.- Specified by:
toXML
in interfaceArchivable
- Overrides:
toXML
in classRMFill
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
- Overrides:
fromXML
in classRMFill
-
-