|
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
The SVGNode class implements the base class for all elements in the SVG language.
All of the SVG classes that correspond directly to elements in the SVG language (e.g., the SVGPathElem class corresponds directly to the 'path' element in the language) are derivative from this base class SVGNode.
| Field Summary | |
TinyVector |
animatedVals
The animated values for this node. |
TinyRect |
bounds
The bounding box of the path in USER SPACE. |
TinyVector |
children
The children in this node. |
TinyColor |
color
The 'color' property is used to provide a potential indirect value (currentColor) for the 'fill' and 'stroke'properties. |
int |
display
A value of display: SVG.NONE indicates that the given element and its children shall not be rendered directly (i.e., those elements are not present in the rendering tree). |
TinyColor |
fill
The 'fill' property paints the interior of the given graphical element. |
int |
fillOpacity
The 'fill-opacity' specifies the opacity of the painting operation used to paint the interior the current object. |
int |
fillRule
The 'fill-rule' property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. |
TinyString |
fontFamily
The 'font-family' property specifies a font family name. |
int |
fontSize
The 'font-size' property describes the size of the font. |
int |
fontStyle
The 'font-style' property describes the style of the font. |
int |
fontWeight
The 'font-weight' property describes the weight of the font. |
int |
helem
The SVG element handler - an integer indicating which type of node this is. |
TinyString |
id
The value of the id attribute on the given node. |
int |
opacity
The 'opacity' specifies the object/group opacity. |
boolean |
outlined
True is the node is outlined, false otherwise. |
SVGDocument |
ownerDocument
The document to which this node belongs. |
SVGNode |
parent
The node's parent |
TinyColor |
stopColor
The 'stop-color' property indicates what color to use at that gradient stop. |
int |
stopOpacity
The 'stop-opacity' property defines the opacity of a given gradient stop |
TinyColor |
stroke
The 'stroke' property paints along the outline of the given graphical element. |
int[] |
strokeDashArray
The 'stroke-dasharray' controls the pattern of dashes and gaps used to stroke paths. |
int |
strokeDashOffset
The 'stroke-dashoffset' specifies the distance into the dash pattern to start the dash. |
int |
strokeLineCap
The 'stroke-linecap' specifies the shape to be used at the end of open subpaths when they are stroked. |
int |
strokeLineJoin
The 'stroke-linejoin' specifies the shape to be used at the corners of paths or basic shapes when they are stroked. |
int |
strokeMiterLimit
The 'stroke-miterlimit' imposes a limit on the ratio of the miter length to the 'stroke-linewidth'. |
int |
strokeOpacity
The 'stroke-opacity' specifies the opacity of the painting operation used to stroke the current object. |
int |
strokeWidth
The width of the stroke on the current object. |
int |
textAnchor
The 'text-anchor' property is used to align (start-, middle- or end-alignment) a string of text relative to a given point. |
TinyMatrix |
transform
The Transformation matrix which defines the mathematical mapping from one coordinate system into another. |
int |
visibility
The 'visibility' property specifies whether the current object is to be rendered. |
int |
xmlSpace
Specifies the handling of white space characters |
| Constructor Summary | |
SVGNode()
Creates an element. |
|
SVGNode(SVGNode src)
Creates an element. |
|
| Method Summary | |
void |
addChild(SVGNode child,
int index)
Adds the specified child to this container node at the specified index. |
boolean |
contains(SVGRaster renderer,
TinyPoint p)
Returns true if the specified TinyPoint is inside the device boundary of this SVGNode, false otherwise. |
abstract SVGNode |
copyNode()
Constructs a copy of the given node. |
abstract 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. |
int |
getCapStyle()
Gets the stroke cap style for this SVGNode node. |
TinyColor |
getCurrentColor()
Gets the current color of this SVGNode node. |
int[] |
getDashArray()
Gets the stroke dash array for this SVGNode node. |
int |
getDashOffset()
Gets the stroke dash offset for this SVGNode node. |
TinyRect |
getDevBounds(SVGRaster renderer)
Returns the device bounding box for this SVGNode. |
int |
getDisplay()
Gets the display property for this SVGNode node. |
TinyColor |
getFillColor()
Gets the fill color of this SVGNode node. |
int |
getFillOpacity()
Gets the fill opacity for this SVGNode node. |
int |
getFillRule()
Gets the fill rule for this SVGNode node. |
TinyString |
getFontFamily()
Returns the font family of this SVGNode. |
int |
getFontSize()
Returns the font size of this SVGNode. |
TinyMatrix |
getGlobalTransform()
Returns the concatenated transform of this SVGNode. |
int |
getJoinStyle()
Gets the stroke join style for this SVGNode node. |
int |
getLineThickness()
Gets the line thickness for this SVGNode node. |
int |
getMiterLimit()
Gets the stroke miter limit for this SVGNode node. |
static SVGNode |
getNodeById(SVGDocument doc,
TinyString key)
Returns the node that has the specified Id or null object otherwise. |
int |
getOpacity()
Gets the object opacity for this SVGNode node. |
TinyColor |
getStopColor()
Gets the stop color of this SVGNode node. |
int |
getStopOpacity()
Gets the stop opacity for this SVGNode node. |
TinyColor |
getStrokeColor()
Gets the stroke color of this SVGNode node. |
int |
getStrokeOpacity()
Gets the stroke opacity for this SVGNode node. |
int |
getTextAnchor()
Gets the text anchor style of this SVGNode. |
int |
getVisibility()
Gets the visibility propery for this SVGNode node. |
boolean |
intersects(SVGRaster renderer,
TinyRect r)
Returns true if the interior of this SVGNode intersects the interior of a specified TinyRect, false otherwise. |
boolean |
isDisplay()
Returns true if this SVGNode is dislplayable, false otherwise. |
boolean |
isVisible()
Returns true if this SVGNode is visible, false otherwise. |
boolean |
matchUserAgent()
Tests whether or not the given this SVGNode match a specified user agent. |
SVGNode |
nodeHitAt(SVGRaster renderer,
TinyPoint p)
Returns the SVGNode node containing TinyPoint p. |
abstract void |
paint(SVGRaster renderer)
Draws this node. |
int |
removeChild(int index)
Removes the child, specified by index,
from this parent node. |
TinyColor |
resolveColor(TinyColor c)
Gets the dereferred color of this TinyColor c. |
SVGNode |
seekAElem()
Returns the container 'a' element that has this SVGNode as a child or null. |
int |
setAttribute(int hattr,
java.lang.Object value)
Assigns or modifies the value of the specified attribute. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int helem
public SVGDocument ownerDocument
public SVGNode parent
public TinyVector children
public TinyVector animatedVals
public TinyString id
public int xmlSpace
public TinyColor color
Value: ( TinyColor | TinyColor.INHERIT )
Animatable: Yes
Init: black
public TinyColor fill
Value: ( TinyColor.NONE | TinyColor.CURRENT | TinyColor | TinyColor.INHERIT )
Animatable: Yes
Init: black
public int fillRule
Value: (SVG.VAL_NONZERO | SVG.VAL_EVENODD | SVG.VAL_INHERIT)
Animatable: Yes
Init: SVG.NONZERO
public TinyColor stroke
Value: ( TinyColor.NONE | TinyColor.CURRENT | TinyColor | TinyColor.INHERIT )
Animatable: Yes
Init: TinyColor.NONE
public int[] strokeDashArray
Value: ( SVG.VAL_STROKEDASHARRAYNONE |
Animatable: Yes
Init: SVG.STROKEDASHARRAYNONE
public int strokeDashOffset
Value: (
Animatable: Yes
Init: 0
public int strokeLineCap
Value: (SVG.VAL_BUTT | SVG.VAL_ROUND | SVG.VAL_SQUARE | SVG.VAL_INHERIT )
Animatable: Yes
Init: SVG.VAL_BUTT
public int strokeLineJoin
Value: (SVG.VAL_MITER | SVG.VAL_ROUND | SVG.VAL_BEVEL | SVG.VAL_INHERIT )
Animatable: Yes
Init: SVG.VAL_MITER
public int strokeMiterLimit
Value: (
Animatable: Yes
Init: 4
public int strokeWidth
Value: (
Animatable: Yes
Init: 1
public int visibility
Value: (SVG.VAL_VISIBLE | SVG.VAL_HIDDEN | SVG.VAL_COLLAPSE | SVG.VAL_INHERIT)
Animatable: Yes
Init: SVG.VAL_VISIBLE
public int display
Value: (SVG.VAL_INLINE | SVG.VAL_NONE | SVG.VAL_INHERIT)
Animatable: Yes
Init: SVG.VAL_INLINE
public TinyString fontFamily
Value: (
Animatable: Yes
Init: Helvetica
public int fontSize
Value: (
Animatable: Yes
Init: 12
public int fontStyle
Value: ( SVG.VAL_NORMAL | SVG.VAL_ITALIC | SVG.VAL_OBLIQUE | SVG.VAL_INHERIT)
Animatable: Yes
Init: SVG.VAL_NORMAL
public int fontWeight
Value: SVG.VAL_NORMAL | SVG.VAL_BOLD | SVG.VAL_BOLDER | SVG.VAL_LIGHTER | SVG.VAL_100 | SVG.VAL_200 | SVG.VAL_300 | SVG.VAL_400 | SVG.VAL_500 | SVG.VAL_600 | SVG.VAL_700 | SVG.VAL_800 | SVG.VAL_900 | SVG.VAL_INHERIT)
Animatable: Yes
Init: SVG.VAL_NORMAL
public int textAnchor
Value: (SVG.VAL_START | SVG.VAL_MIDDLE | SVG.VAL_END | SVG.VAL_INHERIT)
Animatable: Yes
Init: SVG.VAL_START
public int fillOpacity
Value: (TinyNumer | TinyNumer.INHERIT)
Animatable: Yes
Init: 1
public int stopOpacity
Value: (TinyNumer | TinyNumer.INHERIT)
Animatable: Yes
Init: 1
public int strokeOpacity
Value: (TinyNumer | TinyNumer.INHERIT)
Animatable: Yes
Init: 1
public int opacity
Value: (TinyNumer | TinyNumer.INHERIT)
Animatable: Yes
Init: 1
public TinyColor stopColor
Value: ( TinyColor.CURRENT | TinyColor | TinyColor.INHERIT )
Animatable: Yes
Init: black
public TinyMatrix transform
public TinyRect bounds
public boolean outlined
| Constructor Detail |
public SVGNode()
public SVGNode(SVGNode src)
| Method Detail |
public void addChild(SVGNode child,
int index)
child - the child to be added.index - the position in the container's list at which to
insert the child, where -1
means insert at the end.public int removeChild(int index)
index,
from this parent node.
index - the index of the child to be removed.public abstract void paint(SVGRaster renderer)
renderer - The SVGRaster object
that does the drawing.public abstract int createOutline()
public abstract SVGNode copyNode()
public int setAttribute(int hattr,
java.lang.Object value)
throws java.lang.Exception
hattr - 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.
hattr - The attribute handle.
public boolean matchUserAgent()
public TinyColor getCurrentColor()
public TinyColor getFillColor()
public int getFillRule()
public TinyColor getStrokeColor()
public TinyColor resolveColor(TinyColor c)
public int[] getDashArray()
public int getDashOffset()
public int getCapStyle()
public int getJoinStyle()
public int getMiterLimit()
public int getLineThickness()
public int getFillOpacity()
public int getStrokeOpacity()
public int getOpacity()
public TinyColor getStopColor()
public int getStopOpacity()
public int getDisplay()
public int getVisibility()
public int getFontSize()
public TinyString getFontFamily()
public int getTextAnchor()
public boolean isVisible()
public boolean isDisplay()
public boolean contains(SVGRaster renderer,
TinyPoint p)
p - the specified TinyPoint in DEVICE SPACE
public boolean intersects(SVGRaster renderer,
TinyRect r)
r - the specified TinyRect in DEVICE SPACE
public SVGNode nodeHitAt(SVGRaster renderer,
TinyPoint p)
p - the specified TinyPoint in DEVICE SPACEpublic SVGNode seekAElem()
public TinyMatrix getGlobalTransform()
public TinyRect getBounds()
public TinyRect getDevBounds(SVGRaster renderer)
renderer - Handle to the SVGRaster object
that does the drawing.
public static SVGNode getNodeById(SVGDocument doc,
TinyString key)
null object otherwise.
key - The specified Id.
|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||