rllib
1
|
#include <rlsvgvdi.h>
Public Member Functions | |
rlSvgVdi () | |
~rlSvgVdi () | |
int | setOutput (int *socket_out, int idForPvbrowser=0) |
int | setOutput (FILE *fout) |
int | setOutput (const char *outputfilename) |
int | setOutput (rlSpawn *pipe) |
int | endOutput () |
const char * | svgHeader (int width=1280, int height=1024, int rbackground=255, int gbackground=255, int bbackground=255) |
const char * | svgTrailer () |
const char * | drawEllipse (int x, int y, int rx, int ry) |
const char * | moveTo (int x, int y) |
const char * | lineTo (int x, int y) |
const char * | line (int x1, int y1, int x2, int y2) |
const char * | text (int x, int y, const char *text, int alignment=ALIGN_LEFT) |
const char * | textInAxis (float x, float y, const char *text, int alignment) |
const char * | box (int x, int y, int w, int h) |
const char * | boxWithText (int x, int y, int w, int h, int fontsize, const char *xlabel, const char *ylabel, const char *rylabel) |
const char * | rect (int x, int y, int w, int h) |
const char * | xAxis (float start, float delta, float end, int draw=1) |
const char * | yAxis (float start, float delta, float end, int draw=1) |
const char * | xGrid () |
const char * | yGrid () |
const char * | rightYAxis (float start, float delta, float end, int draw=1) |
const char * | drawSymbol (int x, int y, int type) |
const char * | line (float *x, float *y, int n, int linestayle=LINESTYLE_NONE) |
const char * | setColor (int r, int g, int b) |
const char * | setFont (const char *family, int size, int weight, int italic) |
const char * | setWidth (int w) |
const char * | setLinestyle (const char *dasharray) |
const char * | comment (const char *text) |
const char * | svg_put (const char *text) |
const char * | svg_printf (const char *format,...) |
const char * | svg_d (int *x, int *y, int count) |
const char * | svg_points (int *x, int *y, int count) |
int | getFontsize () |
int | getBoxX () |
int | getBoxY () |
int | getBoxW () |
int | getBoxH () |
Public Attributes | |
int | outputState |
Private Member Functions | |
int | perhapsSend (const char *text) |
int | tx (float x) |
int | ty (float y) |
Private Attributes | |
int * | sout |
FILE * | fout |
rlSpawn * | pipe |
rlString | filename |
rlString | outputfilename |
int | idForPvbrowser |
rlString | svg |
rlString | svg2 |
rlString | svg3 |
rlString | fontstring |
char | stroke [16] |
int | width |
rlString | dasharray |
rlString | lineoptions |
rlString | textoptions |
int | xold |
int | yold |
float | xmin |
float | dx |
float | xmax |
float | ymin |
float | dy |
float | ymax |
int | boxx |
int | boxy |
int | boxw |
int | boxh |
int | fontsize |
int | sr |
char | floatFormat [80] |
class for drawing xy-graphics and any svg graphics either on the client or on the server.
SVG (Tiny) is a flexible and powerfull graphics format.
rlSvgVdi brings some conveniance functions to draw xy-graphics with SVG and some general SVG interface functions, that produce SVG content directly.
The Output might be send to File/Socket/stdout or simply collected as a rlString with all the generated SVG.
See example within pvbaddon/demos/rlsvgvdi
HINT 1: Use rlSpawn and the rlsvgcat utility to read static SVG templates and insert the content generated by rlSvgVdi dynamically into the output stream. You might use comment strings within the SVG for controlling the filter pipeline.
HINT 2: Use this class for the purpose of generating reports in pdf
HINT 3: Use SVG converters with a commandline interface to convert SVG to png, jpg, pdf ... Examples: rsvg, imagemagick https://wiki.gnome.org/action/show/Projects/LibRsvg http://imagemagick.org/script/index.php
Definition at line 79 of file rlsvgvdi.h.
rlSvgVdi::rlSvgVdi | ( | ) |
Definition at line 40 of file rlsvgvdi.cpp.
rlSvgVdi::~rlSvgVdi | ( | ) |
Definition at line 64 of file rlsvgvdi.cpp.
const char * rlSvgVdi::box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Definition at line 354 of file rlsvgvdi.cpp.
const char * rlSvgVdi::boxWithText | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
int | fontsize, | ||
const char * | xlabel, | ||
const char * | ylabel, | ||
const char * | rylabel | ||
) |
Definition at line 368 of file rlsvgvdi.cpp.
const char * rlSvgVdi::comment | ( | const char * | text | ) |
Definition at line 677 of file rlsvgvdi.cpp.
const char * rlSvgVdi::drawEllipse | ( | int | x, |
int | y, | ||
int | rx, | ||
int | ry | ||
) |
Definition at line 273 of file rlsvgvdi.cpp.
const char * rlSvgVdi::drawSymbol | ( | int | x, |
int | y, | ||
int | type | ||
) |
Definition at line 536 of file rlsvgvdi.cpp.
int rlSvgVdi::endOutput | ( | ) |
Definition at line 163 of file rlsvgvdi.cpp.
int rlSvgVdi::getBoxH | ( | ) |
Definition at line 764 of file rlsvgvdi.cpp.
int rlSvgVdi::getBoxW | ( | ) |
Definition at line 759 of file rlsvgvdi.cpp.
int rlSvgVdi::getBoxX | ( | ) |
Definition at line 749 of file rlsvgvdi.cpp.
int rlSvgVdi::getBoxY | ( | ) |
Definition at line 754 of file rlsvgvdi.cpp.
int rlSvgVdi::getFontsize | ( | ) |
Definition at line 744 of file rlsvgvdi.cpp.
const char * rlSvgVdi::line | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2 | ||
) |
Definition at line 299 of file rlsvgvdi.cpp.
const char * rlSvgVdi::line | ( | float * | x, |
float * | y, | ||
int | n, | ||
int | linestayle = LINESTYLE_NONE |
||
) |
Definition at line 583 of file rlsvgvdi.cpp.
const char * rlSvgVdi::lineTo | ( | int | x, |
int | y | ||
) |
Definition at line 287 of file rlsvgvdi.cpp.
const char * rlSvgVdi::moveTo | ( | int | x, |
int | y | ||
) |
Definition at line 280 of file rlsvgvdi.cpp.
|
private |
Definition at line 201 of file rlsvgvdi.cpp.
const char * rlSvgVdi::rect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Definition at line 377 of file rlsvgvdi.cpp.
const char * rlSvgVdi::rightYAxis | ( | float | start, |
float | delta, | ||
float | end, | ||
int | draw = 1 |
||
) |
Definition at line 493 of file rlsvgvdi.cpp.
const char * rlSvgVdi::setColor | ( | int | r, |
int | g, | ||
int | b | ||
) |
Definition at line 609 of file rlsvgvdi.cpp.
const char * rlSvgVdi::setFont | ( | const char * | family, |
int | size, | ||
int | weight, | ||
int | italic | ||
) |
Definition at line 629 of file rlsvgvdi.cpp.
const char * rlSvgVdi::setLinestyle | ( | const char * | dasharray | ) |
Definition at line 658 of file rlsvgvdi.cpp.
int rlSvgVdi::setOutput | ( | int * | socket_out, |
int | idForPvbrowser = 0 |
||
) |
Definition at line 69 of file rlsvgvdi.cpp.
int rlSvgVdi::setOutput | ( | FILE * | fout | ) |
Definition at line 98 of file rlsvgvdi.cpp.
int rlSvgVdi::setOutput | ( | const char * | outputfilename | ) |
Definition at line 120 of file rlsvgvdi.cpp.
int rlSvgVdi::setOutput | ( | rlSpawn * | pipe | ) |
Definition at line 142 of file rlsvgvdi.cpp.
const char * rlSvgVdi::setWidth | ( | int | w | ) |
Definition at line 639 of file rlsvgvdi.cpp.
const char * rlSvgVdi::svg_d | ( | int * | x, |
int * | y, | ||
int | count | ||
) |
Definition at line 702 of file rlsvgvdi.cpp.
const char * rlSvgVdi::svg_points | ( | int * | x, |
int * | y, | ||
int | count | ||
) |
Definition at line 718 of file rlsvgvdi.cpp.
const char * rlSvgVdi::svg_printf | ( | const char * | format, |
... | |||
) |
Definition at line 690 of file rlsvgvdi.cpp.
const char * rlSvgVdi::svg_put | ( | const char * | text | ) |
Definition at line 684 of file rlsvgvdi.cpp.
const char * rlSvgVdi::svgHeader | ( | int | width = 1280 , |
int | height = 1024 , |
||
int | rbackground = 255 , |
||
int | gbackground = 255 , |
||
int | bbackground = 255 |
||
) |
const char * rlSvgVdi::svgTrailer | ( | ) |
Definition at line 266 of file rlsvgvdi.cpp.
const char * rlSvgVdi::text | ( | int | x, |
int | y, | ||
const char * | text, | ||
int | alignment = ALIGN_LEFT |
||
) |
Definition at line 330 of file rlsvgvdi.cpp.
const char * rlSvgVdi::textInAxis | ( | float | x, |
float | y, | ||
const char * | text, | ||
int | alignment | ||
) |
Definition at line 311 of file rlsvgvdi.cpp.
|
private |
Definition at line 732 of file rlsvgvdi.cpp.
|
private |
Definition at line 737 of file rlsvgvdi.cpp.
const char * rlSvgVdi::xAxis | ( | float | start, |
float | delta, | ||
float | end, | ||
int | draw = 1 |
||
) |
Definition at line 427 of file rlsvgvdi.cpp.
const char * rlSvgVdi::xGrid | ( | ) |
Definition at line 405 of file rlsvgvdi.cpp.
const char * rlSvgVdi::yAxis | ( | float | start, |
float | delta, | ||
float | end, | ||
int | draw = 1 |
||
) |
Definition at line 460 of file rlsvgvdi.cpp.
const char * rlSvgVdi::yGrid | ( | ) |
Definition at line 416 of file rlsvgvdi.cpp.
|
private |
Definition at line 140 of file rlsvgvdi.h.
|
private |
Definition at line 140 of file rlsvgvdi.h.
|
private |
Definition at line 140 of file rlsvgvdi.h.
|
private |
Definition at line 140 of file rlsvgvdi.h.
|
private |
Definition at line 132 of file rlsvgvdi.h.
|
private |
Definition at line 136 of file rlsvgvdi.h.
|
private |
Definition at line 137 of file rlsvgvdi.h.
|
private |
Definition at line 127 of file rlsvgvdi.h.
|
private |
Definition at line 143 of file rlsvgvdi.h.
|
private |
Definition at line 141 of file rlsvgvdi.h.
|
private |
Definition at line 129 of file rlsvgvdi.h.
|
private |
Definition at line 125 of file rlsvgvdi.h.
|
private |
Definition at line 128 of file rlsvgvdi.h.
|
private |
Definition at line 133 of file rlsvgvdi.h.
|
private |
Definition at line 127 of file rlsvgvdi.h.
int rlSvgVdi::outputState |
Definition at line 116 of file rlsvgvdi.h.
|
private |
Definition at line 126 of file rlsvgvdi.h.
|
private |
Definition at line 124 of file rlsvgvdi.h.
|
private |
Definition at line 142 of file rlsvgvdi.h.
|
private |
Definition at line 130 of file rlsvgvdi.h.
|
private |
Definition at line 129 of file rlsvgvdi.h.
|
private |
Definition at line 129 of file rlsvgvdi.h.
|
private |
Definition at line 129 of file rlsvgvdi.h.
|
private |
Definition at line 133 of file rlsvgvdi.h.
|
private |
Definition at line 131 of file rlsvgvdi.h.
|
private |
Definition at line 136 of file rlsvgvdi.h.
|
private |
Definition at line 136 of file rlsvgvdi.h.
|
private |
Definition at line 135 of file rlsvgvdi.h.
|
private |
Definition at line 137 of file rlsvgvdi.h.
|
private |
Definition at line 137 of file rlsvgvdi.h.
|
private |
Definition at line 135 of file rlsvgvdi.h.