Tscope5
Main Page
Related Pages
Files
Examples
graphics7.c
HSV color definition
#include <tscope5.h>
int
main()
{
ts5_install_display
();
ts5_set_coordinate_scale
(TS5_RELATIVE_COORDINATES);
double
i;
ts5_set_fill_mode
(TS5_FILL_OFF);
ts5_clear_display
();
for
(i=0.0; i<360.0; i++) {
TS5_COLOR tmp =
ts5_make_hsv_color
(i, 1.0, 1.0, 1.0);
ts5_set_foreground_color
(tmp);
ts5_draw_circle
(0.0, 0.0, i/360.0);
}
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
ts5_set_fill_mode
(TS5_FILL_ON);
ts5_clear_display
();
for
(i=1.0; i>0.0; i-=0.01) {
TS5_COLOR tmp =
ts5_make_hsv_color
(0.0, i, 1.0, 1.0);
ts5_set_foreground_color
(tmp);
ts5_draw_circle
(0.0, 0.0, i);
}
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
ts5_clear_display
();
for
(i=1.0; i>0.0; i-=0.01) {
TS5_COLOR tmp =
ts5_make_hsv_color
(0.0, 1.0, i, 1.0);
ts5_set_foreground_color
(tmp);
ts5_draw_circle
(0.0, 0.0, i);
}
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
ts5_clear_display
();
for
(i=1.0; i>0.0; i-=0.01) {
TS5_COLOR tmp =
ts5_make_hsv_color
(0.0, 1.0, 1.0, 0.01);
ts5_set_foreground_color
(tmp);
ts5_draw_circle
(0.0, 0.0, i);
}
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
return
0;
}