Package com.kitfox.svg
Class SVGRoot
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
public class SVGRoot extends Group
The root element of an SVG tree.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.awt.geom.Rectangle2D.Float
clipRect
(package private) NumberWithUnits
height
static int
PA_X_MAX
static int
PA_X_MID
static int
PA_X_MIN
static int
PA_X_NONE
static int
PA_Y_MAX
static int
PA_Y_MID
static int
PA_Y_MIN
static int
PA_Y_NONE
(package private) int
parAlignX
(package private) int
parAlignY
(package private) int
parSpecifier
static int
PS_MEET
static int
PS_SLICE
private StyleSheet
styleSheet
static java.lang.String
TAG_NAME
(package private) java.awt.geom.Rectangle2D.Float
viewBox
(package private) java.awt.geom.AffineTransform
viewXform
(package private) NumberWithUnits
width
(package private) NumberWithUnits
x
(package private) NumberWithUnits
y
-
Fields inherited from class com.kitfox.svg.Group
boundingBox, cachedShape
-
Fields inherited from class com.kitfox.svg.ShapeElement
strokeWidthScalar
-
Fields inherited from class com.kitfox.svg.RenderableElement
cachedClip, cachedXform, VECTOR_EFFECT_NON_SCALING_STROKE, VECTOR_EFFECT_NONE, vectorEffect
-
Fields inherited from class com.kitfox.svg.TransformableElement
xform
-
Fields inherited from class com.kitfox.svg.SVGElement
children, contexts, cssClass, diagram, dirty, id, ignorePresAttrib, inlineStyles, parent, presAttribs, serialVersionUID, SVG_NS, trackManager, xmlBase
-
-
Constructor Summary
Constructors Constructor Description SVGRoot()
Creates a new instance of SVGRoot
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
build()
Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.private boolean
contains(java.lang.String text, java.lang.String find)
java.awt.geom.Rectangle2D
getBoundingBox()
Retrieves the cached bounding box of this groupfloat
getDeviceHeight()
java.awt.geom.Rectangle2D
getDeviceRect(java.awt.geom.Rectangle2D rect)
float
getDeviceWidth()
SVGRoot
getRoot()
java.awt.Shape
getShape()
Retrieves the cached bounding box of this groupStyleSheet
getStyleSheet()
java.lang.String
getTagName()
void
pick(java.awt.geom.Point2D point, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec)
void
pick(java.awt.geom.Rectangle2D pickArea, java.awt.geom.AffineTransform ltw, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec)
protected void
prepareViewport()
void
render(java.awt.Graphics2D g)
void
renderToViewport(java.awt.Graphics2D g)
void
setStyleSheet(StyleSheet styleSheet)
boolean
updateTime(double curTime)
Updates all attributes in this diagram associated with a time event.-
Methods inherited from class com.kitfox.svg.Group
calcBoundingBox, calcShape, loaderAddChild, outsideClip
-
Methods inherited from class com.kitfox.svg.ShapeElement
includeStrokeInBounds, renderShape
-
Methods inherited from class com.kitfox.svg.RenderableElement
beginLayer, finishLayer
-
Methods inherited from class com.kitfox.svg.TransformableElement
boundsToParent, getXForm, shapeToParent
-
Methods inherited from class com.kitfox.svg.SVGElement
addAttribute, buildPath, getChild, getChild, getChildren, getId, getInlineAttributes, getNumChildren, getParent, getParentContext, getPath, getPres, getPresAbsolute, getPresentationAttributes, getStyle, getStyle, getStyle, getStyleAbsolute, getXMLBase, hasAttribute, indexOfChild, lerp, loaderAddText, loaderEndElement, loaderStartElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, setParent, swapChildren
-
-
-
-
Field Detail
-
TAG_NAME
public static final java.lang.String TAG_NAME
- See Also:
- Constant Field Values
-
x
NumberWithUnits x
-
y
NumberWithUnits y
-
width
NumberWithUnits width
-
height
NumberWithUnits height
-
viewBox
java.awt.geom.Rectangle2D.Float viewBox
-
PA_X_NONE
public static final int PA_X_NONE
- See Also:
- Constant Field Values
-
PA_X_MIN
public static final int PA_X_MIN
- See Also:
- Constant Field Values
-
PA_X_MID
public static final int PA_X_MID
- See Also:
- Constant Field Values
-
PA_X_MAX
public static final int PA_X_MAX
- See Also:
- Constant Field Values
-
PA_Y_NONE
public static final int PA_Y_NONE
- See Also:
- Constant Field Values
-
PA_Y_MIN
public static final int PA_Y_MIN
- See Also:
- Constant Field Values
-
PA_Y_MID
public static final int PA_Y_MID
- See Also:
- Constant Field Values
-
PA_Y_MAX
public static final int PA_Y_MAX
- See Also:
- Constant Field Values
-
PS_MEET
public static final int PS_MEET
- See Also:
- Constant Field Values
-
PS_SLICE
public static final int PS_SLICE
- See Also:
- Constant Field Values
-
parSpecifier
int parSpecifier
-
parAlignX
int parAlignX
-
parAlignY
int parAlignY
-
viewXform
final java.awt.geom.AffineTransform viewXform
-
clipRect
final java.awt.geom.Rectangle2D.Float clipRect
-
styleSheet
private StyleSheet styleSheet
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
- Overrides:
getTagName
in classGroup
-
build
public void build() throws SVGException
Description copied from class:SVGElement
Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.- Overrides:
build
in classRenderableElement
- Throws:
SVGException
-
contains
private boolean contains(java.lang.String text, java.lang.String find)
-
getRoot
public SVGRoot getRoot()
- Overrides:
getRoot
in classSVGElement
-
prepareViewport
protected void prepareViewport()
-
renderToViewport
public void renderToViewport(java.awt.Graphics2D g) throws SVGException
- Throws:
SVGException
-
render
public void render(java.awt.Graphics2D g) throws SVGException
- Overrides:
render
in classGroup
- Throws:
SVGException
-
pick
public void pick(java.awt.geom.Rectangle2D pickArea, java.awt.geom.AffineTransform ltw, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec) throws SVGException
- Overrides:
pick
in classGroup
- Throws:
SVGException
-
pick
public void pick(java.awt.geom.Point2D point, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec) throws SVGException
- Overrides:
pick
in classGroup
- Throws:
SVGException
-
getShape
public java.awt.Shape getShape()
Description copied from class:Group
Retrieves the cached bounding box of this group
-
getBoundingBox
public java.awt.geom.Rectangle2D getBoundingBox() throws SVGException
Description copied from class:Group
Retrieves the cached bounding box of this group- Overrides:
getBoundingBox
in classGroup
- Throws:
SVGException
-
getDeviceWidth
public float getDeviceWidth()
-
getDeviceHeight
public float getDeviceHeight()
-
getDeviceRect
public java.awt.geom.Rectangle2D getDeviceRect(java.awt.geom.Rectangle2D rect)
-
updateTime
public boolean updateTime(double curTime) throws SVGException
Updates all attributes in this diagram associated with a time event. Ie, all attributes with track information.- Overrides:
updateTime
in classGroup
- Returns:
- - true if this node has changed state as a result of the time update
- Throws:
SVGException
-
getStyleSheet
public StyleSheet getStyleSheet()
- Returns:
- the styleSheet
-
setStyleSheet
public void setStyleSheet(StyleSheet styleSheet)
- Parameters:
styleSheet
- the styleSheet to set
-
-