Change Details
tools/atrf-path/gui.c |
33 | 33 | |
34 | 34 | |
35 | 35 | #define FG_RGBA 0xffffffff /* measurement color */ |
| 36 | #define OK_RGBA 0x00ff00ff |
36 | 37 | |
37 | 38 | #define CHAN_STEP 20 /* 4 pixels/MHz */ |
38 | 39 | #define SIDE_STEP 2 |
... | ... | |
40 | 41 | #define Y_MIN -94 |
41 | 42 | #define Y_MAX -10 |
42 | 43 | |
| 44 | #define STATUS_X (XRES-15) |
| 45 | #define STATUS_Y 15 |
| 46 | #define STATUS_R 8 |
| 47 | |
43 | 48 | |
44 | 49 | static void segment(SDL_Surface *s, int *last_x, int *last_y, int x, |
45 | 50 | const struct sample *res, int have_last) |
... | ... | |
108 | 113 | { |
109 | 114 | SDL_Surface *surf; |
110 | 115 | SDL_Event event; |
| 116 | int cycle = 0; |
111 | 117 | |
112 | 118 | if (SDL_Init(SDL_INIT_VIDEO) < 0) { |
113 | 119 | fprintf(stderr, "SDL_init: %s\n", SDL_GetError()); |
... | ... | |
135 | 141 | SDL_LockSurface(surf); |
136 | 142 | |
137 | 143 | clear(surf); |
| 144 | |
| 145 | if (cycle++ & 1) { |
| 146 | filledCircleColor(surf, STATUS_X, STATUS_Y, STATUS_R, |
| 147 | OK_RGBA); |
| 148 | aacircleColor(surf, STATUS_X, STATUS_Y, STATUS_R, |
| 149 | OK_RGBA); |
| 150 | } |
138 | 151 | draw(surf, res); |
139 | 152 | |
140 | 153 | SDL_UnlockSurface(surf); |
Download the corresponding diff file