Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                Page page = Page.LetterHorizontalMillimeters;

                string svgText = CheckerBoardBuilder.BuildSvg(page, 10, 8, 25.0f);

                string baseFileName = "CheckerBoard";
                string svgFilePath  = Path.Combine(
                    Directory.GetCurrentDirectory(),
                    baseFileName + ".svg");
                Save(svgText, svgFilePath);

                string pdfFilePath = Path.Combine(
                    Directory.GetCurrentDirectory(),
                    baseFileName + ".pdf");
                InkScapeSupport.ConvertSvgToPdf(svgFilePath, pdfFilePath);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            finally
            {
                Console.WriteLine("Done");
                Console.ReadLine();
            }
        }
		public static string BuildSvg(Page page, int xCount, int yCount, float squareLength)
		{
			CheckerBoardBuilder gridBuilder = new CheckerBoardBuilder(page, xCount, yCount, squareLength);
			return gridBuilder.BuildSvg();
		}
Ejemplo n.º 3
0
        public static string BuildSvg(Page page, int xCount, int yCount, float squareLength)
        {
            CheckerBoardBuilder gridBuilder = new CheckerBoardBuilder(page, xCount, yCount, squareLength);

            return(gridBuilder.BuildSvg());
        }