Date:2011-04-13 14:13:46 (12 years 11 months ago)
Author:Werner Almesberger
Commit:cee0296579d001f4c484cc3893313c0e65dbc3c0
Message:tools/atrf-path/gui.c (gui): added pulsating disc as progress/status indicator

Files: tools/atrf-path/gui.c (4 diffs)

Change Details

tools/atrf-path/gui.c
3333
3434
3535#define FG_RGBA 0xffffffff /* measurement color */
36#define OK_RGBA 0x00ff00ff
3637
3738#define CHAN_STEP 20 /* 4 pixels/MHz */
3839#define SIDE_STEP 2
...... 
4041#define Y_MIN -94
4142#define Y_MAX -10
4243
44#define STATUS_X (XRES-15)
45#define STATUS_Y 15
46#define STATUS_R 8
47
4348
4449static void segment(SDL_Surface *s, int *last_x, int *last_y, int x,
4550    const struct sample *res, int have_last)
...... 
108113{
109114    SDL_Surface *surf;
110115    SDL_Event event;
116    int cycle = 0;
111117
112118    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
113119        fprintf(stderr, "SDL_init: %s\n", SDL_GetError());
...... 
135141        SDL_LockSurface(surf);
136142
137143        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        }
138151        draw(surf, res);
139152
140153        SDL_UnlockSurface(surf);

Archive Download the corresponding diff file



interactive