summaryrefslogtreecommitdiffstats
path: root/src/bltGraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bltGraph.h')
-rw-r--r--src/bltGraph.h29
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;
};
/*