diff --git a/Source/Utilities/Graphics/ITextPrinter.cs b/Source/Utilities/Graphics/ITextPrinter.cs index d8f3ca8e..85375e6b 100644 --- a/Source/Utilities/Graphics/ITextPrinter.cs +++ b/Source/Utilities/Graphics/ITextPrinter.cs @@ -20,11 +20,15 @@ namespace OpenTK.Graphics void Begin(); void End(); void Print(string text, Font font, Color color); - void Print(string text, Font font, Color color, SizeF size); - void Print(string text, Font font, Color color, SizeF size, TextPrinterOptions options); + void Print(string text, Font font, Color color, RectangleF rect); + void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options); + void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options, TextAlignment alignment); + void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options, TextAlignment alignment, TextDirection direction); TextExtents Measure(string text, Font font); - TextExtents Measure(string text, Font font, SizeF size); - TextExtents Measure(string text, Font font, SizeF size, TextPrinterOptions options); + TextExtents Measure(string text, Font font, RectangleF rect); + TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options); + TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options, TextAlignment alignment); + TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options, TextAlignment alignment, TextDirection direction); [Obsolete("Use TextPrinter.Print instead")] void Draw(TextHandle handle); diff --git a/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs b/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs index 412ad4d4..c0686134 100644 --- a/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs +++ b/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs @@ -37,7 +37,7 @@ namespace OpenTK.Graphics.Text protected override void SetColor(Color color) { - GL.Color4(color); + GL.Color3(color); } protected override TextQuality TextQuality diff --git a/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs b/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs index ba8575d2..3942f87c 100644 --- a/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs +++ b/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs @@ -27,7 +27,7 @@ namespace OpenTK.Graphics.Text protected override void SetBlendFunction() { - GL.BlendFunc(BlendingFactorSrc.ConstantColorExt, BlendingFactorDest.OneMinusSrcColor); // For subpixel with color + GL.BlendFunc(BlendingFactorSrc.ConstantColorExt, BlendingFactorDest.OneMinusSrcColor); } protected override void SetColor(Color color) diff --git a/Source/Utilities/Graphics/Text/GdiPlusGlyphRasterizer .cs b/Source/Utilities/Graphics/Text/GdiPlusGlyphRasterizer .cs index 80f16652..d1825215 100644 --- a/Source/Utilities/Graphics/Text/GdiPlusGlyphRasterizer .cs +++ b/Source/Utilities/Graphics/Text/GdiPlusGlyphRasterizer .cs @@ -53,8 +53,12 @@ namespace OpenTK.Graphics.Text readonly ObjectPool text_extents_pool = new ObjectPool(); // Check the constructor, too, for additional flags. - static readonly StringFormat default_string_format = StringFormat.GenericTypographic; - static readonly StringFormat load_glyph_string_format = StringFormat.GenericDefault; + // Used for measuring text. Can set the leftToRight, rightToLeft, vertical and measure trailing spaces flags. + readonly StringFormat measure_string_format = new StringFormat(StringFormat.GenericDefault); + readonly StringFormat measure_string_format_tight = new StringFormat(StringFormat.GenericTypographic); + // Used for loading glyphs. Only use leftToRight! + readonly StringFormat load_glyph_string_format = new StringFormat(StringFormat.GenericDefault); + readonly StringFormat load_glyph_string_format_tight = new StringFormat(StringFormat.GenericTypographic); static readonly char[] newline_characters = new char[] { '\n', '\r' }; @@ -66,8 +70,6 @@ namespace OpenTK.Graphics.Text static GdiPlusGlyphRasterizer() { - default_string_format.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces; - using (Bitmap bmp = new Bitmap(1, 1)) using (System.Drawing.Graphics gfx = System.Drawing.Graphics.FromImage(bmp)) { @@ -75,7 +77,11 @@ namespace OpenTK.Graphics.Text } } - public GdiPlusGlyphRasterizer() { } + public GdiPlusGlyphRasterizer() + { + measure_string_format.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces | StringFormatFlags.NoClip; + measure_string_format_tight.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces; + } #endregion @@ -93,11 +99,29 @@ namespace OpenTK.Graphics.Text EnsureSurfaceSize(ref glyph_surface, ref glyph_renderer, glyph.Font); SetTextRenderingOptions(glyph_renderer, glyph.Font, quality); - glyph_renderer.Clear(Color.Transparent); - glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, PointF.Empty, - glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : default_string_format); + RectangleF r2 = new RectangleF(); - RectangleF r2 = FindEdges(glyph_surface); + glyph_renderer.Clear(Color.Transparent); + + glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, Point.Empty, //new Point(glyph_surface.Width, 0), + glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : load_glyph_string_format_tight); + + r2 = FindEdges(glyph_surface, true); + + //if ((default_string_format.FormatFlags & StringFormatFlags.DirectionRightToLeft) != 0) + //{ + // glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, Point.Empty, //new Point(glyph_surface.Width, 0), + // load_glyph_string_format);//glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : default_string_format); + + // r2 = FindEdges(glyph_surface, true); + //} + //else + //{ + // glyph_renderer.DrawString(glyph.Character.ToString(), glyph.Font, Brushes.White, Point.Empty, + // load_glyph_string_format_tight); //glyph.Font.Style == FontStyle.Italic ? load_glyph_string_format : default_string_format); + + // r2 = FindEdges(glyph_surface, false); + //} return glyph_surface.Clone(r2, System.Drawing.Imaging.PixelFormat.Format32bppArgb); } @@ -129,6 +153,8 @@ namespace OpenTK.Graphics.Text #endregion + #region Clear + public void Clear() { block_cache.Clear(); @@ -136,6 +162,8 @@ namespace OpenTK.Graphics.Text #endregion + #endregion + #region Private Members #region EnsureSurfaceSize @@ -194,15 +222,32 @@ namespace OpenTK.Graphics.Text TextExtents MeasureTextExtents(TextBlock block, TextQuality quality) { // Todo: Parse layout options: - //StringFormat format = default_string_format; - StringFormat format = default_string_format; + StringFormat format = block.Font.Italic ? measure_string_format : measure_string_format_tight; + //StringFormat format = measure_string_format_tight; + + if (block.Direction == TextDirection.Vertical) + format.FormatFlags |= StringFormatFlags.DirectionVertical; + else + format.FormatFlags &= ~StringFormatFlags.DirectionVertical; + + if (block.Direction == TextDirection.RightToLeft) + format.FormatFlags |= StringFormatFlags.DirectionRightToLeft; + else + format.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft; + + if (block.Alignment == TextAlignment.Near) + format.Alignment = StringAlignment.Near; + else if (block.Alignment == TextAlignment.Center) + format.Alignment = StringAlignment.Center; + else + format.Alignment = StringAlignment.Far; TextExtents extents = text_extents_pool.Acquire(); - RectangleF rect = new RectangleF(PointF.Empty, block.Bounds); + RectangleF rect = block.Bounds; // Work around Mono/GDI+ bug, which causes incorrect // text wraping when block.Bounds == SizeF.Empty. - if (block.Bounds == SizeF.Empty) + if (block.Bounds.Size == SizeF.Empty) rect.Size = MaximumGraphicsClipSize; SetTextRenderingOptions(graphics, block.Font, quality); @@ -211,7 +256,7 @@ namespace OpenTK.Graphics.Text IntPtr native_font = GdiPlus.GetNativeFont(block.Font); IntPtr native_string_format = GdiPlus.GetNativeStringFormat(format); - int height = 0; + float max_width = 0, max_height = 0; // It seems that the mere presence of \n and \r characters // is enough for Mono to botch the layout (even if these @@ -224,14 +269,26 @@ namespace OpenTK.Graphics.Text string[] lines = block.Text.Replace("\r", String.Empty).Split('\n'); foreach (string s in lines) { + float width, height; + extents.AddRange(MeasureGlyphExtents( - s, height, rect, - native_graphics, native_font, native_string_format)); - height += block.Font.Height; + ref block, s, + native_graphics, native_font, native_string_format, + ref rect, out width, out height)); + + if ((block.Direction & TextDirection.Vertical) == 0) + rect.Y += block.Font.Height; + else + rect.X += block.Font.Height; + + if (width > max_width) + max_width = width; + if (height > max_height) + max_height = height; } } - extents.BoundingBox = new RectangleF(extents[0].X, extents[0].Y, extents[extents.Count - 1].Right, extents[extents.Count - 1].Bottom); + extents.BoundingBox = new RectangleF(extents[0].X, extents[0].Y, max_width, max_height); return extents; } @@ -241,56 +298,87 @@ namespace OpenTK.Graphics.Text #region MeasureGlyphExtents // Gets the bounds of each character in a line of text. - // The line is processed in blocks of 32 characters (GdiPlus.MaxMeasurableCharacterRanges). - IEnumerable MeasureGlyphExtents(string text, int height, - RectangleF layoutRect, IntPtr native_graphics, IntPtr native_font, IntPtr native_string_format) + // Each line is processed in blocks of 32 characters (GdiPlus.MaxMeasurableCharacterRanges). + IEnumerable MeasureGlyphExtents( + ref TextBlock block, string text, + IntPtr native_graphics, IntPtr native_font, IntPtr native_string_format, + ref RectangleF layoutRect, out float max_width, out float max_height) { measured_glyphs.Clear(); + max_width = layoutRect.Left; + max_height = layoutRect.Top; + float last_line_width = 0, last_line_height = 0; - RectangleF rect = new RectangleF(); int current = 0; while (current < text.Length) - { - int num_characters = (text.Length - current) > GdiPlus.MaxMeasurableCharacterRanges ? - GdiPlus.MaxMeasurableCharacterRanges : - text.Length - current; - int status = 0; + { + int num_characters = (text.Length - current) > GdiPlus.MaxMeasurableCharacterRanges ? + GdiPlus.MaxMeasurableCharacterRanges : + text.Length - current; + int status = 0; - for (int i = 0; i < num_characters; i++) - { - if (text[current + i] == '\n' || text[current + i] == '\r') - throw new Exception(); + // Prepare the character ranges and region structs for the measurement. + for (int i = 0; i < num_characters; i++) + { + if (text[current + i] == '\n' || text[current + i] == '\r') + throw new NotSupportedException(); - characterRanges[i] = new CharacterRange(current + i, 1); + characterRanges[i] = new CharacterRange(current + i, 1); - IntPtr region; - status = GdiPlus.CreateRegion(out region); - regions[i] = region; - Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); - } + IntPtr region; + status = GdiPlus.CreateRegion(out region); + regions[i] = region; + Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); + } - status = GdiPlus.SetStringFormatMeasurableCharacterRanges(native_string_format, num_characters, characterRanges); - Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); + status = GdiPlus.SetStringFormatMeasurableCharacterRanges(native_string_format, num_characters, characterRanges); + Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); - status = GdiPlus.MeasureCharacterRanges(native_graphics, text, text.Length, - native_font, ref layoutRect, native_string_format, num_characters, regions); - Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); + status = GdiPlus.MeasureCharacterRanges(native_graphics, text, text.Length, + native_font, ref layoutRect, native_string_format, num_characters, regions); + Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); - for (int i = 0; i < num_characters; i++) - { - GdiPlus.GetRegionBounds(regions[i], native_graphics, ref rect); - Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); - GdiPlus.DeleteRegion(regions[i]); - Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); + // Read back the results of the measurement. + for (int i = 0; i < num_characters; i++) + { + RectangleF rect = new RectangleF(); - rect.Y += height; - - //yield return rect; - measured_glyphs.Add(rect); - } + GdiPlus.GetRegionBounds(regions[i], native_graphics, ref rect); + Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); + GdiPlus.DeleteRegion(regions[i]); + Debug.Assert(status == 0, String.Format("GDI+ error: {0}", status)); - current += num_characters; - } + if (rect.Bottom > max_height) + max_height = rect.Bottom; + if (rect.Right > max_width) + max_width = rect.Right; + + if (rect.X > last_line_width) + last_line_width = rect.X; + if (rect.Y > last_line_height) + last_line_height = rect.Y; + + measured_glyphs.Add(rect); + } + + current += num_characters; + } + + // Make sure the current height is updated, if the the current line has wrapped due to word-wraping. + // Otherwise, the next line will overlap with the current one. + if (measured_glyphs.Count > 1) + { + if ((block.Direction & TextDirection.Vertical) == 0) + { + if (layoutRect.Y < last_line_height) + layoutRect.Y = last_line_height; + } + else + { + if (layoutRect.X < last_line_width) + layoutRect.X = last_line_width; + } + } return measured_glyphs; } @@ -305,18 +393,22 @@ namespace OpenTK.Graphics.Text #pragma warning restore 0649 - Rectangle FindEdges(Bitmap bmp) + // Note: The bool parameter is not used at this point. + // We might need it if we ever load true rightToLeft glyphs. + Rectangle FindEdges(Bitmap bmp, bool rightToLeft) { BitmapData data = bmp.LockBits( new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); - - Rectangle rect = Rectangle.FromLTRB( - FindLeftEdge(bmp, data.Scan0), - FindTopEdge(bmp, data.Scan0), - FindRightEdge(bmp, data.Scan0), - FindBottomEdge(bmp, data.Scan0)); + + //Rectangle rect = rightToLeft ? + // Rectangle.FromLTRB(FindLeftEdge(bmp, data.Scan0), 0, bmp.Width - 1, FindBottomEdge(bmp, data.Scan0)) : + // Rectangle.FromLTRB(0, 0, FindRightEdge(bmp, data.Scan0), FindBottomEdge(bmp, data.Scan0)); + + Rectangle rect = + Rectangle.FromLTRB(0, 0, FindRightEdge(bmp, data.Scan0), FindBottomEdge(bmp, data.Scan0)); + //Rectangle.FromLTRB(FindLeftEdge(bmp, data.Scan0), 0, FindRightEdge(bmp, data.Scan0), FindBottomEdge(bmp, data.Scan0)); bmp.UnlockBits(data); @@ -331,8 +423,15 @@ namespace OpenTK.Graphics.Text int FindLeftEdge(Bitmap bmp, IntPtr ptr) { - // Don't trim the left edge, because the layout engine expects it to be 0. - return 0; + for (int x = 0; x < bmp.Width; x++) + for (int y = 0; y < bmp.Height; y++) + unsafe + { + if (((Pixel*)(ptr) + y * bmp.Width + x)->A != 0) + return x; + } + + return bmp.Width - 1; } int FindRightEdge(Bitmap bmp, IntPtr ptr) @@ -350,8 +449,15 @@ namespace OpenTK.Graphics.Text int FindTopEdge(Bitmap bmp, IntPtr ptr) { - // Don't trim the top edge, because the layout engine expects it to be 0. - return 0; + for (int y = 0; y < bmp.Height; y++) + for (int x = 0; x < bmp.Width; x++) + unsafe + { + if (((Pixel*)(ptr) + y * bmp.Width + x)->A != 0) + return y; + } + + return bmp.Height - 1; } int FindBottomEdge(Bitmap bmp, IntPtr ptr) diff --git a/Source/Utilities/Graphics/Text/TextBlock.cs b/Source/Utilities/Graphics/Text/TextBlock.cs index 579acd11..006d3b9d 100644 --- a/Source/Utilities/Graphics/Text/TextBlock.cs +++ b/Source/Utilities/Graphics/Text/TextBlock.cs @@ -41,22 +41,28 @@ namespace OpenTK.Graphics.Text public readonly Font Font; - public readonly SizeF Bounds; + public readonly RectangleF Bounds; public readonly TextPrinterOptions Options; - public int UsageCount; // Used to identify old and unused blocks of text. + public readonly TextAlignment Alignment; + + public readonly TextDirection Direction; + + public readonly int UsageCount; #endregion #region Constructors - public TextBlock(string text, Font font, TextPrinterOptions options, SizeF bounds) + public TextBlock(string text, Font font, RectangleF bounds, TextPrinterOptions options, TextAlignment alignment, TextDirection direction) { Text = text; Font = font; Bounds = bounds; Options = options; + Alignment = alignment; + Direction = direction; UsageCount = 0; } diff --git a/Source/Utilities/Graphics/TextAlignment.cs b/Source/Utilities/Graphics/TextAlignment.cs new file mode 100644 index 00000000..4d88cf3d --- /dev/null +++ b/Source/Utilities/Graphics/TextAlignment.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenTK.Graphics +{ + /// + /// Defines available alignments for text. + /// + public enum TextAlignment + { + /// The text is aligned to the near side (left for left-to-right text and right for right-to-left text). + Near = 0, + /// The text is aligned to the center. + Center, + /// The text is aligned to the far side (right for left-to-right text and left for right-to-left text). + Far + } +} diff --git a/Source/Utilities/Graphics/TextDirection.cs b/Source/Utilities/Graphics/TextDirection.cs new file mode 100644 index 00000000..151ca784 --- /dev/null +++ b/Source/Utilities/Graphics/TextDirection.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenTK.Graphics +{ + /// + /// Defines available directions for text layout. + /// + public enum TextDirection + { + /// The text is layed out from left to right. + LeftToRight, + /// The text is layed out from right to left. + RightToLeft, + /// The text is layed out vertically. + Vertical + } +} diff --git a/Source/Utilities/Graphics/TextPrinter.cs b/Source/Utilities/Graphics/TextPrinter.cs index 156d954b..6f46c6db 100644 --- a/Source/Utilities/Graphics/TextPrinter.cs +++ b/Source/Utilities/Graphics/TextPrinter.cs @@ -64,23 +64,33 @@ namespace OpenTK.Graphics public void Print(string text, Font font, Color color) { - Print(text, font, color, SizeF.Empty, TextPrinterOptions.Default); + Print(text, font, color, RectangleF.Empty, TextPrinterOptions.Default, TextAlignment.Near, TextDirection.LeftToRight); } - public void Print(string text, Font font, Color color, SizeF size) + public void Print(string text, Font font, Color color, RectangleF rect) { - Print(text, font, color, size, TextPrinterOptions.Default); + Print(text, font, color, rect, TextPrinterOptions.Default, TextAlignment.Near, TextDirection.LeftToRight); } - public void Print(string text, Font font, Color color, SizeF size, TextPrinterOptions options) + public void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options) + { + Print(text, font, color, rect, options, TextAlignment.Near, TextDirection.LeftToRight); + } + + public void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options, TextAlignment alignment) + { + Print(text, font, color, rect, options, alignment, TextDirection.LeftToRight); + } + + public void Print(string text, Font font, Color color, RectangleF rect, TextPrinterOptions options, TextAlignment alignment, TextDirection direction) { if (disposed) throw new ObjectDisposedException(this.GetType().ToString()); - if (!ValidateParameters(text, font, size)) + if (!ValidateParameters(text, font, rect)) return; - TextOutput.Print(new TextBlock(text, font, options, size), color, Rasterizer); + TextOutput.Print(new TextBlock(text, font, rect, options, alignment, direction), color, Rasterizer); } #endregion @@ -89,23 +99,34 @@ namespace OpenTK.Graphics public TextExtents Measure(string text, Font font) { - return Measure(text, font, SizeF.Empty, TextPrinterOptions.Default); + return Measure(text, font, RectangleF.Empty, TextPrinterOptions.Default, TextAlignment.Near, TextDirection.LeftToRight); } - public TextExtents Measure(string text, Font font, SizeF size) + public TextExtents Measure(string text, Font font, RectangleF rect) { - return Measure(text, font, size, TextPrinterOptions.Default); + return Measure(text, font, rect, TextPrinterOptions.Default, TextAlignment.Near, TextDirection.LeftToRight); } - public TextExtents Measure(string text, Font font, SizeF size, TextPrinterOptions options) + public TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options) + { + return Measure(text, font, rect, options, TextAlignment.Near, TextDirection.LeftToRight); + } + + + public TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options, TextAlignment alignment) + { + return Measure(text, font, rect, options, alignment, TextDirection.LeftToRight); + } + + public TextExtents Measure(string text, Font font, RectangleF rect, TextPrinterOptions options, TextAlignment alignment, TextDirection direction) { if (disposed) throw new ObjectDisposedException(this.GetType().ToString()); - if (!ValidateParameters(text, font, size)) + if (!ValidateParameters(text, font, rect)) return TextExtents.Empty; - return Rasterizer.MeasureText(new TextBlock(text, font, options, size)); + return Rasterizer.MeasureText(new TextBlock(text, font, rect, options, alignment, direction)); } #endregion @@ -223,13 +244,13 @@ namespace OpenTK.Graphics #region Static Members - static bool ValidateParameters(string text, Font font, SizeF size) + static bool ValidateParameters(string text, Font font, RectangleF rect) { if (String.IsNullOrEmpty(text)) return false; if (font == null) throw new ArgumentNullException("font"); - if (size.Width < 0 || size.Height < 0) + if (rect.Width < 0 || rect.Height < 0) throw new ArgumentOutOfRangeException("size"); return true; diff --git a/Source/Utilities/Graphics/TextPrinterOptions.cs b/Source/Utilities/Graphics/TextPrinterOptions.cs index 15bd1739..e8e530dd 100644 --- a/Source/Utilities/Graphics/TextPrinterOptions.cs +++ b/Source/Utilities/Graphics/TextPrinterOptions.cs @@ -4,12 +4,15 @@ using System.Text; namespace OpenTK.Graphics { + /// + /// Defines available options for the TextPrinter. + /// [Flags] public enum TextPrinterOptions { - Default = 0, - NoCache = 1, - RightToLeft = 2, - Vertical = 4, + /// The TextPrinter will use default printing options. + Default = 0x0000, + /// The TextPrinter will not cache text blocks as they are measured or printed. + NoCache = 0x0001, } } diff --git a/Source/Utilities/Graphics/Text/TextQuality.cs b/Source/Utilities/Graphics/TextQuality.cs similarity index 79% rename from Source/Utilities/Graphics/Text/TextQuality.cs rename to Source/Utilities/Graphics/TextQuality.cs index 7ed091f5..3a659fcb 100644 --- a/Source/Utilities/Graphics/Text/TextQuality.cs +++ b/Source/Utilities/Graphics/TextQuality.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace OpenTK.Graphics.Text +namespace OpenTK.Graphics { public enum TextQuality {