using it in XNA?

May 22, 2009 at 10:18 PM

hi, it is possible to use this in XNA?

SvgRenderer svgRenderer = SvgRenderer.FromGraphics(this.GraphicsDevice);

svgRenderer.ScaleTransform(
                this.GraphicsDevice.Viewport.Width / 1280,
                this.GraphicsDevice.Viewport.Height / 720);

 

SvgDocument sd = new SvgDocument();
sd = SvgDocument.Open(@"C:\temp\svg.svg");

 

then render a svg to a specific position on screen by attaching some scale/ rotate / position transforms or to Texture2D object

greets aruss

 

Coordinator
Jun 1, 2009 at 5:44 AM

Hi Aruss,

Sorry for taking so long to get back to you. I actually don't have any experience with XNA so really can't say unfortunately. The XNA GraphicsDevice class doesn't seem to even slightly resemble the Graphics class so I'm not sure an easy port would even be possible.

There must be some 2D based XNA APIs that can be used but again, I don't know about that.

Sorry about that!

Cheers
Scriv

Jun 5, 2009 at 5:04 PM

Hi,

it would be possible to pass through a xna primitive batch or something if a SvgRenderer would use a Iterface for drawing primitives instead of winforms graphics.

I have to look deeply at it all, it was just a quick try.

cheers
aruss