blob: 80947df99d704b6e8bd83134f97dd7c4a9d0ddc5 [file] [log] [blame]
nethercote5912c812004-02-15 15:38:08 +00001/* This file is part of hp2ps, a graph drawer for memory profiles.
2 Copyright (C) 2002 The University Court of the University of Glasgow.
3 This program is governed by the license contained in the file LICENSE. */
4
nethercotec9f36922004-02-14 16:40:02 +00005#include <stdio.h>
6#include "Main.h"
7#include "Curves.h"
8#include "Dimensions.h"
9#include "HpFile.h"
10
11/* own stuff */
12#include "Marks.h"
13
14static void Caret PROTO((floatish, floatish, floatish));
15
16void
17Marks()
18{
19 intish i;
20 floatish m;
21
22 for (i = 0; i < nmarks; i++) {
23 m = ((markmap[i] - samplemap[0]) / xrange) * graphwidth;
24 Caret(xpage(m), ypage(0.0), 4.0);
25 }
26}
27
28
29/*
30 * Draw a small white caret at (x,y) with width 2 * d
31 */
32
33static void
34Caret(x,y,d)
35 floatish x; floatish y; floatish d;
36{
37 fprintf(psfp, "%f %f moveto\n", x - d, y);
38 fprintf(psfp, "%f %f rlineto\n", d, -d);
39 fprintf(psfp, "%f %f rlineto\n", d, d);
40 fprintf(psfp, "closepath\n");
41
42 fprintf(psfp, "gsave\n");
43 fprintf(psfp, "1.0 setgray\n");
44 fprintf(psfp, "fill\n");
45 fprintf(psfp, "grestore\n");
46 fprintf(psfp, "stroke\n");
47}