|
TPCCLIB
|
Functions for drawing legends to SVG plots. More...
#include "libtpcsvg.h"Go to the source code of this file.
Functions | |
| void | svg_init_legends (SVG_LEGENDS *legends) |
| void | svg_legend_empty (SVG_LEGENDS *legends) |
| int | svg_legend_add (SVG_LEGENDS *legends, const int plot_type, const int symbol_type, const svgSymbolFill symbol_fill, const int color, const char *text) |
| int | svg_create_legends (FILE *fp, struct svg_viewports *vp, SVG_LEGENDS *legends, char *errmsg, int verbose) |
| char * | svg_str_encode (const char *s) |
Variables | |
| int | SVG_INLINE |
Functions for drawing legends to SVG plots.
Definition in file svg_legend.c.
| int svg_create_legends | ( | FILE * | fp, |
| struct svg_viewports * | vp, | ||
| SVG_LEGENDS * | legends, | ||
| char * | errmsg, | ||
| int | verbose ) |
Create SVG plot legends.
| fp | SVG graphics file pointer. |
| vp | Struct containing the viewport sizes. |
| legends | Pointer to struct containing legends. |
| errmsg | Char pointer to string (at least of length 128) where possible error description is copied; set to NULL if not necessary. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
Definition at line 76 of file svg_legend.c.
Referenced by plot_fit_svg(), plot_fitrange_svg(), and plot_svg().
| void svg_init_legends | ( | SVG_LEGENDS * | legends | ) |
Initiate SVG plot legends struct contents; call this once before usage
| legends | Pointer to legends struct |
Definition at line 14 of file svg_legend.c.
Referenced by plot_fit_svg(), plot_fitrange_svg(), and plot_svg().
| int svg_legend_add | ( | SVG_LEGENDS * | legends, |
| const int | plot_type, | ||
| const int | symbol_type, | ||
| const svgSymbolFill | symbol_fill, | ||
| const int | color, | ||
| const char * | text ) |
Add information of one legend item to legends struct.
Memory will be allocated here.
| legends | Pointer to legends structure. |
| plot_type | Plot type: 1=line, 2=symbols, 0=both line and symbols. |
| symbol_type | Symbol type: RECTANGLE, CIRCLE, UPTRIANGLE, DOWNTRIANGLE, DIAMOND, LEFTTRIANGLE, RIGHTTRIANGLE |
| symbol_fill | Symbol filling: SYMBOLOPEN, SYMBOLFILLED |
| color | SVG color index. |
| text | Pointer to Legend text. |
Definition at line 43 of file svg_legend.c.
Referenced by plot_fit_svg(), plot_fitrange_svg(), and plot_svg().
| void svg_legend_empty | ( | SVG_LEGENDS * | legends | ) |
Empty the legends struct contents and free the allocated memory.
| legends | Pointer to legends struct |
Definition at line 26 of file svg_legend.c.
Referenced by plot_fit_svg(), plot_fitrange_svg(), and plot_svg().
| char * svg_str_encode | ( | const char * | s | ) |
Encode special characters for XML, including SVG.
| s | Pointer to the string to be encoded. |
Definition at line 256 of file svg_legend.c.
Referenced by svg_create_legends(), and svg_write_tac().
|
extern |
Write inline SVG (1) or separate SVG file (0)
Definition at line 12 of file svg_file.c.