Now use the new MeasureText function.

This commit is contained in:
the_fiddler 2008-06-24 18:29:02 +00:00
parent c0803a2e03
commit a52666d9e6

View file

@ -37,6 +37,8 @@ namespace OpenTK.Graphics
// Interleaved, vertex, texcoord, vertex, etc... Starts with 8 chars, will expand as needed.
Vector2[] vertices = new Vector2[8 * 8];
ushort[] indices = new ushort[6 * 8];
IList<RectangleF> ranges = new List<RectangleF>();
#region --- Constructors ---
@ -206,8 +208,7 @@ namespace OpenTK.Graphics
if (alignment == StringAlignment.Near && !rightToLeft || alignment == StringAlignment.Far && rightToLeft)
{
ICollection<RectangleF> ranges = new List<RectangleF>();
font.MeasureCharacterRanges(text, ref ranges);
font.MeasureText(text, SizeF.Empty, null, ranges);
int current = 0;
//foreach (char c in text)