SoLost
asked on
How to draw an ARC using iTextSharp
Hi there,
I have been producing my own pdf documents using VB.NET and iTextSharp. So far it has all been going ok but I can't seem to be able to draw an arc. No matter what I try it always seems to end up being a straight line.
Can someone please help me.
I have tried many different combinations of values. The line that is generated moves but is still a straight line.
I'm trying to draw half of an ellipse.
I have been producing my own pdf documents using VB.NET and iTextSharp. So far it has all been going ok but I can't seem to be able to draw an arc. No matter what I try it always seems to end up being a straight line.
Can someone please help me.
I have tried many different combinations of values. The line that is generated moves but is still a straight line.
I'm trying to draw half of an ellipse.
Dim FileStream as new IO.FileStream("C:\test.pdf", IO.FileMode.Create)
Dim doc As new Document
Dim writer As iTextSharp.text.pdf.PdfWriter = pdf.PdfWriter.GetInstance(doc, FileStream)
Dim cb As PdfContentByte = writer.DirectContent
doc.SetPageSize(PageSize.A4)
cb.Arc(100, 100, 100, 200, 135, 180)
cb.Stroke()
FileStream.Close()
FileStream.Dispose()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.