Package com.github.weisj.jsvg.nodes.text
Class TextPath
java.lang.Object
com.github.weisj.jsvg.nodes.AbstractSVGNode
com.github.weisj.jsvg.nodes.container.BaseContainerNode<com.github.weisj.jsvg.nodes.text.TextSegment>
com.github.weisj.jsvg.nodes.text.TextPath
- All Implemented Interfaces:
Container<com.github.weisj.jsvg.nodes.text.TextSegment>,HasClip,HasContext,HasContext.ByDelegate,HasFilter,HasFontContext,HasFontRenderContext,HasGeometryContext,HasGeometryContext.ByDelegate,HasPaintContext,HasShape,HasVectorEffects,Transformable,SVGNode,CursorContext
@ElementCategories({Graphic,TextContent,TextContentChild})
@PermittedContent(categories=Descriptive,
anyOf={Anchor.class,TextSpan.class,Animate.class,AnimateTransform.class,Set.class},
charData=true)
public final class TextPath
extends BaseContainerNode<com.github.weisj.jsvg.nodes.text.TextSegment>
implements HasGeometryContext.ByDelegate, CursorContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasContext
HasContext.ByDelegateNested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasGeometryContext
HasGeometryContext.ByDelegateNested classes/interfaces inherited from interface com.github.weisj.jsvg.nodes.prototype.HasShape
HasShape.Box -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<com.github.weisj.jsvg.nodes.text.TextSegment> protected AttributeFontSpecprotected booleanprotected LengthAdjuststatic final Stringprotected Length -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanacceptChild(@Nullable String id, @NotNull SVGNode node) Determine whether the container accepts thisSVGNodeas a child.voidaddContent(TextContent.Segment content) @NotNull Point2DappendGlyphShape(@Nullable Point2D start, @NotNull RenderContext context, @NotNull Path2D shape) voidbuild(@NotNull AttributeNode attributeNode) List<? extends com.github.weisj.jsvg.nodes.text.TextSegment> children()Return all children of this container.voidcleanUpLocalCursor(@NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor current, @NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor local) @NotNull HasContext@NotNull com.github.weisj.jsvg.nodes.text.GlyphCursorcreateLocalCursor(boolean isInitial, @NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor current) protected void@Nullable Length@NotNull HasGeometryContextbooleanisVisible(@NotNull RenderContext context) @NotNull Point2DrenderText(@Nullable Point2D start, @NotNull RenderContext context, @NotNull Output output) @NotNull List<? extends com.github.weisj.jsvg.nodes.text.TextSegment> segments()@NotNull StringtagName()final TextAnchortextAnchor(@NotNull RenderContext context) @NotNull Rectangle2DuntransformedElementBounds(@NotNull RenderContext context, HasShape.Box box) final @NotNull ShapeuntransformedElementShape(@NotNull RenderContext context, @NotNull HasShape.Box box) @NotNull Set<VectorEffect> Methods inherited from class com.github.weisj.jsvg.nodes.container.BaseContainerNode
addChild, isAcceptableTypeMethods inherited from class com.github.weisj.jsvg.nodes.AbstractSVGNode
id, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.weisj.jsvg.nodes.prototype.Container
childrenOfTypeMethods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasContext.ByDelegate
fontRenderContext, fontSpec, paintContextMethods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasGeometryContext.ByDelegate
clipPath, filter, mask, transform, transformBox, transformOriginMethods inherited from interface com.github.weisj.jsvg.nodes.prototype.HasShape
elementBounds, elementShapeMethods inherited from interface com.github.weisj.jsvg.nodes.prototype.Transformable
applyTransform, effectiveTransform, shouldTransform, transformShape
-
Field Details
-
TAG
- See Also:
-
children
-
isVisible
protected boolean isVisible -
fontSpec
-
lengthAdjust
-
textLength
-
-
Constructor Details
-
TextPath
public TextPath()
-
-
Method Details
-
tagName
-
build
-
doAdd
- Specified by:
doAddin classBaseContainerNode<com.github.weisj.jsvg.nodes.text.TextSegment>
-
addContent
- Specified by:
addContentin interfaceSVGNode
-
acceptChild
Description copied from class:BaseContainerNodeDetermine whether the container accepts thisSVGNodeas a child. By default, this will always report true but subclasses may choose to reject certain types of nodes.- Overrides:
acceptChildin classBaseContainerNode<com.github.weisj.jsvg.nodes.text.TextSegment>- Parameters:
id- the id of the nodenode- the node itself- Returns:
- whether the node can be inserted as a child.
-
geometryContextDelegate
- Specified by:
geometryContextDelegatein interfaceHasGeometryContext.ByDelegate
-
isVisible
-
segments
-
renderText
@NotNull public @NotNull Point2D renderText(@Nullable @Nullable Point2D start, @NotNull @NotNull RenderContext context, @NotNull @NotNull Output output) -
appendGlyphShape
@NotNull public @NotNull Point2D appendGlyphShape(@Nullable @Nullable Point2D start, @NotNull @NotNull RenderContext context, @NotNull @NotNull Path2D shape) -
fixedLength
-
createLocalCursor
@NotNull public @NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor createLocalCursor(boolean isInitial, @NotNull @NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor current) - Specified by:
createLocalCursorin interfaceCursorContext
-
cleanUpLocalCursor
public void cleanUpLocalCursor(@NotNull @NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor current, @NotNull @NotNull com.github.weisj.jsvg.nodes.text.GlyphCursor local) - Specified by:
cleanUpLocalCursorin interfaceCursorContext
-
vectorEffects
- Specified by:
vectorEffectsin interfaceHasVectorEffects
-
contextDelegate
- Specified by:
contextDelegatein interfaceHasContext.ByDelegate
-
children
Description copied from interface:ContainerReturn all children of this container. Note that the return type of this function internationally contains a wild card to make it a compilation error trying to modify it. -
textAnchor
-
untransformedElementShape
@NotNull public final @NotNull Shape untransformedElementShape(@NotNull @NotNull RenderContext context, @NotNull @NotNull HasShape.Box box) - Specified by:
untransformedElementShapein interfaceHasShape
-
untransformedElementBounds
@NotNull public @NotNull Rectangle2D untransformedElementBounds(@NotNull @NotNull RenderContext context, HasShape.Box box) - Specified by:
untransformedElementBoundsin interfaceHasShape
-