collectStyle method

NotusStyle collectStyle(
  1. int index,
  2. int length
)

Returns style of specified text range.

Only attributes applied to all characters within this range are included in the result. Inline and block level attributes are handled separately, e.g.:

  • block attribute X is included in the result only if it exists for every line within this range (partially included lines are counted).
  • inline attribute X is included in the result only if it exists for every character within this range (line-break characters excluded).

Implementation

NotusStyle collectStyle(int index, int length) {
  var result = lookupLine(index);
  LineNode line = result.node as LineNode;
  return line.collectStyle(result.offset, length);
}