ITextSource.cs 568 B

123456789101112131415161718
  1. using Avalonia.Metadata;
  2. namespace Avalonia.Media.TextFormatting
  3. {
  4. /// <summary>
  5. /// Produces <see cref="TextRun"/> objects that are used by the <see cref="TextFormatter"/>.
  6. /// </summary>
  7. [NotClientImplementable]
  8. public interface ITextSource
  9. {
  10. /// <summary>
  11. /// Gets a <see cref="TextRun"/> for specified text source index.
  12. /// </summary>
  13. /// <param name="textSourceIndex">The text source index.</param>
  14. /// <returns>The text run.</returns>
  15. TextRun? GetTextRun(int textSourceIndex);
  16. }
  17. }