diff options
Diffstat (limited to 'utils/hp2ps/Marks.c')
-rw-r--r-- | utils/hp2ps/Marks.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/utils/hp2ps/Marks.c b/utils/hp2ps/Marks.c new file mode 100644 index 0000000000..8d6f924e17 --- /dev/null +++ b/utils/hp2ps/Marks.c @@ -0,0 +1,43 @@ +#include "Main.h" +#include <stdio.h> +#include "Curves.h" +#include "Dimensions.h" +#include "HpFile.h" + +/* own stuff */ +#include "Marks.h" + +static void Caret PROTO((floatish, floatish, floatish)); + +void +Marks() +{ + intish i; + floatish m; + + for (i = 0; i < nmarks; i++) { + m = ((markmap[i] - samplemap[0]) / xrange) * graphwidth; + Caret(xpage(m), ypage(0.0), 4.0); + } +} + + +/* + * Draw a small white caret at (x,y) with width 2 * d + */ + +static void +Caret(x,y,d) + floatish x; floatish y; floatish d; +{ + fprintf(psfp, "%f %f moveto\n", x - d, y); + fprintf(psfp, "%f %f rlineto\n", d, -d); + fprintf(psfp, "%f %f rlineto\n", d, d); + fprintf(psfp, "closepath\n"); + + fprintf(psfp, "gsave\n"); + fprintf(psfp, "1.0 setgray\n"); + fprintf(psfp, "fill\n"); + fprintf(psfp, "grestore\n"); + fprintf(psfp, "stroke\n"); +} |