I’m new here… and looking for help
I’m currently working on integrating openFrameworks into an existing setup. The goal is to enable several networked PCs to provide simple (!) content for a projector. As network bandwidth is precious, I plan on sending plain strings that contain SVG markup which will be rendered on the target PC (to which the projector is attached).
I’ve already created an interface to the existing network infrastructure/protocol so my of-app receives the strings, passes them on to ofxSVG (that comes included in the of-installer) and calls the ofxSVG.draw()-method in every app.update()-cycle. It works mostly, but for the non-working part some comments would be appreciated!
Graphical content of the SVG is rendered and displayed as expected. However, text is not rendered
Digging through the code, I found the line
ofLogWarning("ofxSVG") << "setupDiagram(): text: not implemented yet";
in ofxSVG.cpp. However, no such message shows up in my console.
Are there plans for text support in ofxSVG? If I’d want to do it myself, how much effort might it be (based on no experience with the of-datatypes, concepts etc)?
I’ve seen that there’s a separate ofxSVG-addon-on-github that seems to be a larger project (in terms of more files), but wasn’t updated for 2 years. Is this still current and should/could be used?
When I receive a new svg-string and call .draw(), its content is displayed in addition to the previous one. How can I clear the screen/svg-buffer/whatever in order to only display the current svg?
For reference, the main steps of displaying svg in my app are
// in testApp.h: create members ofxSVG svgHandler; std::string svgData; // in testApp.myCustomNetworkCallback(): received svg-string via network, save to member svgData = svgMsg.data; svgHandler.load(svgData, true); // hacked to accept strings as input (instead of loading the contents of a file) // in testApp.draw() svgHandler.draw();
- [Not directly related to ofxSVG] In my app.setup()-method, I call
. However, the “no text support”-warning from ofxSVG still doesn’t show up in the console. I’m probably missing something… but what?