Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Jul 25, 2014 5:28 am

Hi,
How can I draw a line with an arrow head and rotate the arrow?
Andre

cossee
 
Posts: 2
Joined: Tue Apr 15, 2014 5:01 pm

Fri Jul 25, 2014 7:31 am

Hello,

Thanks for your inquiry.
At present sorry that we have no direct solution to draw a line with an arrow. But you could try to draw three lines by calculating the start point and end point of every line to put them together and control their direction.

Code: Select all
static void Main(string[] args)
        {
            PdfDocument document = new PdfDocument();
            PdfPageBase page = document.Pages.Add();
            DrawPath(page);
            document.SaveToFile("DrawShape.pdf");
            System.Diagnostics.Process.Start("DrawShape.pdf");
        }
        static void DrawPath(PdfPageBase page)
        {
            PdfPath path = new PdfPath();

            path.AddLine(new PointF(40, 50), new PointF(90, 100));
            path.AddLine(new PointF(40, 50), new PointF(45, 70));

            PdfPen pen = new PdfPen(Color.DeepSkyBlue, 0.02f);
            page.Canvas.DrawPath(pen, path);
        }


Best wishes,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Tue Jul 29, 2014 8:54 am

Hello,

Has your issue been resolved?
Thanks for your feedback.

Best wishes,
Amy
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF