Represents a path with sub paths.

For a list of all members of this type, see Path Members


System.Object
   ceTe.DynamicPDF.PageElement
public class Path : PageElement 

Remarks

This class can be used to specify a collection of sub paths which will be used to complete your path. Sub paths that can be added are CurveFromSubPath, CurveSubPath, CurveToSubPath and LineSubPath.

Example

The following example will display a path that incorporates several different subpaths before retuning to its starting location.

[Visual Basic]
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule
        
    Sub Main()
        
        ' Create a PDF Document
        Dim MyDocument As Document = New Document 
        
        ' Create a Page and add it to the document
        Dim MyPage As Page = New Page
        MyDocument.Pages.Add(MyPage)

        ' Create a path
        Dim MyPath As Path = New Path(50, 150, Color.Blue, Color.Yellow, _
            Apply.Both, 3, LineStyle.Solid, True)

        ' Add some sub paths to the path 
        MyPath.SubPaths.Add(New CurveSubPath(50, 400, 300, 150, -200, 400))
        MyPath.SubPaths.Add(New LineSubPath(300, 400))
        MyPath.SubPaths.Add(New CurveToSubPath(300, 150, 50, 300))
        MyPath.SubPaths.Add(New CurveFromSubPath(150, 100, 200, -100))

        ' Add the path to the page
        MyPage.Elements.Add(path)

        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
        
    End Sub
End Module
[C#]
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{
    static void Main()
        {
        // Create a PDF Document
        Document document = new Document();

        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add( page );

        // Create a path
        Path path = new Path( 50, 150, Color.Blue, Color.Yellow, Apply.Both, 
            3, LineStyle.Solid, true );

        // Add some sub paths to the path
        path.SubPaths.Add( new CurveSubPath( 50, 400, 300, 150, -200, 400 ) );
        path.SubPaths.Add( new LineSubPath( 300, 400 ) );
        path.SubPaths.Add( new CurveToSubPath( 300, 150, 50, 300 ) );
        path.SubPaths.Add( new CurveFromSubPath( 150, 100, 200, -100 ) );

        // Add the path to the page
        page.Elements.Add( path );    

        // Save the PDF
        document.Draw( @"C:\MyDocument.pdf" );
    }
}

Requirements

Namespace: ceTe.DynamicPDF.PageElements Namespace

Assembly: DynamicPDF.Generator.[Edition].dll

See Also

Path members | ceTe.DynamicPDF.PageElements Namespace