Tscope5
Main Page
Related Pages
Files
Examples
graphics5.c
RGB 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_ON);
ts5_clear_display
();
for
(i=1.0; i>0.0; i-=0.01) {
TS5_COLOR tmp =
ts5_make_rgb_color
(i, 0.0, 0.0, 1.0);
ts5_set_foreground_color
(tmp);
ts5_draw_rectangle
(-i, -i, i, 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_rgb_color
(0.0, i, 0.0, 1.0);
ts5_set_foreground_color
(tmp);
ts5_draw_rectangle
(-i, -i, i, 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_rgb_color
(0.0, 0.0, i, 1.0);
ts5_set_foreground_color
(tmp);
ts5_draw_rectangle
(-i, -i, i, 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_rgb_color
(1.0, 1.0, 1.0, 0.01);
ts5_set_foreground_color
(tmp);
ts5_draw_rectangle
(-i, -i, i, i);
}
ts5_flip_display
();
ts5_draw_mouse_button
(0.9,-0.8);
return
0;
}