Date:2013-01-31 07:25:21 (10 years 8 months ago)
Author:Werner Almesberger
Commit:b0a576dd647c01476739a8a2e50860676ada1295
Message:ubb-la/gui.c: mark the center of the view area

Files: ubb-la/gui.c (4 diffs)

Change Details

ubb-la/gui.c
4040#define UNIT_RGBA 0xb0e0ffff /* units */
4141#define MAP_BUF_RGBA 0x808080ff /* buffer in the map */
4242#define MAP_VIEW_RGBA 0xffffffff /* current view in the map */
43#define CENTER_RGBA 0x5080ffff /* center marker */
4344#define LEVEL_RGBA 0xffff00ff /* constant level or single change */
4445#define BOUNCE_RGBA 0xff8080ff /* bouncing signal */
4546#define LABEL_RGBA 0xffffffff /* channel label */
...... 
5758#define MAP_VIEW_Y0 0
5859#define MAP_VIEW_Y1 10
5960
61#define CENTER_W 8
62#define CENTER_Y0 20
63#define CENTER_Y1 24
64
6065#define CH_XOFF 30
6166#define CH_YOFF 30
6267#define CH_SKIP 16
...... 
381386
382387    for (i = -n; i <= n; i++)
383388        vlineColor(surf, XCENTER+i*DIV_X,
384            ch_y(0, 1)-DIV_Y, ch_y(3, 0)+DIV_Y, DIV_RGBA);
389            ch_y(0, 1)-DIV_Y, ch_y(3, 0)+DIV_Y,
390            i ? DIV_RGBA : CENTER_RGBA);
385391}
386392
387393
...... 
410416        for (i = 0; i != 4; i++)
411417            textf(0, ch_y(i, 1), LABEL_RGBA, "CH%d", i);
412418        show_divisions();
419        filledTrigonColor(surf, XCENTER, CENTER_Y1,
420            XCENTER-CENTER_W/2, CENTER_Y0,
421            XCENTER+CENTER_W/2, CENTER_Y0, CENTER_RGBA);
413422        show_buffer(buf, skip, nibbles, CH_XOFF, XRES, zoom, pos);
414423        show_freq(freq, zoom);
415424        update();

Archive Download the corresponding diff file

Branches:
master



interactive