/* ** sdl_digit.h for in /home/gayot_o/prog/lib/sdl-digit ** ** Made by olivier gayot ** Login ** ** Started on Mon Apr 23 08:07:05 2012 olivier gayot ** Last update Mon Apr 23 08:07:05 2012 olivier gayot */ #ifndef SDL_DIGIT_H_ # define SDL_DIGIT_H_ # include # include typedef struct { float x; float y; float z; } t_vect; typedef union { Uint8 *char_; Uint16 *short_; Uint32 *int_; } union_; void draw_horizontal_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_semi_horizontal_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_vertical_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_semi_vertical_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_slash_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_backslash_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_diag_right_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_diag_left_bar(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color); void draw_line(SDL_Surface *surf, SDL_Rect begin, SDL_Rect end, Uint32); SDL_Rect get_rect(int x, int y, unsigned int w, unsigned int h); Uint32 get_pixel_color(SDL_Surface *surf, int x, int y); void set_pixel_color(SDL_Surface *surf, int x, int y, Uint32); SDL_Rect *new_rect(int x, int y, unsigned int w, unsigned int h); int draw_digit(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color, char d); void draw_bar_id(SDL_Surface *surf, SDL_Rect *rect, int size, Uint32 color, int id); void draw_string(SDL_Surface *surf, SDL_Rect *rect, const char *str, Uint32 color, int size); SDL_Surface *new_string(const char *str, Uint32 color, int size); # define ABS(x) (((x) < 0) ? (-(x)) : (x)) #endif /* !SDL_DIGIT_H_*/