- java.lang.Object
-
- com.github.weisj.jsvg.nodes.AbstractSVGNode
-
- com.github.weisj.jsvg.nodes.RenderableSVGNode
-
- com.github.weisj.jsvg.nodes.ShapeNode
-
- All Implemented Interfaces:
HasClip,HasFilter,HasFontContext,HasGeometryContext,HasGeometryContext.ByDelegate,HasPaintContext,HasShape,HasVectorEffects,Instantiator,Renderable,Transformable,SVGNode
public abstract class ShapeNode extends RenderableSVGNode implements HasShape, HasPaintContext, HasFontContext, HasVectorEffects, Instantiator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasGeometryContext
HasGeometryContext.ByDelegate
-
Nested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasShape
HasShape.Box
-
-
Field Summary
Fields Modifier and Type Field Description private FontSizefontSizeprivate LengthfontSizeAdjustprivate MarkermarkerEndprivate MarkermarkerMidprivate MarkermarkerStartprivate PaintContextpaintContextprivate LengthpathLengthprivate SVGShapeshapeprivate java.util.Set<VectorEffect>vectorEffects
-
Constructor Summary
Constructors Constructor Description ShapeNode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidbuild(@NotNull AttributeNode attributeNode)protected abstract @NotNull SVGShapebuildShape(@NotNull AttributeNode attributeNode)booleancanInstantiate(@NotNull SVGNode node)private @NotNull java.awt.StrokecomputeEffectiveStroke(@NotNull RenderContext context)@NotNull Mutator<MeasurableFontSpec>fontSpec()@NotNull PaintContextpaintContext()voidrender(@NotNull RenderContext context, @NotNull Output output)@NotNull SVGShapeshape()protected booleanshouldPaintStartEndMarkersInMiddle()@NotNull java.awt.geom.Rectangle2DuntransformedElementBounds(@NotNull RenderContext context, HasShape.Box box)@NotNull java.awt.ShapeuntransformedElementShape(@NotNull RenderContext context, HasShape.Box box)@NotNull java.util.Set<VectorEffect>vectorEffects()-
Methods inherited from class com.github.weisj.jsvg.nodes.RenderableSVGNode
geometryContextDelegate, isVisible
-
Methods inherited from class com.github.weisj.jsvg.nodes.AbstractSVGNode
addContent, id, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasGeometryContext.ByDelegate
clipPath, filter, mask, transform, transformBox, transformOrigin
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasShape
elementBounds, elementShape
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Instantiator
createContextAttributes
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Renderable
parseIsVisible, requiresInstantiation, shouldEstablishChildContext
-
Methods inherited from interface com.github.weisj.jsvg.nodes.SVGNode
addContent, id, tagName
-
Methods inherited from interface com.github.weisj.jsvg.nodes.prototype.Transformable
applyTransform, effectiveTransform, shouldTransform, transformShape
-
-
-
-
Field Detail
-
paintContext
private PaintContext paintContext
-
fontSize
private FontSize fontSize
-
fontSizeAdjust
private Length fontSizeAdjust
-
pathLength
private Length pathLength
-
shape
private SVGShape shape
-
markerStart
private Marker markerStart
-
markerMid
private Marker markerMid
-
markerEnd
private Marker markerEnd
-
vectorEffects
private java.util.Set<VectorEffect> vectorEffects
-
-
Method Detail
-
paintContext
@NotNull public @NotNull PaintContext paintContext()
- Specified by:
paintContextin interfaceHasPaintContext
-
fontSpec
@NotNull public @NotNull Mutator<MeasurableFontSpec> fontSpec()
- Specified by:
fontSpecin interfaceHasFontContext
-
shape
@NotNull public @NotNull SVGShape shape()
-
vectorEffects
@NotNull public @NotNull java.util.Set<VectorEffect> vectorEffects()
- Specified by:
vectorEffectsin interfaceHasVectorEffects
-
build
public final void build(@NotNull @NotNull AttributeNode attributeNode)- Specified by:
buildin interfaceSVGNode- Overrides:
buildin classRenderableSVGNode
-
buildShape
@NotNull protected abstract @NotNull SVGShape buildShape(@NotNull @NotNull AttributeNode attributeNode)
-
untransformedElementShape
@NotNull public @NotNull java.awt.Shape untransformedElementShape(@NotNull @NotNull RenderContext context, HasShape.Box box)- Specified by:
untransformedElementShapein interfaceHasShape
-
untransformedElementBounds
@NotNull public @NotNull java.awt.geom.Rectangle2D untransformedElementBounds(@NotNull @NotNull RenderContext context, HasShape.Box box)- Specified by:
untransformedElementBoundsin interfaceHasShape
-
canInstantiate
public boolean canInstantiate(@NotNull @NotNull SVGNode node)- Specified by:
canInstantiatein interfaceInstantiator
-
computeEffectiveStroke
@NotNull private @NotNull java.awt.Stroke computeEffectiveStroke(@NotNull @NotNull RenderContext context)
-
render
public final void render(@NotNull @NotNull RenderContext context, @NotNull @NotNull Output output)- Specified by:
renderin interfaceRenderable
-
shouldPaintStartEndMarkersInMiddle
protected boolean shouldPaintStartEndMarkersInMiddle()
-
-