diff options
author | joye <joye> | 2014-03-10 20:29:57 (GMT) |
---|---|---|
committer | joye <joye> | 2014-03-10 20:29:57 (GMT) |
commit | b4eafc000bac06ca2eace24a35f4ab4a72a5c194 (patch) | |
tree | 8125a0989a57e8280227e10201ccd6a8500859ac /src/bltGraph.h | |
parent | 8e4920de5c68bb7414022f636c2d34540bea151e (diff) | |
download | blt-b4eafc000bac06ca2eace24a35f4ab4a72a5c194.zip blt-b4eafc000bac06ca2eace24a35f4ab4a72a5c194.tar.gz blt-b4eafc000bac06ca2eace24a35f4ab4a72a5c194.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGraph.h')
-rw-r--r-- | src/bltGraph.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/bltGraph.h b/src/bltGraph.h index aaf19e0..f69beae 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -48,6 +48,33 @@ typedef enum { } ClassId; typedef struct { + /* Inputs */ + int halo; /* Maximal screen distance a candidate point + * can be from the sample window coordinate */ + + int mode; /* Indicates whether to find the closest data + * point or the closest point on the trace by + * interpolating the line segments. Can also + * be SEARCH_AUTO, indicating to choose how to + * search.*/ + + int x, y; /* Screen coordinates of test point */ + + int along; /* Indicates to let search run along a + * particular axis: x, y, or both. */ + + /* Outputs */ + Element* elemPtr; /* Name of the closest element */ + + Point2d point; /* Graph coordinates of closest point */ + + int index; /* Index of closest data point */ + + double dist; /* Distance in screen coordinates */ + +} ClosestSearch; + +typedef struct { /* Generic fields common to all graph objects. */ ClassId classId; /* Class type of object. */ const char *name; /* Identifier to refer the object. */ @@ -373,6 +400,8 @@ struct _Graph { * ways: aligned, overlap, infront, or * stacked. */ int maxBarSetSize; + + ClosestSearch search; }; /* |