Home » Developing U++ » UppHub » SvgDraw
SvgDraw [message #14814] |
Sat, 15 March 2008 18:17  |
kodos
Messages: 111 Registered: March 2008
|
Experienced Member |
|
|
Hi,
I have written a SvgDraw class to write SVG files. The most common features of the Draw class are supported right now. Credits also have to go to mrjt for some help .
If I get a test case for features that aren't implemented yet, I will try to implement them .
Simple example:
SvgDraw draw(450, 450);
draw.DrawText(10, 10, "Hello World", Roman(30).Bold());
SaveFile(_fileName + ".svg", draw.Finish());
Changelog:
19 March 2008:
- Fixed some TODOs around clipping and offset
- Added SVGZ support. (Call Finish(true) )
- Added some CSS in the header of the file to reduce the size of bigger images.
-
Attachment: SvgDraw.7z
(Size: 3.11KB, Downloaded 388 times)
[Updated on: Thu, 20 March 2008 18:12] Report message to a moderator
|
|
|
|
|
|
|
Re: SvgDraw [message #14945 is a reply to message #14931] |
Fri, 21 March 2008 11:24   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
kodos wrote on Thu, 20 March 2008 13:31 | Thanks for the info 
I updated the first post.
luzr wrote on Wed, 19 March 2008 09:40 | However, the real question: Does SVG embed fonts? IMO, it should, just like PDF.
|
It is possible to embed fonts in SVG but:
1) I have written this for generating images for the web, and with fonts in the file, the file size grows very fast.
2) I haven't found an example which actually works in any viewer I have (Firefox3 beta, Opera 9.5 beta, Incsape)
|
OK.
Hm, maybe the right policy is to convert glyphs to curves, but I guess that is far beyond what we can do now 
Mirek
|
|
|
|
Goto Forum:
Current Time: Fri May 09 18:04:28 CEST 2025
Total time taken to generate the page: 0.02669 seconds
|