Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  


Creates an axial sharing.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 10.2 Yes Yes Yes Yes Yes
MBS( "DynaPDF.CreateAxialShading"; PDF; sX; sY; eX; eY; SCenter; SColor; EColor { ; Extend1; Extend2 } )   More


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
sX X-Coordinate of the start point 0
sY Y-Coordinate of the start point 0
eX X-Coordinate of the end point 0
eY Y-Coordinate of the end point 78
SCenter Shading center 2
SColor Start color MBS("DynaPDF.RGB"; 120; 120; 220)
EColor End color MBS("DynaPDF.RGB"; 255; 255; 255) /* white */
Extend1 Optional
Extend the shading beyond the start point.
Pass 1 to extend or 0 if not. Default is 0.
Extend2 Optional
Extend the shading beyond the end point.
Pass 1 to extend or 0 if not. Default is 0.


Returns number or error.


Creates an axial sharing.
Axial shadings define a color blend or gradient that varies along a linear axis between two endpoints and extends indefinitely perpendicular to that axis. The shading may optionally be extended beyond either or both endpoints by continuing the boundary colors indefinitely.
The shading center defines the point from where the first color will blend into the other. A value of 1 determines the exact center between the starting and ending point of the shading. Smaller values shift the shading center in direction to the start point, greater values in the direction to the end point.
Axial shadings can be drawn into a clipping path to restrict painting into this path. If the shading is drawn outside of a clipping path it is applied to the entire page. Not that extended shadings are opaque, objects behind the shading becomes invisible if they are overprinted by the shading.
Shadings are drawn by using the current coordinate system. It is recommended to understand that shadings have its own dimension like a normal shape. The parameters Extend1 and Extend2 extend the shading beyond its dimension. If the shading is extended it must normally be drawn into a clipping path to avoid overprinting of other objects.
Shadings support the color spaces DeviceGray, DeviceRGB, and DeviceCMYK. The color values of the start and end color must be defined in the current color space. See also DynaPDF.SetColorSpace.
Shadings are invisible as long they are not drawn by using the function DynaPDF.ApplyShading. DynaPDF.ApplyShading requires a shading handle that was returned by this function.
If the function succeeds the return value is the handle of the shading, a value greater or equal zero. If the function fails it returns an error.

See also CreateAxialShading function in DynaPDF manual.

See also

Example Databases

Blog Entries

Release notes

Created 20th April 2020, last changed 20th April 2020

DynaPDF.ConvertStyledText   -   DynaPDF.CreateButton

Feedback: Report problem or ask question.

MBS Xojo PDF Plugins