FontConfigWrapper.cpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #include "imguiWrappedHeader.h"
  2. #include "FontConfigWrapper.h"
  3. IggFontConfig iggNewFontConfig()
  4. {
  5. ImFontConfig *fontConfig = new ImFontConfig();
  6. return static_cast<IggFontConfig>(fontConfig);
  7. }
  8. void iggFontConfigDelete(IggFontConfig handle)
  9. {
  10. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  11. delete fontConfig;
  12. }
  13. void iggFontConfigSetSize(IggFontConfig handle, float sizePixels)
  14. {
  15. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  16. fontConfig->SizePixels = sizePixels;
  17. }
  18. void iggFontConfigSetOversampleH(IggFontConfig handle, int value)
  19. {
  20. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  21. fontConfig->OversampleH = value;
  22. }
  23. void iggFontConfigSetOversampleV(IggFontConfig handle, int value)
  24. {
  25. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  26. fontConfig->OversampleV = value;
  27. }
  28. void iggFontConfigSetPixelSnapH(IggFontConfig handle, IggBool value)
  29. {
  30. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  31. fontConfig->PixelSnapH = value;
  32. }
  33. void iggFontConfigSetGlyphMinAdvanceX(IggFontConfig handle, float value)
  34. {
  35. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  36. fontConfig->GlyphMinAdvanceX = value;
  37. }
  38. void iggFontConfigSetGlyphMaxAdvanceX(IggFontConfig handle, float value)
  39. {
  40. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  41. fontConfig->GlyphMaxAdvanceX = value;
  42. }
  43. void iggFontConfigSetMergeMode(IggFontConfig handle, IggBool value)
  44. {
  45. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  46. fontConfig->MergeMode = value;
  47. }
  48. int iggFontConfigGetFontDataOwnedByAtlas(IggFontConfig handle)
  49. {
  50. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  51. return fontConfig->FontDataOwnedByAtlas;
  52. }
  53. void iggFontConfigSetRasterizerMultiply(IggFontConfig handle, float value)
  54. {
  55. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  56. fontConfig->RasterizerMultiply = value;
  57. }
  58. unsigned int iggFontConfigGetFontBuilderFlags(IggFontConfig handle)
  59. {
  60. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  61. return fontConfig->FontBuilderFlags;
  62. }
  63. void iggFontConfigSetFontBuilderFlags(IggFontConfig handle, unsigned int flags)
  64. {
  65. ImFontConfig *fontConfig = reinterpret_cast<ImFontConfig *>(handle);
  66. fontConfig->FontBuilderFlags = flags;
  67. }