Package com.github.weisj.jsvg.nodes
Class ShapeNode
- 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 FontSize
fontSize
private Length
fontSizeAdjust
private Marker
markerEnd
private Marker
markerMid
private Marker
markerStart
private PaintContext
paintContext
private Length
pathLength
private MeasurableShape
shape
private 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 void
build(@NotNull AttributeNode attributeNode)
protected abstract @NotNull MeasurableShape
buildShape(@NotNull AttributeNode attributeNode)
boolean
canInstantiate(@NotNull SVGNode node)
private @NotNull java.awt.Stroke
computeEffectiveStroke(@NotNull RenderContext context)
@NotNull Mutator<MeasurableFontSpec>
fontSpec()
boolean
isVisible(@NotNull RenderContext context)
@NotNull PaintContext
paintContext()
void
render(@NotNull RenderContext context, @NotNull Output output)
@NotNull MeasurableShape
shape()
protected boolean
shouldPaintStartEndMarkersInMiddle()
@NotNull java.awt.geom.Rectangle2D
untransformedElementBounds(@NotNull RenderContext context, HasShape.Box box)
@NotNull java.awt.Shape
untransformedElementShape(@NotNull RenderContext context)
@NotNull java.util.Set<VectorEffect>
vectorEffects()
-
Methods inherited from class com.github.weisj.jsvg.nodes.RenderableSVGNode
geometryContextDelegate
-
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, 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.prototype.Transformable
applyTransform, shouldTransform, transformShape
-
-
-
-
Field Detail
-
paintContext
private PaintContext paintContext
-
fontSize
private FontSize fontSize
-
fontSizeAdjust
private Length fontSizeAdjust
-
pathLength
private Length pathLength
-
shape
private MeasurableShape 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:
paintContext
in interfaceHasPaintContext
-
fontSpec
@NotNull public @NotNull Mutator<MeasurableFontSpec> fontSpec()
- Specified by:
fontSpec
in interfaceHasFontContext
-
shape
@NotNull public @NotNull MeasurableShape shape()
-
vectorEffects
@NotNull public @NotNull java.util.Set<VectorEffect> vectorEffects()
- Specified by:
vectorEffects
in interfaceHasVectorEffects
-
build
public final void build(@NotNull @NotNull AttributeNode attributeNode)
- Specified by:
build
in interfaceSVGNode
- Overrides:
build
in classRenderableSVGNode
-
buildShape
@NotNull protected abstract @NotNull MeasurableShape buildShape(@NotNull @NotNull AttributeNode attributeNode)
-
untransformedElementShape
@NotNull public @NotNull java.awt.Shape untransformedElementShape(@NotNull @NotNull RenderContext context)
- Specified by:
untransformedElementShape
in interfaceHasShape
-
untransformedElementBounds
@NotNull public @NotNull java.awt.geom.Rectangle2D untransformedElementBounds(@NotNull @NotNull RenderContext context, HasShape.Box box)
- Specified by:
untransformedElementBounds
in interfaceHasShape
-
isVisible
public boolean isVisible(@NotNull @NotNull RenderContext context)
- Specified by:
isVisible
in interfaceRenderable
- Overrides:
isVisible
in classRenderableSVGNode
-
canInstantiate
public boolean canInstantiate(@NotNull @NotNull SVGNode node)
- Specified by:
canInstantiate
in 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:
render
in interfaceRenderable
-
shouldPaintStartEndMarkersInMiddle
protected boolean shouldPaintStartEndMarkersInMiddle()
-
-