Showing the changes to sys/src/cmd/plot/libplot/mplot.h (1 of 11749 files). Show all
Unified · Split
| @@ -25,16 +25,17 @@ struct seg { · 24 unmodified lines | ||
| 25 | 25 | char stat; |
| 26 | 26 | }; |
| 27 | 27 | /* |
| 28 | − * Color values | |
| 28 | + * Color values -- these only work with ldepth=3 & standard plan 9 color map | |
| 29 | 29 | */ |
| 30 | −#define ZERO 3 | |
| 31 | −#define RED 2 | |
| 32 | −#define GREEN 2 | |
| 33 | −#define YELLOW 1 | |
| 34 | −#define BLUE 2 | |
| 35 | −#define MAGENTA 1 | |
| 36 | −#define CYAN 1 | |
| 37 | −#define WHITE 0 | |
| 30 | +#define RGB(r,g,b) (255&~(((r)<<5)|((g)<<2)|((b)>>1))) | |
| 31 | +#define ZERO RGB(0,0,0) /* really should be ~0, but bcolor uses neg for error */ | |
| 32 | +#define RED RGB(7,0,0) | |
| 33 | +#define GREEN RGB(0,7,0) | |
| 34 | +#define YELLOW RGB(7,7,0) | |
| 35 | +#define BLUE RGB(0,0,7) | |
| 36 | +#define MAGENTA RGB(7,0,7) | |
| 37 | +#define CYAN RGB(0,7,7) | |
| 38 | +#define WHITE RGB(7,7,7) | |
| 38 | 39 | /* |
| 39 | 40 | * display parameters |
| 40 | 41 | */ |