PDFPAGE_ClosePath
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method closes the created path.

Syntax

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

Remarks

This method closes a path by connecting the first and the last point of the constructed path. A call to this procedure is often needed to avoid a notch in a stroked path and to make a line join work correctly in joining the first and the last points.

Equivalent in new interface: IPDFDocument4::ClosePath.

Example

Close Path Example

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);
{ close path, add a line from (100, 200) to (100, 100) }
PDF.PDFPAGE_ClosePath;
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);
// close path, add a line from (100, 200) to (100, 100)
PDF->PDFPAGE_ClosePath();
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);
// close path, add a line from (100, 200) to (100, 100)
PDF.PDFPAGE_ClosePath();
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
' close path, add a line from (100, 200) to (100, 100)
PDF.PDFPAGE_ClosePath
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference