PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllSets stroke color to specified color values.
|
| HRESULT PDFPAGE_SetColorStroke ( DOUBLE colorComponent1, DOUBLE colorComponent2, DOUBLE colorComponent3, DOUBLE colorComponent4 ) |
Parameters
colorComponent1
Value for 1st color component.
colorComponent2
Value for 2nd color component.
colorComponent3
Value for 3rd color component.
colorComponent4
Value for 4th color component.
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
PDFPAGE_SetColorStroke sets stroke color to specified color values. Color values are interpreted using current color mapping profile. Values should be in the range [0..1]. If current color mapping profile using less then 4 color components then superfluous color components are ignored (you can pass 0 for them).
Example
Using PDFPAGE_SetColorStroke method
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetDefaultCMYKColorSpace;
{ Replace line above to this one: }
{ PDF.PDFPAGE_SetDefaultRGBColorSpace }
{ the CMYK color (0.7, 0.3, 0.8, 0.2) will be replaced }
{ by RGB color (0.7, 0.3, 0.8) }
PDF.PDFPAGE_SetColorStroke(0.7, 0.3, 0.8, 0.2);
PDF.PDFPAGE_Rectangle(10, 10, 110, 110);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created PDF->BeginDoc(); PDF->PDFPAGE_SetDefaultCMYKColorSpace(); // Replace line above to this one: // PDF->PDFPAGE_SetDefaultRGBColorSpace // the CMYK color (0.7, 0.3, 0.8, 0.2) will be replaced // by RGB color (0.7, 0.3, 0.8) PDF->PDFPAGE_SetColorStroke(0.7, 0.3, 0.8, 0.2); PDF->PDFPAGE_Rectangle(10, 10, 110, 110); PDF->PDFPAGE_Stroke(); PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created PDF.BeginDoc(); PDF.PDFPAGE_SetDefaultCMYKColorSpace(); // Replace line above to this one: // PDF.PDFPAGE_SetDefaultRGBColorSpace // the CMYK color (0.7, 0.3, 0.8, 0.2) will be replaced // by RGB color (0.7, 0.3, 0.8) PDF.PDFPAGE_SetColorStroke(0.7, 0.3, 0.8, 0.2); PDF.PDFPAGE_Rectangle(10, 10, 110, 110); PDF.PDFPAGE_Stroke(); PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created PDF.BeginDoc PDF.PDFPAGE_SetDefaultCMYKColorSpace ' Replace line above to this one: ' PDF.PDFPAGE_SetDefaultRGBColorSpace ' the CMYK color (0.7, 0.3, 0.8, 0.2) will be replaced ' by RGB color (0.7, 0.3, 0.8) PDF.PDFPAGE_SetColorStroke 0.7, 0.3, 0.8, 0.2 PDF.PDFPAGE_Rectangle 10, 10, 110, 110 PDF.PDFPAGE_Stroke PDF.EndDoc
See Also


