typedef enum {SQUARE, CIRCLE, STAR, PLUS, MINUS, CROSS} graph_symbol;
+struct graph_point {
+ double x;
+ double y;
+ GString *label;
+};
+
+/*Bezier line*/
+struct graph_line {
+ /*First point*/
+ double p0_x;
+ double p0_y;
+ double p1_x;
+ double p1_y;
+ double p2_x;
+ double p2_y;
+ /*End point*/
+ double p3_x;
+ double p3_y;
+};
+
typedef struct _Graph {
GObject parent_instance;
/*Array of n_points sets of x,y coords*/
GPtrArray *points;
+ /*This draws all of the lines (generally between points)*/
+ GPtrArray *lines;
double maxx;
double minx;
double maxy;
#define GRAPH_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), GRAPH, GraphClass))
Graph *graph_new(void);
-int graph_add_point(Graph* graph, double x, double y);
+int graph_add_point(Graph* graph, double x, double y, const GString *label);
+int graph_add_graph_point(Graph* graph, struct graph_point *pt);
+int graph_add_line(Graph* graph, double p0_x, double p0_y, double p1_x, double p1_y, double p2_x, double p2_y, double p3_x, double p3_y);
+void graph_add_linear_connectors(Graph* graph);
#endif /* !GRAPHCLASS_H_ */