Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Graphics
Collapse All

This method configures the line end style for an open sub-path.

Syntax

HRESULT SetLineCapStyle (
LineCapStyle lineCap
)
Parameters
lineCap
Style of the line cap

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

Remarks

This method sets the style of the shape to be used at the ends of open sub-paths and dashes, if any, when the sub-paths are stroked.

Example

Line Cap Styles

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.SetLineWidth(10);

PDF.SetLineCapStyle(lcsButtEnd);
PDF.MoveTo(30, 30);
PDF.DrawLineTo(130, 30);
PDF.Stroke;

PDF.SetLineCapStyle(lcsRound);
PDF.MoveTo(30, 50);
PDF.DrawLineTo(130, 50);
PDF.Stroke;

PDF.SetLineCapStyle(lcsProjectingSquare);
PDF.MoveTo(30, 70);
PDF.DrawLineTo(130, 70);
PDF.Stroke;

PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->SetLineWidth(10);

PDF->SetLineCapStyle(lcsButtEnd);
PDF->MoveTo(30, 30);
PDF->DrawLineTo(130, 30);
PDF->Stroke();

PDF->SetLineCapStyle(lcsRound);
PDF->MoveTo(30, 50);
PDF->DrawLineTo(130, 50);
PDF->Stroke();

PDF->SetLineCapStyle(lcsProjectingSquare);
PDF->MoveTo(30, 70);
PDF->DrawLineTo(130, 70);
PDF->Stroke();

PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.SetLineWidth(10);

PDF.SetLineCapStyle(LineCapStyle.lcsButtEnd);
PDF.MoveTo(30, 30);
PDF.DrawLineTo(130, 30);
PDF.Stroke();

PDF.SetLineCapStyle(LineCapStyle.lcsRound);
PDF.MoveTo(30, 50);
PDF.DrawLineTo(130, 50);
PDF.Stroke();

PDF.SetLineCapStyle(LineCapStyle.lcsProjectingSquare);
PDF.MoveTo(30, 70);
PDF.DrawLineTo(130, 70);
PDF.Stroke();

PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.SetLineWidth 10

PDF.SetLineCapStyle 0 'LineCapStyle.lcsButtEnd = 0
PDF.MoveTo 30, 30
PDF.DrawLineTo 130, 30
PDF.Stroke

PDF.SetLineCapStyle 1 'LineCapStyle.lcsRound = 1
PDF.MoveTo 30, 50
PDF.DrawLineTo 130, 50
PDF.Stroke

PDF.SetLineCapStyle 2 'LineCapStyle.lcsProjectingSquare = 2
PDF.MoveTo 30, 70
PDF.DrawLineTo 130, 70
PDF.Stroke

PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots