Tscope5
Main Page
Related Pages
Files
Examples
graphics8.c
named colors
#include <tscope5.h>
int
main()
{
ts5_install_display
();
ts5_set_coordinate_scale
(TS5_RELATIVE_COORDINATES);
char
colors[4][20] = {
"aliceblue"
,
"antiquewhite"
,
"aqua"
,
"aquamarine"
};
ts5_set_fill_mode
(TS5_FILL_ON);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[0], 1.0));
ts5_draw_rectangle
(-1.0, 1.0, 1.0, 0.5);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[1], 1.0));
ts5_draw_rectangle
(-1.0, 1.0, 0.5, 0.0);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[2], 1.0));
ts5_draw_rectangle
(-1.0, 1.0, 0.0, -0.5);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[3], 1.0));
ts5_draw_rectangle
(-1.0, 1.0, -0.5, -1.0);
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
return
0;
}