index 502fefe1b6573130337bc35fe2902595ca6a34e0..dd132378ec1f3d59806198f8955ec008683c2266 100644 (file)
--- a/program/src/rrd_graph.h
+++ b/program/src/rrd_graph.h
#define y1 cairo_y1
#define index cairo_index
+#include <cairo.h>
#include <cairo-pdf.h>
#include <cairo-svg.h>
#include <cairo-ps.h>
#define GRIDWIDTH 0.4
enum gf_en { GF_PRINT = 0, GF_GPRINT, GF_COMMENT, GF_HRULE, GF_VRULE, GF_LINE,
- GF_AREA, GF_STACK, GF_TICK,
+ GF_AREA, GF_STACK, GF_TICK, GF_TEXTALIGN,
GF_DEF, GF_CDEF, GF_VDEF, GF_SHIFT,
GF_XPORT
};
+enum txa_en { TXA_LEFT = 0, TXA_RIGHT, TXA_CENTER, TXA_JUSTIFIED };
+
enum vdef_op_en {
VDEF_MAXIMUM = 0 /* like the MAX in (G)PRINT */
, VDEF_MINIMUM /* like the MIN in (G)PRINT */
, VDEF_AVERAGE /* like the AVERAGE in (G)PRINT */
+ , VDEF_STDEV /* the standard deviation */
, VDEF_PERCENT /* Nth percentile */
, VDEF_TOTAL /* average multiplied by time */
, VDEF_FIRST /* first non-unknown value and time */
rrd_value_t *data; /* the raw data drawn from the rrd */
rrd_value_t *p_data; /* processed data, xsize elments */
double linewidth; /* linewideth */
+ enum txa_en txtalign; /* change default alignment strategy for text */
} graph_desc_t;
typedef struct image_desc_t {
long xorigin, yorigin; /* where is (0,0) of the graph */
long ximg, yimg; /* total size of the image */
+ size_t rendered_image_size;
double zoom;
double magfact; /* numerical magnitude */
long base; /* 1000 or 1024 depending on what we graph */
int extra_flags; /* flags for boolean options */
/* data elements */
+ unsigned char *rendered_image;
long prt_c; /* number of print elements */
long gdes_c; /* number of graphics elements */
graph_desc_t *gdes; /* points to an array of graph elements */