libkipr  1.0.0
graphics_characters.h
Go to the documentation of this file.
1 
14 #ifndef _KIPR_GRAPHICS_GRAPHICS_CHARACTERS_H_
15 #define _KIPR_GRAPHICS_GRAPHICS_CHARACTERS_H_
16 
17 /*
18 Segment arrangement
19  --0- -1-- ---18---- --20 21-- ---- ----
20  |\ | /| |\ 18 /| |\20 21/| || | /|
21  7 8 9 10 2 | \ | / | |24 | 26| ||\ 29 / |
22  | \|/ | | 17/ | 24 |/ 26 || 29|/ |
23  -15- -11- ---17---- ---- ---- |--- ----
24  | /|\ | | /|\ | 25 /|\ 27 |2 /|\ |
25  6 14 1 12 3 | / | \ | |25 | 27| |8 / | \ |
26  |/ 3 \| |/ 16 \| |/22 23\| || | \|
27  --5- -4-- ---16---- --22 23-- ---- ----
28  /
29  / (19)
30 */
32 #define NUMSEG 30
34 #define SEGL 5
36 #define SEGSP 7
37 
39 extern int __bold;
41 #define BOLD __bold=1;
43 #define NOBOLD __bold=0;
44 
46 #ifndef GXWINDOW
47  #define GXWINDOW 700
48 #endif
50 #ifndef GYWINDOW
51  #define GYWINDOW 500
52 #endif
53 
54 // **************** Function Prototypes ******************
55 // Based on 16 segment characters: draws a segment for each s value that gets a 1 and a rectangle if the value is 2;
56 // the upper left corner starts at x,y; the color is defined by the vales of rgb; multiplier size resizes the character;
57 // there are added segments to provide for . : , ; and other non alphameric characters
58 // arrows (l,r,u,d) are specified by numbers 11 ,12, 13, 14
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
76 void graphics_segment_display(int s[], int x, int y, int r, int g, int b, float size);
77 
78 
91 void graphics_print_character(int n, int x, int y, int r, int g, int b, float size);
92 
93 
106 void graphics_print_string(char s[], int x, int y, int r, int g, int b, float size);
107 
108 
122 int graphics_print_int(int n, int minNumDigits, int x, int y, int r, int g, int b, float size);
123 
124 
138 void graphics_print_float(float n, int numDigits, int x, int y, int r, int g, int b, float size);
139 
140 
141 #ifdef __cplusplus
142 }
143 #endif
144 
145 #endif
int __bold
the variable used to store whether or not characters should be bold
void graphics_print_string(char s[], int x, int y, int r, int g, int b, float size)
void graphics_segment_display(int s[], int x, int y, int r, int g, int b, float size)
void graphics_print_float(float n, int numDigits, int x, int y, int r, int g, int b, float size)
int graphics_print_int(int n, int minNumDigits, int x, int y, int r, int g, int b, float size)
void graphics_print_character(int n, int x, int y, int r, int g, int b, float size)