PLplot: svg.c File Reference

PLplot 5.15.0

Classes | Macros | Functions | Variables
svg.c File Reference
`#include <stdarg.h>`
`#include <math.h>`
`#include "plplotP.h"`
`#include "drivers.h"`

Go to the source code of this file.

## Classes
struct | SVG

## Macros
#define | SVG_Default_X 720
#define | SVG_Default_Y 540
#define | POINTS_PER_INCH 72
#define | MAX_STRING_LEN 1000
#define | FONT_SIZE_RATIO 1.34
#define | FONT_SHIFT_RATIO 0.705
#define | FONT_SHIFT_OFFSET 0.5

## Functions
static void | svg_open (SVG *, const char *)
static void | svg_open_end (SVG *)
static void | svg_attr_value (SVG *, const char *, const char *)
static void | svg_attr_values (SVG *, const char *, const char *,...)
static void | svg_close (SVG *, const char *)
static void | svg_general (SVG *, const char *)
static void | svg_indent (SVG *)
static void | svg_stroke_width (PLStream *)
static void | svg_stroke_color (PLStream *)
static void | svg_fill_color (PLStream *)
static void | svg_fill_background_color (PLStream *)
static int | svg_family_check (PLStream *)
static void | poly_line (PLStream *, short *, short *, PLINT, short)
static void | gradient (PLStream *, short *, short *, PLINT)
static void | write_hex (FILE *, unsigned char)
static void | write_unicode (FILE *, PLUNICODE)
static void | specify_font (FILE *, PLUNICODE)
static void | proc_str (PLStream *, EscText *)
void | plD_dispatch_init_svg (PLDispatchTable *pdt)
void | plD_init_svg (PLStream *)
void | plD_line_svg (PLStream *, short, short, short, short)
void | plD_polyline_svg (PLStream *, short *, short *, PLINT)
void | plD_eop_svg (PLStream *)
void | plD_bop_svg (PLStream *)
void | plD_tidy_svg (PLStream *)
void | plD_state_svg (PLStream *, PLINT)
void | plD_esc_svg (PLStream *, PLINT, void *)
void | plD_state_svg (PLStream *PL_UNUSED(pls), PLINT PL_UNUSED(op))

## Variables
PLDLLIMPEXP_DRIVER const char * | plD_DEVICE_INFO_svg = "svg:Scalable Vector Graphics (SVG 1.1):1:svg:57:svg\n"
static int | already_warned = 0
static int | text_clipping = 1
static DrvOpt | svg_options [] = { { "text_clipping", DRV_INT, &text_clipping, "Use text clipping (text_clipping=0|1)" } }

## Macro Definition Documentation

## ◆ FONT_SHIFT_OFFSET

#define FONT_SHIFT_OFFSET 0.5

Definition at line 51 of file svg.c.

## ◆ FONT_SHIFT_RATIO

#define FONT_SHIFT_RATIO 0.705

Definition at line 50 of file svg.c.

## ◆ FONT_SIZE_RATIO

#define FONT_SIZE_RATIO 1.34

Definition at line 49 of file svg.c.

## ◆ MAX_STRING_LEN

#define MAX_STRING_LEN 1000

Definition at line 44 of file svg.c.

## ◆ POINTS_PER_INCH

#define POINTS_PER_INCH 72

Definition at line 42 of file svg.c.

## ◆ SVG_Default_X

#define SVG_Default_X 720

Definition at line 39 of file svg.c.

## ◆ SVG_Default_Y

#define SVG_Default_Y 540

Definition at line 40 of file svg.c.

## Function Documentation

## ◆ gradient()

void gradient | ( | PLStream * | pls,
|  | short * | xa,
|  | short * | ya,
|  | PLINT | npts
| ) |  |
| static

Definition at line 473 of file svg.c.

## ◆ plD_bop_svg()

void plD_bop_svg | ( | PLStream * | pls | ) |

Definition at line 238 of file svg.c.

## ◆ plD_dispatch_init_svg()

void plD_dispatch_init_svg | ( | PLDispatchTable * | pdt | ) |

Definition at line 129 of file svg.c.

## ◆ plD_eop_svg()

void plD_eop_svg | ( | PLStream * | pls | ) |

Definition at line 334 of file svg.c.

## ◆ plD_esc_svg()

void plD_esc_svg | ( | PLStream * | pls,
|  | PLINT | op,
|  | void * | ptr
| ) |  |

Definition at line 384 of file svg.c.

## ◆ plD_init_svg()

void plD_init_svg | ( | PLStream * | pls | ) |

Definition at line 153 of file svg.c.

## ◆ plD_line_svg()

void plD_line_svg | ( | PLStream * | pls,
|  | short | x1a,
|  | short | y1a,
|  | short | x2a,
|  | short | y2a
| ) |  |

Definition at line 294 of file svg.c.

## ◆ plD_polyline_svg()

void plD_polyline_svg | ( | PLStream * | pls,
|  | short * | xa,
|  | short * | ya,
|  | PLINT | npts
| ) |  |

Definition at line 319 of file svg.c.

## ◆ plD_state_svg() [1/2]

void plD_state_svg | ( | PLStream * | ,
|  | PLINT |
| ) |  |

## ◆ plD_state_svg() [2/2]

void plD_state_svg | ( | PLStream * | PL_UNUSEDpls,
|  | PLINT | PL_UNUSEDop
| ) |  |

Definition at line 374 of file svg.c.

## ◆ plD_tidy_svg()

void plD_tidy_svg | ( | PLStream * | pls | ) |

Definition at line 356 of file svg.c.

## ◆ poly_line()

void poly_line | ( | PLStream * | pls,
|  | short * | xa,
|  | short * | ya,
|  | PLINT | npts,
|  | short | fill
| ) |  |
| static

Definition at line 410 of file svg.c.

## ◆ proc_str()

void proc_str | ( | PLStream * | pls,
|  | EscText * | args
| ) |  |
| static

Definition at line 562 of file svg.c.

## ◆ specify_font()

void specify_font | ( | FILE * | svgFile,
|  | PLUNICODE | ucs4_char
| ) |  |
| static

Definition at line 1202 of file svg.c.

## ◆ svg_attr_value()

void svg_attr_value | ( | SVG * | aStream,
|  | const char * | attribute,
|  | const char * | value
| ) |  |
| static

Definition at line 943 of file svg.c.

## ◆ svg_attr_values()

void svg_attr_values | ( | SVG * | aStream,
|  | const char * | attribute,
|  | const char * | format,
|  |  | ...
| ) |  |
| static

Definition at line 960 of file svg.c.

## ◆ svg_close()

void svg_close | ( | SVG * | aStream,
|  | const char * | tag
| ) |  |
| static

Definition at line 1011 of file svg.c.

## ◆ svg_family_check()

int svg_family_check | ( | PLStream * | pls | ) |
| static

Definition at line 1137 of file svg.c.

## ◆ svg_fill_background_color()

void svg_fill_background_color | ( | PLStream * | pls | ) |
| static

Definition at line 1115 of file svg.c.

## ◆ svg_fill_color()

void svg_fill_color | ( | PLStream * | pls | ) |
| static

Definition at line 1094 of file svg.c.

## ◆ svg_general()

void svg_general | ( | SVG * | aStream,
|  | const char * | text
| ) |  |
| static

Definition at line 1031 of file svg.c.

## ◆ svg_indent()

void svg_indent | ( | SVG * | aStream | ) |
| static

Definition at line 1043 of file svg.c.

## ◆ svg_open()

void svg_open | ( | SVG * | aStream,
|  | const char * | tag
| ) |  |
| static

Definition at line 915 of file svg.c.

## ◆ svg_open_end()

void svg_open_end | ( | SVG * | aStream | ) |
| static

Definition at line 929 of file svg.c.

## ◆ svg_stroke_color()

void svg_stroke_color | ( | PLStream * | pls | ) |
| static

Definition at line 1073 of file svg.c.

## ◆ svg_stroke_width()

void svg_stroke_width | ( | PLStream * | pls | ) |
| static

Definition at line 1058 of file svg.c.

## ◆ write_hex()

void write_hex | ( | FILE * | svgFile,
|  | unsigned char | val
| ) |  |
| static

Definition at line 1160 of file svg.c.

## ◆ write_unicode()

void write_unicode | ( | FILE * | svgFile,
|  | PLUNICODE | ucs4_char
| ) |  |
| static

Definition at line 1179 of file svg.c.

## Variable Documentation

## ◆ already_warned

int already_warned = 0
| static

Definition at line 57 of file svg.c.

## ◆ plD_DEVICE_INFO_svg

PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_svg = "svg:Scalable Vector Graphics (SVG 1.1):1:svg:57:svg\n"

Definition at line 55 of file svg.c.

## ◆ svg_options

DrvOpt svg_options[] = { { "text_clipping", DRV_INT, &text_clipping, "Use text clipping (text_clipping=0|1)" } }
| static

Definition at line 60 of file svg.c.

## ◆ text_clipping

int text_clipping = 1
| static

Definition at line 59 of file svg.c.