Esempio n. 1
0
        private void BuildContent(
            Document document
            )
        {
            // Set default page size (A4)!
              document.PageSize = PageFormat.GetSize();
              // Add a font to the fonts collection!
              document.Resources.Fonts[ResourceName_DefaultFont] = new StandardType1Font(
            document,
            StandardType1Font.FamilyEnum.Courier,
            true,
            false
            );

              // Add a page to the document!
              Page page = new Page(document); // Instantiates the page inside the document context.
              document.Pages.Add(page); // Puts the page in the pages collection.

              // Create a content composer for the page content stream!
              PrimitiveComposer composer = new PrimitiveComposer(page);

              string[] steps = new string[5];
              colorSpaces::Color[] colors = new colorSpaces::Color[5];
              SizeF pageSize = page.Size;

              BuildSteps(composer, steps, colors, pageSize);

              BuildLegend(composer, steps, colors, pageSize);

              composer.Flush();
        }
        private void BuildContent(Document document)
        {
            // Set default page size (A4)!
            document.PageSize = PageFormat.GetSize();
            // Add a font to the fonts collection!
            document.Resources.Fonts[ResourceName_DefaultFont] = new StandardType1Font(
                document,
                StandardType1Font.FamilyEnum.Courier,
                true,
                false
                );

            // Add a page to the document!
            Page page = new Page(document); // Instantiates the page inside the document context.

            document.Pages.Add(page);       // Puts the page in the pages collection.

            // Create a content composer for the page content stream!
            PrimitiveComposer composer = new PrimitiveComposer(page);

            string[]             steps  = new string[5];
            colorSpaces::Color[] colors = new colorSpaces::Color[5];
            SKSize pageSize             = page.Size;

            BuildSteps(composer, steps, colors, pageSize);

            BuildLegend(composer, steps, colors, pageSize);

            composer.Flush();
        }