You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > PDF Creation > Low-level Functions > PdfBeginPath Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.PdfBeginPath Method

Begin a new subpath by moving the current point to coordinates (DstX, DstY), omitting any connecting line segment into the current page of a PDF.

C#
public PdfBeginPath(
    int PdfID, 
    Single DstX, 
    Single DstY
);
Visual Basic
Public Sub PdfBeginPath(
    ByVal PdfID As Integer, 
    ByVal DstX As Single, 
    ByVal DstY As Single
)
Parameters
Parameters 
Description 
PdfID 
A PDF identifier returned by the PdfNewPdf(), PdfOCRStart(), PdfOcrStartStream(), TwainPDFStart() or TwainPdfStartStream() function. 
DstX 
The X destination in current unit defined by the PdfSetMeasurementUnit() function.  
DstY 
The Y (from the bottom) destination in current unit defined by the PdfSetMeasurementUnit() function.  

Drawing a simple shape using stroking & filling operation. 

 

Dim oGdPictureImaging As New GdPictureImaging
Dim PdfID As Integer = oGdPictureImaging.PdfNewPdf("c:\simpletest.pdf")
 
oGdPictureImaging.SetLicenseNumber("XXX") ' Replace XXX by valid demo or commercial key
oGdPictureImaging.PdfSetMeasurementUnit(PdfMeasurementUnit.PdfMeasurementUnitMillimeter)
oGdPictureImaging.PdfNewPage(PdfID, 210, 297) 'A4
oGdPictureImaging.PdfSetFillColor(PdfID, Color.Blue)
oGdPictureImaging.PdfSetLineWidth(PdfID, 5) 'set the pen width to 5 mm
oGdPictureImaging.PdfSetStrokeColor(PdfID, Color.Red)
oGdPictureImaging.PdfBeginPath(PdfID, 100, 100)
oGdPictureImaging.PdfAddLineToPath(PdfID, 200, 100)
oGdPictureImaging.PdfAddLineToPath(PdfID, 200, 200)
oGdPictureImaging.PdfAddLineToPath(PdfID, 100, 200)
oGdPictureImaging.PdfAddCurveToPath3(PdfID, 100, 200, 50, 100, 100, 100)
oGdPictureImaging.PdfCloseAndFillAndStrokePath(PdfID)
oGdPictureImaging.PdfEndPdf(PdfID)
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.