#include <rlsvganimator.h>
Public Member Functions | |
rlSvgAnimator () | |
virtual | ~rlSvgAnimator () |
int | setSocket (int *socket) |
int | setId (int Id) |
int | read (const char *infile, rlIniFile *inifile=NULL) |
int | writeSocket () |
The following methods are for modifying a object within a SVG graphic identified by objectname. | |
int | svgPrintf (const char *objectname, const char *tag, const char *format,...) |
int | svgRecursivePrintf (const char *objectname, const char *tag, const char *format,...) |
int | svgSearchAndReplace (const char *objectname, const char *tag, const char *before, const char *after) |
int | svgRecursiveSearchAndReplace (const char *objectname, const char *tag, const char *before, const char *after) |
int | svgTextPrintf (const char *objectname, const char *format,...) |
int | svgRemoveStyleOption (const char *objectname, const char *option) |
int | svgRecursiveRemoveStyleOption (const char *objectname, const char *option) |
int | svgChangeStyleOption (const char *objectname, const char *option, const char *value) |
int | svgRecursiveChangeStyleOption (const char *objectname, const char *option, const char *value) |
int | svgSetStyleOption (const char *objectname, const char *value) |
int | svgRecursiveSetStyleOption (const char *objectname, const char *value) |
int | show (const char *objectname, int state) |
int | setMatrix (const char *objectname, float sx, float alpha, float x0, float y0, float cx, float cy) |
int | setMatrix (const char *objectname, rlSvgPosition &pos) |
The following methods are for moveing and zooming the whole SVG identified by mainObject. default: main. | |
int | setMainObject (const char *main_object) |
const char * | mainObject () |
int | setXY0 (float x0, float y0) |
float | x0 () |
float | y0 () |
int | setMouseXY0 (float x0, float y0) |
float | mouseX0 () |
float | mouseY0 () |
int | setMouseXY1 (float x1, float y1) |
float | mouseX1 () |
float | mouseY1 () |
int | setScale (float scale) |
float | scale () |
int | zoomCenter (float newScale) |
int | zoomRect () |
int | setMainObjectMatrix () |
int | setWindowSize (int width, int height) |
float | windowWidth () |
float | windowHeight () |
int | moveMainObject (float x, float y) |
Public Attributes | |
int | isModified |
Private Member Functions | |
int | tcpsend (const char *buf, int len) |
int | fillIniFile (rlIniFile *inifile, const char *line) |
int | fileFillIniFile (const char *infile, rlIniFile *inifile) |
Private Attributes | |
int | inifileState |
int | inifileCount |
rlSpreadsheetCell | inifileID |
rlSpreadsheetTable | inifileTable |
int * | s |
int | id |
float | svgX0 |
float | svgY0 |
float | svgWindowWidth |
float | svgWindowHeight |
float | svgScale |
float | svgMouseX0 |
float | svgMouseY0 |
float | svgMouseX1 |
float | svgMouseY1 |
rlString | main_object_name |
This class allows you to animate SVG graphics within pvbrowser. First the SVG is send to pvbrowser. Then you may modify the SVG within the pvbrowser client.
Definition at line 48 of file rlsvganimator.h.
rlSvgAnimator::rlSvgAnimator | ( | ) |
Definition at line 113 of file rlsvganimator.cpp.
|
virtual |
Definition at line 129 of file rlsvganimator.cpp.
|
private |
Definition at line 697 of file rlsvganimator.cpp.
|
private |
Definition at line 639 of file rlsvganimator.cpp.
const char * rlSvgAnimator::mainObject | ( | ) |
Definition at line 722 of file rlsvganimator.cpp.
float rlSvgAnimator::mouseX0 | ( | ) |
Definition at line 753 of file rlsvganimator.cpp.
float rlSvgAnimator::mouseX1 | ( | ) |
Definition at line 771 of file rlsvganimator.cpp.
float rlSvgAnimator::mouseY0 | ( | ) |
Definition at line 758 of file rlsvganimator.cpp.
float rlSvgAnimator::mouseY1 | ( | ) |
Definition at line 776 of file rlsvganimator.cpp.
int rlSvgAnimator::moveMainObject | ( | float | x, |
float | y | ||
) |
move MainObject to position
Definition at line 857 of file rlsvganimator.cpp.
int rlSvgAnimator::read | ( | const char * | infile, |
rlIniFile * | inifile = NULL |
||
) |
read SVG file infile and load it into the pvbrowser client. if inifile is given inifile will be set with properties within the SVG XML file. The id's of the SVG objects will result in section names of the inifile.
Definition at line 171 of file rlsvganimator.cpp.
float rlSvgAnimator::scale | ( | ) |
Definition at line 788 of file rlsvganimator.cpp.
int rlSvgAnimator::setId | ( | int | Id | ) |
initialize the id with the pvbrowser object id
Definition at line 277 of file rlsvganimator.cpp.
int rlSvgAnimator::setMainObject | ( | const char * | main_object | ) |
set/get the name of the MainObject . The object name holding the whole SVG graphic. default: main
Definition at line 714 of file rlsvganimator.cpp.
int rlSvgAnimator::setMainObjectMatrix | ( | ) |
sets the MainObject matrix according to scale,x0,y0
Definition at line 832 of file rlsvganimator.cpp.
int rlSvgAnimator::setMatrix | ( | const char * | objectname, |
float | sx, | ||
float | alpha, | ||
float | x0, | ||
float | y0, | ||
float | cx, | ||
float | cy | ||
) |
set transformation matrix of object
Definition at line 564 of file rlsvganimator.cpp.
int rlSvgAnimator::setMatrix | ( | const char * | objectname, |
rlSvgPosition & | pos | ||
) |
The following methods are for moveing and zooming the whole SVG identified by mainObject. default: main.
set transformation matrix of object
Definition at line 558 of file rlsvganimator.cpp.
int rlSvgAnimator::setMouseXY0 | ( | float | x0, |
float | y0 | ||
) |
set/get mouse position 0 for the MainObject
Definition at line 745 of file rlsvganimator.cpp.
int rlSvgAnimator::setMouseXY1 | ( | float | x1, |
float | y1 | ||
) |
set/get mouse position 1 for the MainObject
Definition at line 763 of file rlsvganimator.cpp.
int rlSvgAnimator::setScale | ( | float | scale | ) |
set/get the scaling factor for the MainObject
Definition at line 781 of file rlsvganimator.cpp.
int rlSvgAnimator::setSocket | ( | int * | socket | ) |
initialize the socket with pvbrowser p->s
Definition at line 270 of file rlsvganimator.cpp.
int rlSvgAnimator::setWindowSize | ( | int | width, |
int | height | ||
) |
call this method when the widget is resized
Definition at line 839 of file rlsvganimator.cpp.
int rlSvgAnimator::setXY0 | ( | float | x0, |
float | y0 | ||
) |
set/get x0,y0 coordinates for the MainObject
Definition at line 727 of file rlsvganimator.cpp.
int rlSvgAnimator::show | ( | const char * | objectname, |
int | state | ||
) |
hide/show object state := 0=hide 1=show
Definition at line 541 of file rlsvganimator.cpp.
int rlSvgAnimator::svgChangeStyleOption | ( | const char * | objectname, |
const char * | option, | ||
const char * | value | ||
) |
change a style option of "objectname". option must end with ':'. Example: option="stroke:" value="#000000"
Definition at line 473 of file rlsvganimator.cpp.
int rlSvgAnimator::svgPrintf | ( | const char * | objectname, |
const char * | tag, | ||
const char * | format, | ||
... | |||
) |
change a property of tag = "name="
Definition at line 306 of file rlsvganimator.cpp.
int rlSvgAnimator::svgRecursiveChangeStyleOption | ( | const char * | objectname, |
const char * | option, | ||
const char * | value | ||
) |
recursively change a style option of "objectname". option must end with ':'. Example: option="stroke:" value="#000000"
Definition at line 491 of file rlsvganimator.cpp.
int rlSvgAnimator::svgRecursivePrintf | ( | const char * | objectname, |
const char * | tag, | ||
const char * | format, | ||
... | |||
) |
recursively change a property of tag = "name="
Definition at line 341 of file rlsvganimator.cpp.
int rlSvgAnimator::svgRecursiveRemoveStyleOption | ( | const char * | objectname, |
const char * | option | ||
) |
recursively remove a style option of "objectname". option must end with ':'. Example: option="stroke:"
Definition at line 457 of file rlsvganimator.cpp.
int rlSvgAnimator::svgRecursiveSearchAndReplace | ( | const char * | objectname, |
const char * | tag, | ||
const char * | before, | ||
const char * | after | ||
) |
recursively search for "before" within "tag=" property and replace it with "after". You may use wildcards within "before"
Definition at line 390 of file rlsvganimator.cpp.
int rlSvgAnimator::svgRecursiveSetStyleOption | ( | const char * | objectname, |
const char * | value | ||
) |
recursively set a style option of "objectname". option must end with ':'. Example: value="fill:#9d9d9d;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
Definition at line 525 of file rlsvganimator.cpp.
int rlSvgAnimator::svgRemoveStyleOption | ( | const char * | objectname, |
const char * | option | ||
) |
remove a style option of "objectname". option must end with ':'. Example: option="stroke:"
Definition at line 441 of file rlsvganimator.cpp.
int rlSvgAnimator::svgSearchAndReplace | ( | const char * | objectname, |
const char * | tag, | ||
const char * | before, | ||
const char * | after | ||
) |
search for "before" within "tag=" property and replace it with "after". You may use wildcards whin "before"
Definition at line 372 of file rlsvganimator.cpp.
int rlSvgAnimator::svgSetStyleOption | ( | const char * | objectname, |
const char * | value | ||
) |
set a style option of "objectname". option must end with ':'. Example: value="fill:#9d9d9d;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
Definition at line 509 of file rlsvganimator.cpp.
int rlSvgAnimator::svgTextPrintf | ( | const char * | objectname, |
const char * | format, | ||
... | |||
) |
change the text of "objectname"
Definition at line 408 of file rlsvganimator.cpp.
|
private |
Definition at line 133 of file rlsvganimator.cpp.
float rlSvgAnimator::windowHeight | ( | ) |
Definition at line 852 of file rlsvganimator.cpp.
float rlSvgAnimator::windowWidth | ( | ) |
Definition at line 847 of file rlsvganimator.cpp.
int rlSvgAnimator::writeSocket | ( | ) |
The following methods are for modifying a object within a SVG graphic identified by objectname.
update the SVG graphic with: gBeginDraw(p,id); d->svgAnimator.writeSocket(); gEndDraw(p);
Definition at line 284 of file rlsvganimator.cpp.
float rlSvgAnimator::x0 | ( | ) |
Definition at line 735 of file rlsvganimator.cpp.
float rlSvgAnimator::y0 | ( | ) |
Definition at line 740 of file rlsvganimator.cpp.
int rlSvgAnimator::zoomCenter | ( | float | newScale | ) |
zooms the whole SVG graphic keeping it centered to the viewport
Definition at line 793 of file rlsvganimator.cpp.
int rlSvgAnimator::zoomRect | ( | ) |
zooms the whole SVG graphic so that the visible section is from x0,x0 to x1,y1
Definition at line 811 of file rlsvganimator.cpp.
|
private |
Definition at line 138 of file rlsvganimator.h.
|
private |
Definition at line 134 of file rlsvganimator.h.
|
private |
Definition at line 135 of file rlsvganimator.h.
|
private |
Definition at line 134 of file rlsvganimator.h.
|
private |
Definition at line 136 of file rlsvganimator.h.
int rlSvgAnimator::isModified |
Definition at line 128 of file rlsvganimator.h.
|
private |
Definition at line 141 of file rlsvganimator.h.
|
private |
Definition at line 137 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.
|
private |
Definition at line 140 of file rlsvganimator.h.