Font.generated.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup GUI_Engine
  7. * @{
  8. */
  9. /// <summary>
  10. /// Font resource containing data about textual characters and how to render text. Contains one or multiple font bitmaps,
  11. /// each for a specific size.
  12. /// </summary>
  13. public partial class Font : Resource
  14. {
  15. private Font(bool __dummy0) { }
  16. protected Font() { }
  17. /// <summary>Returns font bitmap for a specific font size.</summary>
  18. /// <param name="size">Size of the bitmap in points.</param>
  19. /// <returns>Bitmap object if it exists, false otherwise.</returns>
  20. public FontBitmap GetBitmap(uint size)
  21. {
  22. return Internal_getBitmap(mCachedPtr, size);
  23. }
  24. /// <summary>Finds the available font bitmap size closest to the provided size.</summary>
  25. /// <param name="size">Size of the bitmap in points.</param>
  26. /// <returns>Nearest available bitmap size.</returns>
  27. public int GetClosestSize(uint size)
  28. {
  29. return Internal_getClosestSize(mCachedPtr, size);
  30. }
  31. [MethodImpl(MethodImplOptions.InternalCall)]
  32. private static extern FontBitmap Internal_getBitmap(IntPtr thisPtr, uint size);
  33. [MethodImpl(MethodImplOptions.InternalCall)]
  34. private static extern int Internal_getClosestSize(IntPtr thisPtr, uint size);
  35. }
  36. /** @} */
  37. }