2007-11-10 23:29:25 +00:00
|
|
|
|
#region --- License ---
|
|
|
|
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
|
|
|
* See license.txt for license info
|
|
|
|
|
*/
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
using System;
|
2007-11-06 20:59:15 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
using OpenTK.Math;
|
|
|
|
|
|
2008-03-08 14:38:10 +00:00
|
|
|
|
namespace OpenTK.Graphics
|
2007-11-06 20:59:15 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the interface for TextPrinter implementations.
|
|
|
|
|
/// </summary>
|
2008-05-24 07:47:30 +00:00
|
|
|
|
public interface ITextPrinterImplementation
|
2007-11-06 20:59:15 +00:00
|
|
|
|
{
|
2008-05-24 07:47:30 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Caches a text fragment for future use.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="vertices">The vertex array for the text fragment.</param>
|
|
|
|
|
/// <param name="indices">The index array for the text fragment. Please use the indexCount parameter
|
|
|
|
|
/// instead of indices.Count, as the indices array may be larger than necessary for performance reasons.</param>
|
|
|
|
|
/// <param name="indexCount">The actual number of indices in the text fragment.</param>
|
|
|
|
|
/// <returns>A TextHandle that can be used to draw the text fragment.</returns>
|
|
|
|
|
TextHandle Load(Vector2[] vertices, ushort[] indices, int indexCount);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Draws the specified cached text fragment.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="handle">The TextHandle corresponding to the desired text fragment.</param>
|
2007-11-06 20:59:15 +00:00
|
|
|
|
void Draw(TextHandle handle);
|
2008-05-24 07:47:30 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Draws a text fragment, without caching.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="vertices">The vertex array for the text fragment.</param>
|
|
|
|
|
/// <param name="indices">The index array for the text fragment. Please use the indexCount parameter
|
|
|
|
|
/// instead of indices.Count, as the indices array may be larger than necessary for performance reasons.</param>
|
|
|
|
|
/// <param name="indexCount">The actual number of indices in the text fragment.</param>
|
|
|
|
|
void Draw(Vector2[] vertices, ushort[] indices, int indexCount);
|
2007-11-06 20:59:15 +00:00
|
|
|
|
}
|
|
|
|
|
}
|