DrawableTextRun.cs 670 B

12345678910111213141516171819202122
  1. using Avalonia.Platform;
  2. namespace Avalonia.Media.TextFormatting
  3. {
  4. /// <summary>
  5. /// A text run that supports drawing content.
  6. /// </summary>
  7. public abstract class DrawableTextRun : TextRun
  8. {
  9. /// <summary>
  10. /// Gets the bounds.
  11. /// </summary>
  12. public abstract Rect Bounds { get; }
  13. /// <summary>
  14. /// Draws the <see cref="DrawableTextRun"/> at the given origin.
  15. /// </summary>
  16. /// <param name="drawingContext">The drawing context.</param>
  17. /// <param name="origin">The origin.</param>
  18. public abstract void Draw(IDrawingContextImpl drawingContext, Point origin);
  19. }
  20. }