Class Word

All Implemented Interfaces:
TextAssemblyBuffer

public class Word extends ParsedTextImpl
  • Field Details

    • shouldNotSplit

      private final boolean shouldNotSplit
      Is this an indivisible fragment, because it contained a space or was split from a space- containing string. Non-splittable words can be merged (into new non-splittable words).
    • breakBefore

      private final boolean breakBefore
      If this word or fragment was preceded by a space, or a line break, it should never be merged into a preceding word.
  • Constructor Details

    • Word

      Word(String text, float ascent, float descent, Vector startPoint, Vector endPoint, Vector baseline, float spaceWidth, boolean isCompleteWord, boolean breakBefore)
      Parameters:
      text - text content
      ascent - font ascent (e.g. height)
      descent - How far below the baseline letters go
      startPoint - first point of the text
      endPoint - ending offset of text
      baseline - line along which text is set.
      spaceWidth - how much space is a space supposed to take.
      isCompleteWord - word should never be split
      breakBefore - word starts here, should never combine to the left.
  • Method Details