]> granicus.if.org Git - sysstat/commitdiff
SVG: Define new constants
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 14 Feb 2016 14:58:17 +0000 (15:58 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 14 Feb 2016 14:58:17 +0000 (15:58 +0100)
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 <sysstat@users.noreply.github.com>
sa.h
sadf.h

diff --git a/sa.h b/sa.h
index 4588997fe1d77eaaa619b0dcffb9c2a4ef76f408..c271fa6c40e892370ebba9f07ea38fd267fdc092 100644 (file)
--- 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 101bd4bfa469be11915c7c8290c93e7c1ba26d5a..b382af07de2bf31ab38f4cc04448d8059dcdd0b9 100644 (file)
--- a/sadf.h
+++ b/sadf.h
 #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
 
 /*
  ***************************************************************************