Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
The function sets the current stroke color as an list of values.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
values | The values for the colors. | 0 |
Returns OK or error message.
See also SetStrokeColor function in DynaPDF manual.
Sets color to red:
MBS( "DynaPDF.SetStrokeColor"; $PDF; 1.0; 0.0; 0.0 )
Sets color to blue:
MBS( "DynaPDF.SetStrokeColor"; $PDF; 0.0; 0.0; 1.0 )
Draw two lines in black:
Set Variable [$r; Value:MBS ( "DynaPDF.SetStrokeColor" ; $pdf ; 0; 0; 0 )]
Set Variable [$r; Value:MBS ( "DynaPDF.SetLineWidth" ; $pdf ; 1 )]
Set Variable [$r; Value:MBS ( "DynaPDF.MoveTo" ; $pdf ; 20; 20)]
Set Variable [$r; Value:MBS ( "DynaPDF.LineTo" ; $pdf ; 20; 40)]
Set Variable [$r; Value:MBS ( "DynaPDF.MoveTo" ; $pdf ; 30; 30)]
Set Variable [$r; Value:MBS ( "DynaPDF.LineTo" ; $pdf ; 30; 50)]
Set Variable [$r; Value:MBS ( "DynaPDF.StrokePath" ; $pdf)]
Set color with integer values in range of 0 to 255:
MBS( "DynaPDF.SetStrokeColor"; $PDF; $red / 255.0; $green / 255.0; /blue / 255.0 )
Created 18th August 2014, last changed 6th September 2019
DynaPDF.SetSeparationInfo - DynaPDF.SetStrokeColorValue
Feedback: Report problem or ask question.