PDFPAGE_SetLineWidth
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method configures the line path width.

Syntax

HRESULT PDFPAGE_SetLineWidth (
DOUBLE lineWidth
)
Parameters
lineWidth
Line width (in pixels).

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 current line width (in points) to the value specified.

Equivalent in new interface: IPDFDocument4::SetLineWidth.

Example

Setting Line Width

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
for i := 1 to 10 do
begin
    PDF.PDFPAGE_SetLineWidth(i);
    PDF.PDFPAGE_MoveTo(30, 30 + (i * 20));
    PDF.PDFPAGE_LineTo(80, 80 + (i * 20));
    PDF.PDFPAGE_LineTo(130, 30 + (i * 20));
    PDF.PDFPAGE_Stroke;
end;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
for (int i = 1; i < 11; i++)
{
    PDF->PDFPAGE_SetLineWidth(i);
    PDF->PDFPAGE_MoveTo(30, 30 + (i * 20));
    PDF->PDFPAGE_LineTo(80, 80 + (i * 20));
    PDF->PDFPAGE_LineTo(130, 30 + (i * 20));
    PDF->PDFPAGE_Stroke();
}
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
for (int i = 1; i < 11; i++)
{
    PDF.PDFPAGE_SetLineWidth(i);
    PDF.PDFPAGE_MoveTo(30, 30 + (i * 20));
    PDF.PDFPAGE_LineTo(80, 80 + (i * 20));
    PDF.PDFPAGE_LineTo(130, 30 + (i * 20));
    PDF.PDFPAGE_Stroke();
}
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
For i=1 To 10
    PDF.PDFPAGE_SetLineWidth i
    PDF.PDFPAGE_MoveTo 30, 30 + (i * 20)
    PDF.PDFPAGE_LineTo 80, 80 + (i * 20)
    PDF.PDFPAGE_LineTo 130, 30 + (i * 20)
    PDF.PDFPAGE_Stroke
Next
PDF.EndDoc

See Also

Reference