// -----------------------------------------------------------------------
//
// Copyright 2015 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Platform
{
using System;
using System.Collections.Generic;
using Perspex.Media;
///
/// Defines the platform-specific interface for .
///
public interface IFormattedTextImpl : IDisposable
{
///
/// Gets or sets the constraint of the text.
///
Size Constraint { get; set; }
///
/// Gets the lines in the text.
///
///
/// A collection of objects.
///
IEnumerable GetLines();
///
/// Hit tests a point in the text.
///
/// The point.
///
/// A describing the result of the hit test.
///
TextHitTestResult HitTestPoint(Point point);
///
/// Gets the bounds rectangle that the specified character occupies.
///
/// The index of the character.
/// The character bounds.
Rect HitTestTextPosition(int index);
///
/// Gets the bounds rectangles that the specified text range occupies.
///
/// The index of the first character.
/// The number of characters in the text range.
/// The character bounds.
IEnumerable HitTestTextRange(int index, int length);
///
/// Gets the size of the text, taking into account.
///
/// The bounds box of the text.
Size Measure();
///
/// Sets the foreground brush for the specified text range.
///
/// The brush.
/// The start of the text range.
/// The length of the text range.
void SetForegroundBrush(Brush brush, int startIndex, int length);
}
}