ADD POLYGON EXAMPLE

The following .NET application has been developed using ABCpdf, ASP.NET, and the C# language.

This ABCpdf example adds a polygon to the current page.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Text;
using System.Net;
using System.IO;
using WebSupergoo.ABCpdf8;

namespace ABCpdfExamples
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // ---- Adds a polygon to the current page ----
            Doc doc = new Doc();
            doc.Width = 80;
            doc.Color.String = "255 0 0";
            doc.AddPoly("124 158 300 700 476 158 15 493 585 493 
            124 158", true);
            doc.Color.String = "0 255 0 a128";
            doc.AddPoly("124 158 300 700 476 158 15 493 585 493 
            124 158", false);
            doc.Save(Server.MapPath("~/Results/Output.pdf"));
            doc.Clear();
        }
    }
}

Add Polygon

© 1997-2021    Codehacker - All Rights Reserved