GraphicsPath.AppendLineSegment(PointF) Method
Appends a line segment to the path.
Namespace: DevExpress.Docs.Pdf
Assembly: DevExpress.Docs.Pdf.v26.1.dll
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| endPoint | PointF | The end point of the line segment. |
Example
How to: Add a Lines to a Page
The following code snippet adds a rectangle to the page:
using DevExpress.Docs.Pdf;
using DevExpress.Drawing;
using DevExpress.Drawing.Printing;
using System.Drawing;
using System.IO;
using (PdfDocument pdfDocument = new PdfDocument())
{
var page = pdfDocument.Pages.Add(DXPaperKind.A4);
GraphicsPath triangle = new GraphicsPath(new PointF(410, 490));
triangle.AppendLineSegment(new PointF(480, 460));
triangle.AppendLineSegment(new PointF(550, 490));
triangle.Closed = true;
page.AddPathFragment(new PathFragment
{
Paths = { triangle },
Pen = new DXPen(Color.Black, 1),
Brush = new DXSolidBrush(Color.LightGray),
Action = PathShapeAction.FillAndStroke
});
pdfDocument.Save(new FileStream(@"C:\Test Documents\Document_upd.pdf",
FileMode.Create, FileAccess.Write));
}
See Also