#include <tscope.h>
#define MYCOLOR ts_makecolor(255,128,0)
int main()
{
ts_scrsize(SIZE1);
ts_init();
ts_bgcolor(WHITE);
ts_fgcolor(BLACK);
ts_printf_centre(0, 140, "Tscope knows some predefined colors");
ts_fgcolor(BLUE);
ts_printf_centre(0, 120, "BLUE for example");
ts_fgcolor(RED);
ts_printf_centre(0, 100, "RED is also an option");
ts_fgcolor(BLACK);
ts_printf_centre(0, 80,
"ts_makecolor mixes any color based on RGB-values");
ts_fgcolor(MYCOLOR);
ts_printf_centre(0, 40, "ts_makecolor can be used to #define a color");
int mycolor2;
mycolor2 = ts_makecolor(0, 128, 255);
ts_fgcolor(mycolor2);
ts_printf_centre(0, 0,
"its return value can be assigned to an integer");
ts_printf_centre(0, -20, "which is used in a call to ts_fgcolor");
ts_fgcolor(ts_makecolor(128, 0, 255));
ts_printf_centre(0, -60, "a call to ts_makecolor can even be used");
ts_printf_centre(0, -80, "within a call to ts_fgcolor");
ts_fgcolor(BLACK);
ts_printf_centre(0, -120,
"other functions that take a color value as argument are");
ts_printf_centre(0, -140, "ts_bgcolor, ts_textmode,");
ts_printf_centre(0, -160, "ts_mousecolor and ts_clrbmp.");
ts_button(XMAX - 20, -YMAX + 20);
return 0;
}
END_OF_MAIN();