// ----------------------------------------------------------------------- // // Copyright 2013 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex.Media { using Perspex.Platform; using Splat; public class FormattedText { public string FontFamilyName { get; set; } public double FontSize { get; set; } public string Text { get; set; } public double[] GetLineHeights(Size constraint) { IPlatformRenderInterface factory = Locator.Current.GetService(); return factory.TextService.GetLineHeights(this, constraint); } public Size Measure(Size constraint) { IPlatformRenderInterface factory = Locator.Current.GetService(); return factory.TextService.Measure(this, constraint); } } }