Package com.kitfox.svg
Class RenderableElement
- java.lang.Object
-
- com.kitfox.svg.SVGElement
-
- com.kitfox.svg.TransformableElement
-
- com.kitfox.svg.RenderableElement
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ImageSVG
,ShapeElement
public abstract class RenderableElement extends TransformableElement
Maintains bounding box for this element- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.awt.Shape
cachedClip
(package private) java.awt.geom.AffineTransform
cachedXform
static int
VECTOR_EFFECT_NON_SCALING_STROKE
static int
VECTOR_EFFECT_NONE
(package private) int
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 RenderableElement()
Creates a new instance of BoundedElementRenderableElement(java.lang.String id, SVGElement parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
beginLayer(java.awt.Graphics2D g)
Pushes transform stack, transforms to local coordinates and sets up clipping mask.protected void
build()
Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.protected void
finishLayer(java.awt.Graphics2D g)
Restores transform and clipping values to the way they were before this layer was drawn.abstract java.awt.geom.Rectangle2D
getBoundingBox()
(package private) abstract void
pick(java.awt.geom.Point2D point, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec)
(package private) abstract void
pick(java.awt.geom.Rectangle2D pickArea, java.awt.geom.AffineTransform ltw, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec)
abstract void
render(java.awt.Graphics2D g)
-
Methods inherited from class com.kitfox.svg.TransformableElement
boundsToParent, getXForm, shapeToParent, updateTime
-
Methods inherited from class com.kitfox.svg.SVGElement
addAttribute, buildPath, getChild, getChild, getChildren, getId, getInlineAttributes, getNumChildren, getParent, getParentContext, getPath, getPres, getPresAbsolute, getPresentationAttributes, getRoot, getStyle, getStyle, getStyle, getStyleAbsolute, getTagName, getXMLBase, hasAttribute, indexOfChild, lerp, loaderAddChild, loaderAddText, loaderEndElement, loaderStartElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, setParent, swapChildren
-
-
-
-
Field Detail
-
cachedXform
java.awt.geom.AffineTransform cachedXform
-
cachedClip
java.awt.Shape cachedClip
-
VECTOR_EFFECT_NONE
public static final int VECTOR_EFFECT_NONE
- See Also:
- Constant Field Values
-
VECTOR_EFFECT_NON_SCALING_STROKE
public static final int VECTOR_EFFECT_NON_SCALING_STROKE
- See Also:
- Constant Field Values
-
vectorEffect
int vectorEffect
-
-
Constructor Detail
-
RenderableElement
public RenderableElement()
Creates a new instance of BoundedElement
-
RenderableElement
public RenderableElement(java.lang.String id, SVGElement parent)
-
-
Method Detail
-
build
protected 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 classTransformableElement
- Throws:
SVGException
-
render
public abstract void render(java.awt.Graphics2D g) throws SVGException
- Throws:
SVGException
-
pick
abstract void pick(java.awt.geom.Point2D point, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec) throws SVGException
- Throws:
SVGException
-
pick
abstract void pick(java.awt.geom.Rectangle2D pickArea, java.awt.geom.AffineTransform ltw, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec) throws SVGException
- Throws:
SVGException
-
getBoundingBox
public abstract java.awt.geom.Rectangle2D getBoundingBox() throws SVGException
- Throws:
SVGException
-
beginLayer
protected void beginLayer(java.awt.Graphics2D g) throws SVGException
Pushes transform stack, transforms to local coordinates and sets up clipping mask.- Parameters:
g
- Graphics context- Throws:
SVGException
-
finishLayer
protected void finishLayer(java.awt.Graphics2D g)
Restores transform and clipping values to the way they were before this layer was drawn.- Parameters:
g
-
-
-