#region --- License --- /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos * See license.txt for license info */ #endregion using System; using System.Collections.Generic; using System.Text; using System.Drawing; using OpenTK.Graphics.Text; namespace OpenTK.Graphics { /// /// Defines the interface for a TextPrinter. /// public interface ITextPrinter : IDisposable { #region Print /// /// Prints text using the specified color and layout options. /// /// The System.String to print. /// The System.Drawing.Font that will be used to print text. /// The System.Drawing.Color that will be used to print text. void Print(string text, Font font, Color color); /// /// Prints text using the specified color and layout options. /// /// The System.String to print. /// The System.Drawing.Font that will be used to print text. /// The System.Drawing.Color that will be used to print text. /// The System.Drawing.Rectangle that defines the bounds for text layout. void Print(string text, Font font, Color color, RectangleF rect); /// /// Prints text using the specified color and layout options. /// /// The System.String to print. /// The System.Drawing.Font that will be used to print text. /// The System.Drawing.Color that will be used to print text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// The OpenTK.Graphics.TextPrinterOptions that will be used to print text. void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options); /// /// Prints text using the specified color and layout options. /// /// The System.String to print. /// The System.Drawing.Font that will be used to print text. /// The System.Drawing.Color that will be used to print text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// The OpenTK.Graphics.TextPrinterOptions that will be used to print text. /// The OpenTK.Graphics.TextAlignment that will be used to print text. void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options, TextAlignment alignment); /// /// Prints text using the specified color and layout options. /// /// The System.String to print. /// The System.Drawing.Font that will be used to print text. /// The System.Drawing.Color that will be used to print text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// The OpenTK.Graphics.TextPrinterOptions that will be used to print text. /// The OpenTK.Graphics.TextAlignment that will be used to print text. /// The OpenTK.Graphics.TextDirection that will be used to print text. void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options, TextAlignment alignment, TextDirection direction); #endregion #region Measure /// /// Measures text using the specified layout options. /// /// The System.String to measure. /// The System.Drawing.Font that will be used to measure text. /// An OpenTK.Graphics.TextExtents instance that contains the results of the measurement. TextExtents Measure(string text, Font font); /// /// Measures text using the specified layout options. /// /// The System.String to measure. /// The System.Drawing.Font that will be used to measure text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// An OpenTK.Graphics.TextExtents instance that contains the results of the measurement. TextExtents Measure(string text, Font font, RectangleF rect); /// /// Measures text using the specified layout options. /// /// The System.String to measure. /// The System.Drawing.Font that will be used to measure text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// The OpenTK.Graphics.TextPrinterOptions that will be used to measure text. /// An OpenTK.Graphics.TextExtents instance that contains the results of the measurement. TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options); /// /// Measures text using the specified layout options. /// /// The System.String to measure. /// The System.Drawing.Font that will be used to measure text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// The OpenTK.Graphics.TextPrinterOptions that will be used to measure text. /// The OpenTK.Graphics.TextAlignment that will be used to measure text. /// An OpenTK.Graphics.TextExtents instance that contains the results of the measurement. TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options, TextAlignment alignment); /// /// Measures text using the specified layout options. /// /// The System.String to measure. /// The System.Drawing.Font that will be used to measure text. /// The System.Drawing.Rectangle that defines the bounds for text layout. /// The OpenTK.Graphics.TextPrinterOptions that will be used to measure text. /// The OpenTK.Graphics.TextAlignment that will be used to measure text. /// The OpenTK.Graphics.TextDirection that will be used to measure text. /// An OpenTK.Graphics.TextExtents instance that contains the results of the measurement. TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options, TextAlignment alignment, TextDirection direction); #endregion #region Begin /// /// Sets up a resolution-dependent orthographic projection. /// void Begin(); #endregion #region End /// /// Restores the projection and modelview matrices to their previous state. /// void End(); #endregion #region Obsolete [Obsolete("Use TextPrinter.Print instead")] void Draw(TextHandle handle); [Obsolete("Use TextPrinter.Print instead")] void Draw(string text, TextureFont font); [Obsolete("Use TextPrinter.Print instead")] void Prepare(string text, TextureFont font, out TextHandle handle); #endregion } }