1
0
mirror of https://github.com/rricharz/Tek4010.git synced 2026-04-18 17:07:30 +00:00

More natural look of bright drawing spot

This commit is contained in:
Rene Richarz
2024-02-29 04:33:59 +01:00
parent 1b570dfb48
commit b52282cc8f
4 changed files with 9 additions and 18 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -35,8 +35,7 @@ Dave Ault using tek4010.
All instructions can now be found in [Manual.pdf](https://github.com/rricharz/Tek4010/blob/master/Manual.pdf)
in the main Tek4010 directory.
**Version 1.8 or above includes a much improved handling of the bright drawing spot,
but requires also much more computer power. See chapter 14 of the manual on how
to install it. The standard version installed is 1.7, which works on all
Raspberry Pi models.**
**Version 1.8 for the Raspberry Pi 5 includes a somewhat improved handling of the fading of the bright
drawing spot at the expense of requiring much more computer power. See chapter 14 of the manual on how
to switch to it. The standard version is 1.7, which works on all Raspberry Pi models.**

View File

@@ -28,8 +28,8 @@
#define DEBUGMAX 0 // exit after DEBUGMAX chars, 0 means no exit
#define WRITE_TROUGH_INTENSITY 0.5 // green only
#define NORMAL_INTENSITY 0.7
#define CURSOR_INTENSITY 0.7
#define NORMAL_INTENSITY 0.75
#define CURSOR_INTENSITY 0.75
#define BRIGHT_SPOT_COLOR 1.0
#define BRIGHT_SPOT_COLOR_HALF 0.6
#define BLACK_COLOR 0.08 // effect of flood gun
@@ -825,7 +825,7 @@ void tube_drawPoint(cairo_t *cr, cairo_t *cr2)
double bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
cairo_set_source_rgb(cr2, 0, bsc, 0);
cairo_arc(cr2, tube_x2, windowHeight - tube_y2, 2 + defocussed, 0, PI2);
cairo_arc(cr2, tube_x2, windowHeight - tube_y2, 1 + defocussed, 0, PI2);
cairo_fill(cr2);
xlast = tube_x2;
@@ -874,18 +874,10 @@ void tube_drawVector(cairo_t *cr, cairo_t *cr2)
cairo_move_to(cr, tube_x0, windowHeight - tube_y0);
cairo_line_to(cr, tube_x2, windowHeight - tube_y2);
cairo_stroke (cr);
//draw the bright spot, half intensity
cairo_set_line_width (cr2, 6 + pensize + 1 * defocussed);
double bsc = (BRIGHT_SPOT_COLOR_HALF * intensity) / 100;
cairo_set_source_rgb(cr2, 0, bsc, 0);
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);
cairo_stroke (cr2);
// draw the bright spot, high intensity
cairo_set_line_width (cr2, pensize + 2 + 2 * defocussed);
bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
// cairo_set_line_width (cr2, pensize + 2 + 2 * defocussed);
double bsc = (BRIGHT_SPOT_COLOR * intensity) / 100;
cairo_set_source_rgb(cr2, 0, bsc, 0);
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);