# Interface SyTextLineMeasuredType

public interface SyTextLineMeasuredType

A line of text that has been analyzed/measured.

Note that this line of text may have been produced as part of a text formatting operation, and therefore there is an 1:N relationship between the text given by `textOriginal()` and `textAsWrapped()`. All of the methods here work in terms of `textAsWrapped()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `height()`
  `SyTextLocationType`
  `inspectAt(SyTextLineNumber lineNumber, com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceTextAlignedType> position)`
  Inspect the text at the given position.
  `default SyTextLocationType`
  `inspectAtParentRelative(SyTextLineNumber lineNumber, com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceParentRelativeType> position)`
  Inspect the character at the given parent relative location.
  `int`
  `pageWidth()`
  `SyText`
  `textAsWrapped()`
  `SyTextID`
  `textOriginal()`
  `int`
  `textWidth()`
  `com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceTextAlignedType>`
  `transformToTextCoordinates(com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceParentRelativeType> position)`
  Transform the given parent-relative coordinates to text-space coordinates.

- ## Method Details

  - ### pageWidth

    int pageWidth()
    Returns:
      The width of the page within this line resides

  - ### height

    int height()
    Returns:
      The height required to contain this text

  - ### textWidth

    int textWidth()
    Returns:
      The smallest width that can contain the given text.

  - ### textOriginal

    SyTextID textOriginal()
    Returns:
      The original text that produced this line

  - ### textAsWrapped

    SyText textAsWrapped()
    Returns:
      The actual text after analysis/wrapping

  - ### inspectAt

    SyTextLocationType inspectAt(SyTextLineNumber lineNumber, com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceTextAlignedType> position)
    Inspect the text at the given position. The information returned includes details such as the index of the character within the string at the given location, information for rendering a caret, etc. The location will be reported to be at line `lineNumber`.
    Parameters:
      `lineNumber` - The line number
      `position` - The position
    Returns:
      Information about text at the given position

  - ### transformToTextCoordinates

    com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceTextAlignedType> transformToTextCoordinates(com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceParentRelativeType> position)
    Transform the given parent-relative coordinates to text-space coordinates.
    Parameters:
      `position` - The parent-relative position
    Returns:
      The equivalent text-space position

  - ### inspectAtParentRelative

    default SyTextLocationType inspectAtParentRelative(SyTextLineNumber lineNumber, com.io7m.jtensors.core.parameterized.vectors.PVector2I<SySpaceParentRelativeType> position)
    Inspect the character at the given parent relative location. The location will be reported to be at line `lineNumber`.
    Parameters:
      `lineNumber` - The line number
      `position` - The parent-relative position
    Returns:
      The character at the given location