Classes | Defines | 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

Defines

#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 *, char *)
static void svg_open_end (SVG *)
static void svg_attr_value (SVG *, char *, char *)
static void svg_attr_values (SVG *, char *, char *,...)
static void svg_close (SVG *, char *)
static void svg_general (SVG *, 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 *)

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)" } }

Define Documentation

#define FONT_SHIFT_OFFSET   0.5

Definition at line 51 of file svg.c.

#define FONT_SHIFT_RATIO   0.705

Definition at line 50 of file svg.c.

#define FONT_SIZE_RATIO   1.34

Definition at line 49 of file svg.c.

#define MAX_STRING_LEN   1000

Definition at line 44 of file svg.c.

#define POINTS_PER_INCH   72

Definition at line 42 of file svg.c.

#define SVG_Default_X   720

Definition at line 39 of file svg.c.

#define SVG_Default_Y   540

Definition at line 40 of file svg.c.


Function Documentation

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

Definition at line 475 of file svg.c.

void plD_bop_svg ( PLStream pls  ) 

Definition at line 237 of file svg.c.

void plD_dispatch_init_svg ( PLDispatchTable pdt  ) 

Definition at line 128 of file svg.c.

void plD_eop_svg ( PLStream pls  ) 

Definition at line 333 of file svg.c.

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

Definition at line 386 of file svg.c.

void plD_init_svg ( PLStream pls  ) 

Definition at line 152 of file svg.c.

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

Definition at line 293 of file svg.c.

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

Definition at line 318 of file svg.c.

void plD_state_svg ( PLStream pls,
PLINT  op 
)

Definition at line 376 of file svg.c.

void plD_tidy_svg ( PLStream pls  ) 

Definition at line 355 of file svg.c.

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

Definition at line 412 of file svg.c.

void proc_str ( PLStream pls,
EscText args 
) [static]

Definition at line 564 of file svg.c.

void specify_font ( FILE *  svgFile,
PLUNICODE  ucs4_char 
) [static]

Definition at line 1185 of file svg.c.

void svg_attr_value ( SVG aStream,
char *  attribute,
char *  value 
) [static]

Definition at line 924 of file svg.c.

void svg_attr_values ( SVG aStream,
char *  attribute,
char *  format,
  ... 
) [static]

Definition at line 941 of file svg.c.

void svg_close ( SVG aStream,
char *  tag 
) [static]

Definition at line 992 of file svg.c.

int svg_family_check ( PLStream pls  )  [static]

Definition at line 1120 of file svg.c.

void svg_fill_background_color ( PLStream pls  )  [static]

Definition at line 1098 of file svg.c.

void svg_fill_color ( PLStream pls  )  [static]

Definition at line 1077 of file svg.c.

void svg_general ( SVG aStream,
char *  text 
) [static]

Definition at line 1012 of file svg.c.

void svg_indent ( SVG aStream  )  [static]

Definition at line 1024 of file svg.c.

void svg_open ( SVG aStream,
char *  tag 
) [static]

Definition at line 896 of file svg.c.

void svg_open_end ( SVG aStream  )  [static]

Definition at line 910 of file svg.c.

void svg_stroke_color ( PLStream pls  )  [static]

Definition at line 1056 of file svg.c.

void svg_stroke_width ( PLStream pls  )  [static]

Definition at line 1041 of file svg.c.

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

Definition at line 1143 of file svg.c.

void write_unicode ( FILE *  svgFile,
PLUNICODE  ucs4_char 
) [static]

Definition at line 1162 of file svg.c.


Variable Documentation

int already_warned = 0 [static]

Definition at line 57 of file svg.c.

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.

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.

int text_clipping = 1 [static]

Definition at line 59 of file svg.c.