added 'videolib' snapshot
[k8-jellyphysics.git] / src / videolib / videolib_bgichr.h
blobe4a732197d5150758b8c3c59d2a5472aca284f83
1 /* coded by Ketmar // Vampire Avalon (psyc://ketmar.no-ip.org/~Ketmar)
2 * Understanding is not required. Only obedience.
4 * This program is free software. It comes without any warranty, to
5 * the extent permitted by applicable law. You can redistribute it
6 * and/or modify it under the terms of the Do What The Fuck You Want
7 * To Public License, Version 2, as published by Sam Hocevar. See
8 * http://sam.zoy.org/wtfpl/COPYING for more details.
9 */
10 #ifdef VIDEOLIB_ENABLE_BGICHR
13 typedef struct bgichr_s *bgichr_t;
16 /* reader: returns # of bytes read, 0 on EOF or -1 on error/EOF */
17 typedef int (*bgichr_reader_fn_t) (void *buf, int buf_len, void *udata);
19 extern bgichr_t bgichr_load (bgichr_reader_fn_t reader, void *udata);
20 extern void bgichr_free (bgichr_t bc);
22 extern bgichr_t bgichr_load_file (const char *filename);
24 extern int bgichr_height (bgichr_t bc);
26 extern int bgichr_ascent (bgichr_t bc);
27 extern int bgichr_descent (bgichr_t bc);
28 extern int bgichr_baseline (bgichr_t bc);
30 extern int bgichr_char_width (bgichr_t bc, char ch, double scale);
31 extern int bgichr_draw_char (bgichr_t bc, int x, int y, char ch, Uint32 clr, double scale);
32 extern int bgichr_draw_str (bgichr_t bc, int x, int y, const char *str, Uint32 clr, double scale);
35 #endif