Package com.reportmill.graphics
Class RMImageFill
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.graphics.RMFill
com.reportmill.graphics.RMImageFill
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
- Direct Known Subclasses:
- RMShadowFill
This class is used to fill a shape's path with an image.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a plain image fill.RMImageFill(Object aSource) Creates an image fill for the given source.RMImageFill(Object aSource, byte aFillStyle, float aMargin) Creates an image fill from an image source.
- 
Method SummaryModifier and TypeMethodDescriptionawt()Returns the AWT image for this image fill.deriveFill(RMColor aColor) Creates a new fill from this image fill, but with a new color.deriveFill(RMImageData anImageData) Creates a new image fill from this fill, but with a new image.deriveFill(String aName, Number aValue) Creates a new image fill identical to this image fill, but with new value for given attribute.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.byteReturns the fill style (Stretch, Tile, Fit or FitIfNeeded).getImageBounds(RMRect aRect) Returns the image bounds for a given rect.getImageBounds(RMShape aShape) Returns the image bounds for a given shape.Returns the image data associated with this image fill.floatReturns the inset for the image when drawn in a given bounds.Returns an RMShape representation of the image fill's image (for rare vector based images like PDF).Returns the image size of the image for this image fill.intReturns the page number of the image fill's image that is displayed (for rare multi-page images like PDF).floatgetRoll()Returns the rotation of the image fill image.floatReturns the scale x of the image fill image.floatReturns the scale y of the image fill image.getType()Returns the type of the image for this image fill (gif, jpg, png, etc.).floatgetX()Returns the X location (or offset) of the image fill image.floatgetY()Returns the Y location (or offset) of the image fill image.initWithArchiver(RMArchiver anArchiver) Legacy unarchival.voidpaintShape(RMShape aShape, RMPath aPath, Graphics2D g, RMShapePainter sp) Render this fill in a Java2D Graphics2D.voidsetFillStyle(byte aValue) Returns the fill style (Stretch, Tile, Fit or FitIfNeeded).voidsetImageData(RMImageData anImageData) Sets the image data associated with this image fill.voidsetImageMargins(float aValue) Sets the inset for the image when drawn in a given bounds.voidsetPageNumber(int aNum) Sets the page number of the image fill's image that is displayed (for rare multi-page images like PDF).booleanReturns whether fill should clip to path when painting.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.reportmill.graphics.RMFillgetBounds, getChild, getChildCount, getColor, setColorMethods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
- 
Field Details- 
STYLE_STRETCHpublic static final byte STYLE_STRETCH- See Also:
 
- 
STYLE_TILEpublic static final byte STYLE_TILE- See Also:
 
- 
STYLE_FITpublic static final byte STYLE_FIT- See Also:
 
- 
STYLE_FIT_IFNEEDEDpublic static final byte STYLE_FIT_IFNEEDED- See Also:
 
- 
ATTRIBUTE_FILL_STYLE- See Also:
 
- 
ATTRIBUTE_X- See Also:
 
- 
ATTRIBUTE_Y- See Also:
 
- 
ATTRIBUTE_ROLL- See Also:
 
- 
ATTRIBUTE_SCALE_X- See Also:
 
- 
ATTRIBUTE_SCALE_Y- See Also:
 
 
- 
- 
Constructor Details- 
RMImageFillpublic RMImageFill()Creates a plain image fill.
- 
RMImageFillCreates an image fill for the given source.
- 
RMImageFillCreates an image fill from an image source.
 
- 
- 
Method Details- 
getImageDataReturns the image data associated with this image fill.
- 
setImageDataSets the image data associated with this image fill.
- 
getFillStylepublic byte getFillStyle()Returns the fill style (Stretch, Tile, Fit or FitIfNeeded).
- 
setFillStylepublic void setFillStyle(byte aValue) Returns the fill style (Stretch, Tile, Fit or FitIfNeeded).
- 
getXpublic float getX()Returns the X location (or offset) of the image fill image.
- 
getYpublic float getY()Returns the Y location (or offset) of the image fill image.
- 
getRollpublic float getRoll()Returns the rotation of the image fill image.
- 
getScaleXpublic float getScaleX()Returns the scale x of the image fill image.
- 
getScaleYpublic float getScaleY()Returns the scale y of the image fill image.
- 
getImageMarginspublic float getImageMargins()Returns the inset for the image when drawn in a given bounds.
- 
setImageMarginspublic void setImageMargins(float aValue) Sets the inset for the image when drawn in a given bounds.
- 
deriveFillCreates a new fill from this image fill, but with a new color.- Overrides:
- deriveFillin class- RMFill
 
- 
deriveFillCreates a new image fill from this fill, but with a new image.
- 
deriveFillCreates a new image fill identical to this image fill, but with new value for given attribute.
- 
getTypeReturns the type of the image for this image fill (gif, jpg, png, etc.).
- 
getImageSize2DReturns the image size of the image for this image fill.
- 
getImageBoundsReturns the image bounds for a given rect.
- 
getImageBoundsReturns the image bounds for a given shape.
- 
getPageNumberpublic int getPageNumber()Returns the page number of the image fill's image that is displayed (for rare multi-page images like PDF).
- 
setPageNumberpublic void setPageNumber(int aNum) Sets the page number of the image fill's image that is displayed (for rare multi-page images like PDF).
- 
shouldClipToPathpublic boolean shouldClipToPath()Returns whether fill should clip to path when painting.
- 
getImageShapeReturns an RMShape representation of the image fill's image (for rare vector based images like PDF).
- 
paintShapeRender this fill in a Java2D Graphics2D.- Overrides:
- paintShapein class- RMFill
 
- 
equalsStandard equals implementation.
- 
initWithArchiverLegacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMFill
 
- 
toXMLXML archival.
- 
fromXMLXML unarchival.
- 
awtReturns the AWT image for this image fill.
 
-