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

  • Field Details

    • TAG

      public static final String TAG
      See Also:
    • children

      protected final List<com.github.weisj.jsvg.nodes.text.TextSegment> children
    • isVisible

      protected boolean isVisible
    • fontSpec

      protected AttributeFontSpec fontSpec
    • lengthAdjust

      protected LengthAdjust lengthAdjust
    • textLength

      protected Length textLength
  • Constructor Details

    • TextPath

      public TextPath()
  • Method Details

    • tagName

      @NotNull public @NotNull String tagName()
      Specified by:
      tagName in interface SVGNode
    • build

      public void build(@NotNull @NotNull AttributeNode attributeNode)
      Specified by:
      build in interface SVGNode
    • doAdd

      protected void doAdd(@NotNull @NotNull SVGNode node)
      Specified by:
      doAdd in class BaseContainerNode<com.github.weisj.jsvg.nodes.text.TextSegment>
    • addContent

      public void addContent(@NotNull TextContent.Segment content)
      Specified by:
      addContent in interface SVGNode
    • acceptChild

      protected boolean acceptChild(@Nullable @Nullable String id, @NotNull @NotNull SVGNode node)
      Description copied from class: BaseContainerNode
      Determine whether the container accepts this SVGNode as a child. By default, this will always report true but subclasses may choose to reject certain types of nodes.
      Overrides:
      acceptChild in class BaseContainerNode<com.github.weisj.jsvg.nodes.text.TextSegment>
      Parameters:
      id - the id of the node
      node - the node itself
      Returns:
      whether the node can be inserted as a child.
    • geometryContextDelegate

      @NotNull public @NotNull HasGeometryContext geometryContextDelegate()
      Specified by:
      geometryContextDelegate in interface HasGeometryContext.ByDelegate
    • isVisible

      public boolean isVisible(@NotNull @NotNull RenderContext context)
    • segments

      @NotNull public @NotNull List<? extends com.github.weisj.jsvg.nodes.text.TextSegment> 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

      @Nullable public @Nullable Length 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:
      createLocalCursor in interface CursorContext
    • 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:
      cleanUpLocalCursor in interface CursorContext
    • vectorEffects

      @NotNull public @NotNull Set<VectorEffect> vectorEffects()
      Specified by:
      vectorEffects in interface HasVectorEffects
    • contextDelegate

      @NotNull public @NotNull HasContext contextDelegate()
      Specified by:
      contextDelegate in interface HasContext.ByDelegate
    • children

      public List<? extends com.github.weisj.jsvg.nodes.text.TextSegment> children()
      Description copied from interface: Container
      Return 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.
      Specified by:
      children in interface Container<T>
      Returns:
      the list of children.
    • textAnchor

      public final TextAnchor textAnchor(@NotNull @NotNull RenderContext context)
    • untransformedElementShape

      @NotNull public final @NotNull Shape untransformedElementShape(@NotNull @NotNull RenderContext context, @NotNull @NotNull HasShape.Box box)
      Specified by:
      untransformedElementShape in interface HasShape
    • untransformedElementBounds

      @NotNull public @NotNull Rectangle2D untransformedElementBounds(@NotNull @NotNull RenderContext context, HasShape.Box box)
      Specified by:
      untransformedElementBounds in interface HasShape