The OpenD Programming Language

textBreakLines

Breaks the specified text into lines. White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered. Words longer than the max width are slit at nearest character (i.e. no hyphenation). Returns number of rows.

  1. NVGTextRow!T[] textBreakLines(NVGContext ctx, const(T)[] str, float breakRowWidth, NVGTextRow!T[] rows)
  2. int textBreakLines(NVGContext ctx, const(T)[] str, float breakRowWidth, DG dg)
    int
    textBreakLines
    (
    T
    DG
    )
    (,
    const(T)[] str
    ,,
    scope DG dg
    )
    if (
    isAnyCharType!T &&
    isGoodRowDelegate!(T, DG)
    )

See Also

Meta