|
ReportMill 11 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.reportmill.shape.fill.RMFill
com.reportmill.shape.fill.RMImageFill
public class RMImageFill
This class is used to fill a shape's path with an image.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_FILL_STYLE
|
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_X
|
static java.lang.String |
ATTRIBUTE_Y
|
static byte |
STYLE_FIT
|
static byte |
STYLE_FIT_IFNEEDED
|
static byte |
STYLE_STRETCH
|
static byte |
STYLE_TILE
|
Constructor Summary | |
---|---|
RMImageFill()
Creates a plain image fill. |
|
RMImageFill(java.lang.Object aSource)
Creates an image fill for the given source. |
|
RMImageFill(java.lang.Object aSource,
byte aFillStyle,
float aMargin)
Creates an image fill from an image source. |
Method Summary | |
---|---|
RMFill |
deriveFill(RMColor aColor)
Creates a new fill from this image fill, but with a new color. |
RMImageFill |
deriveFill(com.reportmill.graphics.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(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival. |
byte |
getFillStyle()
Returns the fill style (Stretch, Tile, Fit or FitIfNeeded). |
java.awt.Image |
getImage()
Returns the image rendered by this image fill. |
RMRect |
getImageBounds(RMRect aRect)
Returns the image bounds for a given rect. |
RMRect |
getImageBounds(RMShape aShape)
Returns the image bounds for a given shape. |
com.reportmill.graphics.RMImageData |
getImageData()
Returns the image data associated with this image fill. |
float |
getImageMargins()
Returns the inset for the image when drawn in a given bounds. |
RMSize |
getImageSize2D()
Returns the image size of the image for this image fill. |
int |
getPageNumber()
Returns the page number of the image fill's image that is displayed (for rare multi-page images like PDF). |
float |
getRoll()
Returns the rotation of the image fill image. |
float |
getScaleX()
Returns the scale x of the image fill image. |
float |
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.). |
float |
getX()
Returns the X location (offset) of the image fill image. |
float |
getY()
Returns the Y location (offset) of the image fill image. |
void |
paint(com.reportmill.shape.RMShapePainter sp,
java.awt.Graphics2D g,
RMShape aShape)
Render this fill in a Java2D Graphics2D. |
void |
setFillStyle(byte aValue)
Returns the fill style (Stretch, Tile, Fit or FitIfNeeded). |
void |
setImageMargins(float aValue)
Sets the inset for the image when drawn in a given bounds. |
void |
setPageNumber(int aNum)
Sets the page number of the image fill's image that is displayed (for rare multi-page images like PDF). |
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML archival. |
Methods inherited from class com.reportmill.shape.fill.RMFill |
---|
clone, deriveFill, getBounds, getColor, getName, hasAlpha, setColor |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte STYLE_STRETCH
public static final byte STYLE_TILE
public static final byte STYLE_FIT
public static final byte STYLE_FIT_IFNEEDED
public static final java.lang.String ATTRIBUTE_FILL_STYLE
public static final java.lang.String ATTRIBUTE_X
public static final java.lang.String ATTRIBUTE_Y
public static final java.lang.String ATTRIBUTE_ROLL
public static final java.lang.String ATTRIBUTE_SCALE_X
public static final java.lang.String ATTRIBUTE_SCALE_Y
Constructor Detail |
---|
public RMImageFill()
public RMImageFill(java.lang.Object aSource)
public RMImageFill(java.lang.Object aSource, byte aFillStyle, float aMargin)
Method Detail |
---|
public java.awt.Image getImage()
public com.reportmill.graphics.RMImageData getImageData()
public byte getFillStyle()
public void setFillStyle(byte aValue)
public float getX()
public float getY()
public float getRoll()
public float getScaleX()
public float getScaleY()
public float getImageMargins()
public void setImageMargins(float aValue)
public RMFill deriveFill(RMColor aColor)
public RMImageFill deriveFill(com.reportmill.graphics.RMImageData anImageData)
public RMImageFill deriveFill(java.lang.String aName, java.lang.Number aValue)
public java.lang.String getType()
public RMSize getImageSize2D()
public RMRect getImageBounds(RMRect aRect)
public RMRect getImageBounds(RMShape aShape)
public int getPageNumber()
public void setPageNumber(int aNum)
public void paint(com.reportmill.shape.RMShapePainter sp, java.awt.Graphics2D g, RMShape aShape)
paint
in class RMFill
public boolean equals(java.lang.Object anObj)
equals
in class RMFill
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
toXML
in class RMFill
public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
fromXML
in class RMFill
|
ReportMill 11 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |