X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_graph.h;h=51f3d3fbae49860ff27c82e0e8e7976174ace330;hb=2ebb9e5e4cd81f7f389600a475a6f3e4f8afc87f;hp=73c25d864444e132f04f96983039346e4d170de8;hpb=dd0cc409db510efe7cde8d7f0df6ec370be16c60;p=rrdtool.git diff --git a/src/rrd_graph.h b/src/rrd_graph.h index 73c25d8..51f3d3f 100644 --- a/src/rrd_graph.h +++ b/src/rrd_graph.h @@ -43,15 +43,18 @@ enum grc_en { GRC_CANVAS = 0, GRC_BACK, GRC_SHADEA, GRC_SHADEB, #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 */ @@ -168,6 +171,14 @@ typedef struct graph_desc_t { rrd_value_t *data; /* the raw data drawn from the rrd */ rrd_value_t *p_data; /* processed data, xsize elments */ double linewidth; /* linewideth */ + + /* dashed line stuff */ + int dash; /* boolean, draw dashed line? */ + double *p_dashes; /* pointer do dash array which keeps the lengths of dashes */ + int ndash; /* number of dash segments */ + double offset; /* dash offset along the line */ + + enum txa_en txtalign; /* change default alignment strategy for text */ } graph_desc_t; typedef struct image_desc_t { @@ -212,6 +223,7 @@ 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 */ @@ -224,6 +236,7 @@ typedef struct image_desc_t { 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 */