|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SVGSVGElement
This interface represents <svg> element in (SVG) document tree.
The DOM attributes currentScale, currentRotate and currentTranslate are combined to form user agent transformation which is applied at the outermost level on the SVG document (i.e., outside the outermost 'svg' element) if "magnification" is enabled (i.e., zoomAndPan attribute is set to "magnify"). Their values can potentialy be modified through user-agent specific UI. User agent transformation can be obtained by multiplying matrix
[currentScale 0 currentTranslate.x] [cos(currentRotate) -sin(currentRotate 0] [ 0 currentScale currentTranslate.y] by [sin(currentRotate) cos(currentRotate) 0] [ 0 0 1 ] [ 0 0 1]i.e. (translate, then scale, then rotate the coordinate system). The reference point for scale and rotate operations is the origin (0, 0).
Note: If the application does not have the necessary privilege rights to access this (SVG) content, a SecurityException may be thrown by the underlying implementation. This is applicable to all the Tree navigation and Trait acessor methods. Features such as zooming, panning and playing of animations will not be affected.
Method Summary | |
---|---|
SVGMatrix |
createSVGMatrixComponents(float a,
float b,
float c,
float d,
float e,
float f)
Creates new SVGMatrix object. |
SVGPath |
createSVGPath()
Creates new SVGPath object. |
SVGRect |
createSVGRect()
Creates new SVGRect object. |
SVGRGBColor |
createSVGRGBColor(int red,
int green,
int blue)
Creates new SVGRGBColor object. |
float |
getCurrentRotate()
Returns current user agent rotation angle in degrees. |
float |
getCurrentScale()
Returns current user agent scale (zoom) coefficient. |
float |
getCurrentTime()
Returns current animation timeline time in seconds. |
SVGPoint |
getCurrentTranslate()
Current user agent translation used for scrolling or panning (The returned SVGPoint object is "live" and setting its
x and y components will change user agent's translation). |
void |
setCurrentRotate(float value)
Sets current user agent rotate coefficient in degrees. |
void |
setCurrentScale(float value)
Sets current user agent scale (zoom) coefficient. |
void |
setCurrentTime(float seconds)
Sets current animation timeline time (in seconds). |
Methods inherited from interface org.w3c.dom.svg.SVGLocatableElement |
---|
getBBox, getScreenBBox, getScreenCTM |
Methods inherited from interface org.w3c.dom.svg.SVGElement |
---|
getFirstElementChild, getFloatTrait, getId, getMatrixTrait, getNextElementSibling, getPathTrait, getRectTrait, getRGBColorTrait, getTrait, getTraitNS, setFloatTrait, setId, setMatrixTrait, setPathTrait, setRectTrait, setRGBColorTrait, setTrait, setTraitNS |
Methods inherited from interface org.w3c.dom.Node |
---|
appendChild, getLocalName, getNamespaceURI, getParentNode, insertBefore, removeChild |
Methods inherited from interface org.w3c.dom.events.EventTarget |
---|
addEventListener, removeEventListener |
Method Detail |
---|
void setCurrentScale(float value) throws DOMException
value
- the value of user agent scale coefficient to be set.
DOMException
- with error code INVALID_ACCESS_ERR if the scale value is set to zero.float getCurrentScale()
void setCurrentRotate(float value)
value
- the value of user agent rotate coefficient to be set.float getCurrentRotate()
SVGPoint getCurrentTranslate()
SVGPoint
object is "live" and setting its
x and y components will change user agent's translation). The initial values for currentTranslate is SVGPoint(0,0).
float getCurrentTime()
void setCurrentTime(float seconds)
seconds
- the value of time to be set in seconds.SVGMatrix createSVGMatrixComponents(float a, float b, float c, float d, float e, float f)
SVGMatrix
object. This object can be used to modify value of traits which are compatible with SVGMatrix
type using setMatrixTrait
method. The internal representation of the matrix is as follows:
[ a c e ] [ b d f ] [ 0 0 1 ]
a
- the 'a' component of the matrix to be set.b
- the 'b' component of the matrix to be set.c
- the 'c' component of the matrix to be set.d
- the 'd' component of the matrix to be set.e
- the 'e' component of the matrix to be set.f
- the 'f' component of the matrix to be set.
SVGMatrix
SVGRect createSVGRect()
SVGRect
object. This object can be used to modify value of traits which are compatible with SVGRect
type using setRectTrait
method. The intial values for x, y, width, height of this new SVGRect are zero.
SVGPath createSVGPath()
SVGPath
object. This object can be used to modify value of traits which are compatible with SVGPath
type using setPathTrait
method.
SVGRGBColor createSVGRGBColor(int red, int green, int blue) throws SVGException
SVGRGBColor
object. This object can be used to modify value of traits which are compatible with SVGRGBColor
type using setRGBColorTrait
method.
red
- the red component of SVGRGBColor object.green
- the green component of SVGRGBColor object.blue
- the blue component of SVGRGBColor object.
SVGException
- with error code SVG_INVALID_VALUE_ERR: if any of the parameters is not in the 0..255 range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |