SetAlpha: Set Transparency Mode   [ 66 ]

Description

By default, there is no transparency.  This means for example that if two filled rectangles overlap, the part of last drawn rectangle will cover the part which overlaps with the first rectangle.  This SetAlpha function enables a program to instruct PDF viewer that a level of transparency should be enforced so that the part which covers a previously drawn area will not cover it entirely but will feature a defined level of transparency. This function takes two parameters:
  1. A float number within the range [0,1] which specifies transparency level: a value of 0 means total transparency while a value of 1 means total opacity; the latter is the default value.
  2. A pointer to a character string which further specifies a visual blending mode for required transparency.  Possible values are: "Normal" - "Multiply", "Screen", "Overlay, "Darken, "Lighten", "ColorDodge", "ColorBurn", "HardLight", "SoftLight", "Difference", "Exclusion", "Hue", "Saturation", "Color" and "Luminosity".
Developper Notes:
  • In order to work properly, this function requires additional resources for each page where it appears.  Total number of transparency calls issued may not exceed a maximum number which has been set to 16.  This maximum number may be modified in configuration file with key MX_NBEXT.
  • This function may be invoked by program or from within a form.  In the latter case and regarding the previous remark, including that form in each page will be counted only once.
  • The many blending modes available should eventually be tested against the level of transparency to get the required effect.  Formal definition of various blending modes can be found here.  For fine grain adjustments, it is recommanded to proceed by trials and errors rather than to rely on those formal definitions.

C calling syntax
void SetAlpha (float alpha, char *bm);
Cobol calling syntax
Call "SetAlpha" using by value ALPHA,BM.