-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write SVG file #2
Comments
@paolofulgoni I’m sure it can be added, I found an issue with the rendering using image sharp (due to winding rule support). How ever this has now been fixed but not had chance to update library as of yet. |
I'm afraid my question wasn't very clear. What I'd like to do is to create the XML file, not a rendered image. To give you a bit more context, I'm currently using another library to do that job, but unfortunately it's not fully cross-platform because of the |
@paolofulgoni Have you checked out NGraphics ? |
@rafntor thanks for the suggestion! I took a quick look at it, looks interesting |
Import/export yes, but also more - this little example creates from scratch & saves SVG (including custom 'ID') void make_svg()
{
var graphic = new NGraphics.Graphic(new NGraphics.Size(100));
graphic.Children.Add(new NGraphics.Rectangle( // add blue rectangle
new NGraphics.Rect(graphic.Size), NGraphics.Size.Zero, NGraphics.Pens.Black, NGraphics.Brushes.Blue));
graphic.Children.Add(new NGraphics.Ellipse( // add yellow circle
new NGraphics.Rect(10, 10, 30, 30), null, NGraphics.Brushes.Yellow));
graphic.Children[0].Id = "Custom-Element-Id"; // set custom element-id
using (var file = System.IO.File.CreateText(@"c:\temp\moon.svg"))
{
var writer = new NGraphics.SvgWriter(graphic, file);
writer.Write();
}
} View/inspect the result in Edge gives ; (Sorry team |
I'd like to use the
EquinoxLabs.SVGSharpie
library to create SVG documents programmatically and save them to disk.I'm afraid this isn't a use case that you considered. For example I couldn't find methods to write an
SvgDocument
to file.Do you think that this feature could be added? Or is it out of scope?
The text was updated successfully, but these errors were encountered: