Package com.kitfox.svg
Class ShapeElement
- java.lang.Object
-
- com.kitfox.svg.SVGElement
-
- com.kitfox.svg.TransformableElement
-
- com.kitfox.svg.RenderableElement
-
- com.kitfox.svg.ShapeElement
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
Circle
,Ellipse
,Group
,Line
,MissingGlyph
,Path
,Polygon
,Polyline
,Rect
,Text
,Tspan
,Use
public abstract class ShapeElement extends RenderableElement
Parent of shape objects- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected float
strokeWidthScalar
This is necessary to get text elements to render the stroke the correct width.-
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 ShapeElement()
Creates a new instance of ShapeElement
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.awt.Shape
getShape()
private java.awt.Paint
handleCurrentColor(StyleAttribute styleAttrib)
protected java.awt.geom.Rectangle2D
includeStrokeInBounds(java.awt.geom.Rectangle2D rect)
(package private) void
pick(java.awt.geom.Point2D point, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec)
(package private) 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)
protected void
renderShape(java.awt.Graphics2D g, java.awt.Shape shape)
-
Methods inherited from class com.kitfox.svg.RenderableElement
beginLayer, build, finishLayer, getBoundingBox
-
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
-
-
-
-
Method Detail
-
render
public abstract void render(java.awt.Graphics2D g) throws SVGException
- Specified by:
render
in classRenderableElement
- Throws:
SVGException
-
pick
void pick(java.awt.geom.Point2D point, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec) throws SVGException
- Specified by:
pick
in classRenderableElement
- Throws:
SVGException
-
pick
void pick(java.awt.geom.Rectangle2D pickArea, java.awt.geom.AffineTransform ltw, boolean boundingBox, java.util.List<java.util.List<SVGElement>> retVec) throws SVGException
- Specified by:
pick
in classRenderableElement
- Throws:
SVGException
-
handleCurrentColor
private java.awt.Paint handleCurrentColor(StyleAttribute styleAttrib) throws SVGException
- Throws:
SVGException
-
renderShape
protected void renderShape(java.awt.Graphics2D g, java.awt.Shape shape) throws SVGException
- Throws:
SVGException
-
getShape
public abstract java.awt.Shape getShape()
-
includeStrokeInBounds
protected java.awt.geom.Rectangle2D includeStrokeInBounds(java.awt.geom.Rectangle2D rect) throws SVGException
- Throws:
SVGException
-
-