PDFPAGE_NewPath
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method initializes a newly created path.

Syntax

HRESULT PDFPAGE_NewPath ()
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method clears the current path. The current point becomes undefined.

Equivalent in new interface: IPDFDocument4::ResetPath.

Example

Using the NewPath Method

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_MoveTo(100, 100);
PDF.PDFPAGE_LineTo(200, 200);
PDF.PDFPAGE_LineTo(100, 200);
{ abandon existing path and create new one }
PDF.PDFPAGE_NewPath;
PDF.PDFPAGE_Rectangle(150, 150, 310, 210);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_MoveTo(100, 100);
PDF->PDFPAGE_LineTo(200, 200);
PDF->PDFPAGE_LineTo(100, 200);
// abandon existing path and create new one
PDF->PDFPAGE_NewPath();
PDF->PDFPAGE_Rectangle(150, 150, 310, 210);
PDF->PDFPAGE_Stroke();
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_MoveTo(100, 100);
PDF.PDFPAGE_LineTo(200, 200);
PDF.PDFPAGE_LineTo(100, 200);
// abandon existing path and create new one
PDF.PDFPAGE_NewPath();
PDF.PDFPAGE_Rectangle(150, 150, 310, 210);
PDF.PDFPAGE_Stroke();
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_MoveTo 100, 100
PDF.PDFPAGE_LineTo 200, 200
PDF.PDFPAGE_LineTo 100, 200
' abandon existing path and create new one
PDF.PDFPAGE_NewPath
PDF.PDFPAGE_Rectangle 150, 150, 310, 210
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference