Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  


The function sets the current fill color as an array of float values.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.1 Yes Yes Yes Yes Yes

MBS( "DynaPDF.SetFillColor"; PDF; values )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
values The values for the colors. 0


Returns OK or error message.


The function sets the current fill color as an array of float values.
The components of non-Lab color spaces must be in the range from 0 through 1. The *a and *b components of a Lab color space are typically in a range from -128 though 127. The *L component ranges from 0 through 100.
The number of components must match the number of components of the underlying color space.
For a grayscale color, please pass 3 times the gray level for a RGB color.

See also SetFillColor function in DynaPDF manual.


Sets color to red:

MBS( "DynaPDF.SetFillColor"; $PDF; 1.0; 0.0; 0.0 )

Sets color to blue:

MBS( "DynaPDF.SetFillColor"; $PDF; 0.0; 0.0; 1.0 )

Sets color to middle level gray:

MBS( "DynaPDF.SetFillColor"; $PDF; 0.5; 0.5; 0.5 )

Write in CMYK:

# switch to CMYK
Variable setzen [$r; Wert:MBS( "DynaPDF.SetColorSpace"; $pdf; "DeviceCMYK" )]
# set color to Cyan
Variable setzen [$r; Wert:MBS("DynaPDF.SetFillColor"; $pdf; 1; 0; 0; 0)]
# Write some text
Variable setzen [$r; Wert:MBS("DynaPDF.WriteText"; $pdf; 100; $x; "Some cyan text")]
# now switch back to RGB
Variable setzen [$r; Wert:MBS( "DynaPDF.SetColorSpace"; $pdf; "DeviceRGB" )]

See also

Example Databases

DynaPDF.SetFieldToolTip   -   DynaPDF.SetFloatPrecision

Feedback: Report problem or ask question.

MBS Xojo Plugins