Example #1
0
 public void ExportSvgToPng(IconFileInfo svgFile, PngFileInfo pngFile)
 {
     _logger.InfoFormat("Exporting: {0}->{1}", svgFile.Name, pngFile.Name);
     var incscapeExe = GetInkscapeExe();
     var arguments = string.Format("-z -e \"{0}\" -w {2} -h {2} \"{1}\" ", pngFile.FullName, svgFile.FullName, pngFile.Size);
     var exitCode = _processProvider.StartProcess(incscapeExe, arguments);
     if (exitCode != 0)
     {
         throw new NMultiToolException("Failed to export svg to png file. Exit code: " + exitCode);
     }
     if (!pngFile.Exists)
     {
         throw new NMultiToolException("Failed to export svg to png. Png file has not been created: " + pngFile.FullName);
     }
     pngFile.ModfiedTime = svgFile.ModfiedTime;
 }
Example #2
0
 public IconInfo(string svgFileName, int[] sizes)
 {
     SvgFile = new IconFileInfo(svgFileName);
     Sizes = sizes;            
 }
Example #3
0
 public IconInfo(string svgFileName, int[] sizes)
 {
     SvgFile = new IconFileInfo(svgFileName);
     Sizes   = sizes;
 }