Font.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /// <summary>
  7. /// Marks a range of characters in a font.
  8. /// </summary>
  9. [StructLayout(LayoutKind.Sequential)]
  10. public struct CharRange
  11. {
  12. public UInt32 start;
  13. public UInt32 end;
  14. }
  15. /// <summary>
  16. /// Font resource containing data about textual characters and how to render text.
  17. /// </summary>
  18. public sealed class Font : Resource // TODO - Dummy class
  19. {
  20. /// <summary>
  21. /// Creates a new font resource. For runtime use only.
  22. /// </summary>
  23. /// <param name="constructNative">Should the constructor also create the native interop object.</param>
  24. internal Font(bool constructNative)
  25. {
  26. if (constructNative)
  27. Internal_CreateInstance(this);
  28. }
  29. [MethodImpl(MethodImplOptions.InternalCall)]
  30. private static extern void Internal_CreateInstance(Font instance);
  31. }
  32. }