sdf.h 668 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <_cheader.h>
  3. #include <stdint.h>
  4. #include <toaru/graphics.h>
  5. _Begin_C_Header
  6. enum sdf_font {
  7. SDF_FONT_THIN,
  8. SDF_FONT_BOLD,
  9. SDF_FONT_MONO,
  10. SDF_FONT_MONO_BOLD,
  11. SDF_FONT_MONO_OBLIQUE,
  12. SDF_FONT_MONO_BOLD_OBLIQUE,
  13. SDF_FONT_OBLIQUE,
  14. SDF_FONT_BOLD_OBLIQUE,
  15. };
  16. extern int draw_sdf_string(gfx_context_t * ctx, int32_t x, int32_t y, const char * str, int size, uint32_t color, int font);
  17. extern int draw_sdf_string_width(const char * str, int size, int font);
  18. extern int draw_sdf_string_gamma(gfx_context_t * ctx, int32_t x, int32_t y, const char * str, int size, uint32_t color, int font, double _gamma);
  19. _End_C_Header