|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tinyline.svg.SVGNode
com.tinyline.svg.SVGImageElem
The SVGImageElem class implements the 'image' element.
The 'image' element refers to raster image files such as PNG or JPEG.
The 'image' element has optional attributes x, y, width and height which are used to map the graphical contents of the referenced element onto a rectangular region within the current coordinate system.
Different Java profiles have different methods to load raster images. The ImageLoader interface is wrapper that hides such differences. Before you can use raster images you need to set the ImageLoader interface implemetation:
SVGImageElem.setImageLoader(ImageLoaderImpl);
| Field Summary | |
int |
height
The height of the image rectangle |
int |
width
The width of the image rectangle |
int |
x
The top left x-axis coordinate of the image rectangle. |
TinyString |
xlink_href
The URI reference for the desired resource |
int |
y
The top left y-axis coordinate of the image rectangle. |
| Fields inherited from class com.tinyline.svg.SVGNode |
animatedVals, bounds, children, color, display, fill, fillOpacity, fillRule, fontFamily, fontSize, fontStyle, fontWeight, helem, id, opacity, outlined, ownerDocument, parent, stopColor, stopOpacity, stroke, strokeDashArray, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, strokeOpacity, strokeWidth, textAnchor, transform, visibility, xmlSpace |
| Constructor Summary | |
SVGImageElem(SVGImageElem src)
Creates a copy of the given SVGImageElem object. |
|
| Method Summary | |
SVGNode |
copyNode()
Constructs a copy of the given node. |
int |
createOutline()
Creates an outline of this node. |
java.lang.Object |
getAttribute(int hattr)
Returns the value object for the given attribute, or null object otherwise. |
TinyRect |
getBounds()
Returns the user bounding box for this SVGNode. |
TinyRect |
getDevBounds(SVGRaster renderer)
Returns the device bounding box for this SVGNode. |
void |
paint(SVGRaster renderer)
Draws this node. |
int |
setAttribute(int hattr,
java.lang.Object value)
Assigns or modifies the value of the specified attribute. |
static void |
setImageLoader(ImageLoader imLdr)
Sets the ImageLoader for this SVGImageElem. |
| Methods inherited from class com.tinyline.svg.SVGNode |
addChild, contains, getCapStyle, getCurrentColor, getDashArray, getDashOffset, getDisplay, getFillColor, getFillOpacity, getFillRule, getFontFamily, getFontSize, getGlobalTransform, getJoinStyle, getLineThickness, getMiterLimit, getNodeById, getOpacity, getStopColor, getStopOpacity, getStrokeColor, getStrokeOpacity, getTextAnchor, getVisibility, intersects, isDisplay, isVisible, matchUserAgent, nodeHitAt, removeChild, resolveColor, seekAElem |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int x
public int y
public int width
public int height
public TinyString xlink_href
| Constructor Detail |
public SVGImageElem(SVGImageElem src)
| Method Detail |
public SVGNode copyNode()
copyNode in class SVGNodepublic static void setImageLoader(ImageLoader imLdr)
public int setAttribute(int hattr,
java.lang.Object value)
throws java.lang.Exception
setAttribute in class SVGNodehattr - The attribute handle.value - The value of the attribute.
java.lang.Exception - if the value type doesn not match to the attribute handle.public java.lang.Object getAttribute(int hattr)
null object otherwise.
getAttribute in class SVGNodehattr - The attribute handle.
public void paint(SVGRaster renderer)
paint in class SVGNoderenderer - Handle to the SVGRaster object
that does the drawing.public TinyRect getBounds()
getBounds in class SVGNodepublic TinyRect getDevBounds(SVGRaster renderer)
getDevBounds in class SVGNoderenderer - The SVGRaster object.public int createOutline()
createOutline in class SVGNode
|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||