public class ImageReplacedElement extends java.lang.Object implements ReplacedElement
ReplacedElement
that contains a Image
. It's used as a
container for images included within XML being rendered. The image contained is immutable.?????? |
---|
ImageReplacedElement(java.awt.Image image,
int targetWidth,
int targetHeight)
Creates a new ImageReplacedElement and scales it to the size specified if either width or height has a valid
value (values are > -1), otherwise original size is preserved.
|
?????? | ????? |
---|---|
void |
detach(LayoutContext c) |
int |
getBaseline() |
java.awt.Image |
getImage()
The image we're replacing.
|
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
java.awt.Point |
getLocation()
Returns the current location where the element will be rendered on the canvas
|
boolean |
hasBaseline() |
boolean |
isRequiresInteractivePaint() |
void |
setLocation(int x,
int y)
Assigns the new locations where the element will be rendered.
|
public ImageReplacedElement(java.awt.Image image, int targetWidth, int targetHeight)
image
- An image.targetWidth
- The width we'd like the image to have, in pixels.targetHeight
- The height we'd like the image to have, in pixels.public void detach(LayoutContext c)
detach
???? ReplacedElement
public int getIntrinsicHeight()
getIntrinsicHeight
???? ReplacedElement
public int getIntrinsicWidth()
getIntrinsicWidth
???? ReplacedElement
public java.awt.Point getLocation()
getLocation
???? ReplacedElement
public boolean isRequiresInteractivePaint()
isRequiresInteractivePaint
???? ReplacedElement
public void setLocation(int x, int y)
setLocation
???? ReplacedElement
x
- new horizontal posy
- new vertical pospublic java.awt.Image getImage()
public int getBaseline()
getBaseline
???? ReplacedElement
public boolean hasBaseline()
hasBaseline
???? ReplacedElement