Rendering SVG

Mar 25, 2013 at 2:29 PM
I'm using QrCode.net in a web forms project. I got it to output raster graphic qr codes but I'm having trouble with vector output to SVG. The SVGRenderer is asking for GColor darkcolor and GColor lightcolor.

I can not figure out how to define the darkcolor and lightcolor. From the GColor class I see it's looking for RGBA values but everything I try is not working.

Can you give an example of initializing the SVGRenderer?

Also in the documentation you talk about setting the viewbox width and height inside the renderer. Are these attributes available after the renderer is initialized?

Thank You!
Mar 25, 2013 at 3:17 PM
Sorry for the double post. I found the answer I was looking for in the QRCodeNet Demo in the source code section. In case others are looking:

http://qrcodenet.codeplex.com/SourceControl/changeset/view/73a7d2eead68#Gma.QrCodeNet/Gma.QrCodeNet.Demo/MainForm.cs
Coordinator
Mar 25, 2013 at 5:37 PM
GColor is for either color structure from system.drawing or the one from WPF. It's a wrapper. They only exist for EPS and SVG renderer.

Width and height is set up inside ISizeCalculation. You can still change ISizeCalculation inside renderer after initialize.
Nov 16, 2013 at 11:11 PM
Had this same problem, the types you are looking for are FormColor or Media color
SVGRenderer render = new SVGRenderer(new FixedCodeSize(200, QuietZoneModules.Two), new FormColor(System.Drawing.Color.Black), new FormColor(System.Drawing.Color.White));