Tscope5
Main Page
Related Pages
Files
Examples
graphics08.c
////////////////////////////////////////////////////////////////////////////////
//
// __ ______
// / /_______________ ____ ___ / ____/
// / __/ ___/ ___/ __ \/ __ \/ _ \ /___ )
// / /_(__ ) /__/ /_/ / /_/ / __/ ____/ /
// \__/____/\___/\____/ .___/\___/ /_____/
// /_/
//
// graphics08.c
// - Illustration of the named colors.
////////////////////////////////////////////////////////////////////////////////
#include <tscope5.h>
int
main()
{
// open a display and set graphics parameters
ts5_set_fill_mode
(TS5_FILL_ON);
ts5_install_display
();
ts5_set_coordinate_scale
(TS5_RELATIVE_COORDINATES);
// draw some circles
char
colors[4][20] = {
"aliceblue"
,
"antiquewhite"
,
"aqua"
,
"aquamarine"
};
ts5_set_foreground_color
(
ts5_make_named_color
(colors[0], 1.0));
ts5_draw_circle
(0.5, 0.5, 0.25);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[1], 1.0));
ts5_draw_circle
(-0.5, 0.5, 0.25);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[2], 1.0));
ts5_draw_circle
(-0.5, -0.5, 0.25);
ts5_set_foreground_color
(
ts5_make_named_color
(colors[3], 1.0));
ts5_draw_circle
(0.5, -0.5, 0.25);
// wait for a click
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
return
0;
}