From: Sebastien GODARD Date: Sun, 14 Feb 2016 14:58:17 +0000 (+0100) Subject: SVG: Define new constants X-Git-Tag: v11.3.1~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7fcc4a09ef8e7f9e3b6c1bd7305bae002192ce5;p=sysstat SVG: Define new constants Define new constants that will be used to draw SVG graphs. Move previous existing definitions from sadf.h to sa.h Signed-off-by: Sebastien GODARD --- diff --git a/sa.h b/sa.h index 4588997..c271fa6 100644 --- a/sa.h +++ b/sa.h @@ -832,6 +832,62 @@ struct report_format { #define F_MAIN 0x02 #define F_END 0x04 +/* + *************************************************************************** + * SVG output definitions + *************************************************************************** + */ + +/* + * ^ + * 1 | General header + * v + * ^ ^ ^ + * | | 4 | Graph title + * | | v + * | | ^ | Caption + * | 3 | | | + * | | | G |Y + * 2 | | 5 | r | + * | | | a |A + * | | | d |x + * | | | . |i + * | | | |s X Axis + * | | v |------------------------------- + * | | Grad. + * | v <---><------------------------------> + * | 6 8 + * | Gap + * v<---------------------------------------------------------------> + * 7 + */ + +/* #8 */ +#define SVG_G_XSIZE 720 +/* #6 */ +#define SVG_M_XSIZE 50 +/* #7 */ +#define SVG_V_XSIZE 1000 + +/* #5 */ +#define SVG_G_YSIZE 200 +/* #1 */ +#define SVG_H_YSIZE 50 +/* #4 */ +#define SVG_M_YSIZE 50 +/* #2 */ +#define SVG_T_YSIZE 310 +/* #3 */ +#define SVG_V_YSIZE 300 + +/* Grid: Nr of horizontal lines */ +#define SVG_H_GRIDNR 3 +/* Grid: Nr of vertical lines */ +#define SVG_V_GRIDNR 10 + +/* Block size used to allocate arrays for graphs data */ +#define CHUNKSIZE 4096 + /* *************************************************************************** * Macro functions definitions. diff --git a/sadf.h b/sadf.h index 101bd4b..b382af0 100644 --- a/sadf.h +++ b/sadf.h @@ -108,18 +108,6 @@ #define DISPLAY_FIELD_LIST(m) (((m) & FO_FIELD_LIST) == FO_FIELD_LIST) #define TEST_MARKUP(m) (((m) & FO_TEST_MARKUP) == FO_TEST_MARKUP) -/* - *************************************************************************** - * SVG output definitions - *************************************************************************** - */ - -#define SVG_G_XSIZE 720 -#define SVG_V_XSIZE 900 - -#define SVG_G_YSIZE 200 -#define SVG_V_YSIZE 300 -#define SVG_T_YSIZE 350 /* ***************************************************************************