History

Plan 9 from Bell Labs Second Edition 1995-04-05

David du Colombier committed 31 years ago2e-1995-04-05

Commit 219b2ee1 parent bd389b311749 files · +2555453 −1889727Browse files

Showing the changes to sys/src/cmd/plot/libplot/mplot.h (1 of 11749 files). Show all

Unified · Split

sys/src/cmd/plot/libplot/mplot.h+10−9
@@ -25,16 +25,17 @@ struct seg { · 24 unmodified lines
2525 char stat;
2626 };
2727 /*
28− * Color values
28+ * Color values -- these only work with ldepth=3 & standard plan 9 color map
2929 */
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)
3839 /*
3940 * display parameters
4041 */