- java.lang.Object
-
- com.github.weisj.jsvg.nodes.text.GlyphCursor
-
- com.github.weisj.jsvg.nodes.text.PathGlyphCursor
-
final class PathGlyphCursor extends GlyphCursor
-
-
Field Summary
Fields Modifier and Type Field Description private SegmentIteratorWithLookBehind.Segment
currentSegment
private float
remainingSegmentLength
private float
retainedLengthAtStart
private @NotNull SegmentIteratorWithLookBehind
segmentIterator
private float
segmentLength
private boolean
shouldRenderCurrentGlyph
-
Fields inherited from class com.github.weisj.jsvg.nodes.text.GlyphCursor
advancement, completeGlyphRunMetrics, dxOff, dyOff, glyphOffset, rotations, rotOff, transform, x, xDeltas, xLocations, xOff, y, yDeltas, yLocations, yOff
-
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
PathGlyphCursor(@NotNull GlyphCursor cursor, @NotNull java.awt.geom.PathIterator pathIterator, float startOffset)
private
PathGlyphCursor(@NotNull PathGlyphCursor pathCursor)
(package private)
PathGlyphCursor(@NotNull java.awt.geom.PathIterator pathIterator, float startOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private float
adjustForRetainedLength(float distance)
private void
advance(float distance)
(package private) @Nullable java.awt.geom.AffineTransform
advance(@NotNull MeasureContext measure, @NotNull Glyph glyph)
private void
advanceInsideSegment(float distance)
private float
advanceIntoSegment(float distance)
(package private) void
advanceSpacing(float letterSpacing)
private float
calculateSegmentRotation(float x1, float y1, float x2, float y2)
(package private) java.awt.geom.Point2D.Float
currentLocation(@NotNull MeasureContext measure)
(package private) GlyphCursor
derive()
private float
norm(float a, float b)
private float
reverseIntoSegment(float distance)
void
setAdvancement(@NotNull GlyphAdvancement advancement)
private void
setupInitialData()
(package private) boolean
shouldRenderCurrentGlyph()
private float
travelledSegmentLength()
(package private) void
updateFrom(GlyphCursor local)
-
Methods inherited from class com.github.weisj.jsvg.nodes.text.GlyphCursor
advancement, isCurrentGlyphAutoLayout, nextDeltaX, nextDeltaY
-
-
-
-
Field Detail
-
remainingSegmentLength
private float remainingSegmentLength
-
segmentLength
private float segmentLength
-
retainedLengthAtStart
private float retainedLengthAtStart
-
shouldRenderCurrentGlyph
private boolean shouldRenderCurrentGlyph
-
currentSegment
private SegmentIteratorWithLookBehind.Segment currentSegment
-
segmentIterator
@NotNull private final @NotNull SegmentIteratorWithLookBehind segmentIterator
-
-
Constructor Detail
-
PathGlyphCursor
PathGlyphCursor(@NotNull @NotNull java.awt.geom.PathIterator pathIterator, float startOffset)
-
PathGlyphCursor
PathGlyphCursor(@NotNull @NotNull GlyphCursor cursor, @NotNull @NotNull java.awt.geom.PathIterator pathIterator, float startOffset)
-
PathGlyphCursor
private PathGlyphCursor(@NotNull @NotNull PathGlyphCursor pathCursor)
-
-
Method Detail
-
setupInitialData
private void setupInitialData()
-
derive
GlyphCursor derive()
- Overrides:
derive
in classGlyphCursor
-
updateFrom
void updateFrom(GlyphCursor local)
- Overrides:
updateFrom
in classGlyphCursor
-
setAdvancement
public void setAdvancement(@NotNull @NotNull GlyphAdvancement advancement)
- Overrides:
setAdvancement
in classGlyphCursor
-
currentLocation
@NotNull java.awt.geom.Point2D.Float currentLocation(@NotNull @NotNull MeasureContext measure)
- Overrides:
currentLocation
in classGlyphCursor
-
advance
@Nullable @Nullable java.awt.geom.AffineTransform advance(@NotNull @NotNull MeasureContext measure, @NotNull @NotNull Glyph glyph)
- Overrides:
advance
in classGlyphCursor
-
advanceSpacing
void advanceSpacing(float letterSpacing)
- Overrides:
advanceSpacing
in classGlyphCursor
-
shouldRenderCurrentGlyph
boolean shouldRenderCurrentGlyph()
- Overrides:
shouldRenderCurrentGlyph
in classGlyphCursor
-
advance
private void advance(float distance)
-
travelledSegmentLength
private float travelledSegmentLength()
-
adjustForRetainedLength
private float adjustForRetainedLength(float distance)
-
advanceIntoSegment
private float advanceIntoSegment(float distance)
-
reverseIntoSegment
private float reverseIntoSegment(float distance)
-
advanceInsideSegment
private void advanceInsideSegment(float distance)
-
calculateSegmentRotation
private float calculateSegmentRotation(float x1, float y1, float x2, float y2)
-
norm
private float norm(float a, float b)
-
-