4

I want to create a SVG image programmatically using preferably c++ from some image points. Can anyone help me with that?

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
Bilal Mujeeb
  • 76
  • 1
  • 1
  • 5
  • 2
    Can you show us what you've tried so far (you can edit it into your answer)? But since SVG is just XML, have you seen: [what's the easiest way to generate xml in c++?](http://stackoverflow.com/questions/303371/whats-the-easiest-way-to-generate-xml-in-c) – mercator Sep 12 '11 at 20:42
  • I have urdu letters (basic language alphabets) in png format, I have extracted the point cloud (points with reference to center of mass) and wish to create a scalable vector graphic file that need not to be drawn with every zoom or other action and will not pixalize. – Bilal Mujeeb Sep 12 '11 at 22:03

2 Answers2

7

simple-svg is a header only svg lib easy to use: simple_svg_1.0.0

Here is an example how to use it: main_1.0.0.cpp

It is also hosted on GitHub.

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90
0

You could check out LibBoard. I have no experience with it myself, so I can't vouch for its usefulness, but it does appear to be what you're looking for. I'm not sure how complicated your target image is going to be, but the website states:

For now, LibBoard can handle primitives like lines, rectangles, triangles, polylines, circles, ellipses and text.

In future releases, bitmap insertion should be supported.

See the TODO file for a list of features that should be added in future releases.

So you'll have basic functionality from it, and you can probably mess around with the basic list of shapes to create some pretty complicated images.

BenMorel
  • 34,448
  • 50
  • 182
  • 322