Path

Represents a path with sub paths.

public class Path : TaggablePageElement, ICoordinate, ISerializable
Public Class Path
    Inherits TaggablePageElement
    Implements ICoordinate, ISerializable

Inheritance: ObjectPageElementTaggablePageElementPath

Implements: ICoordinate, ISerializable

Licensing Info

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example will display a path that incorporates several different sub paths before retuning to its starting location.
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, RgbColor.Blue, RgbColor.Yellow, _
     		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(MyPath)
     
        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
     		
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string outputPath)
    {
        // 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, RgbColor.Blue, RgbColor.Yellow, 
			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( outputPath );
    }
}

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.

Constructors

Path(Single, Single)Initializes a new instance of the Path class.
Path(Single, Single, Color)Initializes a new instance of the Path class.
Path(Single, Single, Color, Color)Initializes a new instance of the Path class.
Path(Single, Single, Color, Color, Single, LineStyle, Boolean)Initializes a new instance of the Path class.
Path(Single, Single, Color, Single, LineStyle)Initializes a new instance of the Path class.
Path(Single, Single, Color, Single, LineStyle, Boolean)Initializes a new instance of the Path class.

Properties

ClosePathGets or sets a value specifying if the path should be closed.
FillColorGets or sets the Color object to use for the fill of the path.
IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
LineCapGets or sets the LineCap enumeration used to specify the line cap style of the path's lines.
LineColorGets or sets the Color object to use for the path's lines.
LineJoinGets or sets the LineJoin enumeration used to specify the line join style of the path's lines.
LineStyleGets or sets the LineStyle object used to specify the style of the path's lines.
LineWidthGets or sets the width of the path's lines.
MiterLimitGets or sets the miter limit of the path's lines.
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
SubPathsGets SubPathList that contains a collection of SubPath objects.
TagGets or sets the tag of the taggable element.
(Inherited from TaggablePageElement)
TagOrderGets or sets the tag order of the taggable element.
(Inherited from TaggablePageElement)
XGets or set the X coordinate of the path.
YGets or sets the Y coordinate of the path.

Methods

Draw(PageWriter)Draws the path to the given PageWriter object.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.PageElements

In this topic