AmiBroker 6.91.0 BETA Release

Demo code that shows alpha blending / opacity support:

GraphZOrder = ParamToggle("Draw order", "Reverse|Normal (in call order)",0 );

// this call affects all subsequent Plot() calls 
SetOpacity( Param("Opacity", 0.5, 0, 1, 0.01 ) );

Plot( V, "V", colorLightBlue, styleLine | styleOwnScale, Null, Null, 0, 0, 4 );

Plot( C, "Candle", colorDefault, ParamStyle("style", styleCandle, maskAll), Null, Null, 0, 0, 4);

// you can revert to opaque mode just by calling
SetOpacity( 1 ); // fully opaque
// then you can call Plot() more and it will use other opacity

Note 1: Opacity / Alpha blending works ONLY with QuickGFX. Windows GDI is NOT capable of transparency! To use this feature you have to turn ON QUICK GFX in Tools->Preferences, "Miscellaneous"

It also needs multithreaded chart rendering to be enabled (it is enabled by default):

Note 2: AmiBroker 6.91 brings first phase of Alpha blending / translucency implementation.
It was huge amount of work and alpha blending is supported ONLY for styles mentioned in the CHANGE LOG: styleBar, styleCandle, styleDashed, styleDots, styleLine, styleStaircase, styleArea, styleHistogram.

Alpha blending is NOT supported yet for other styles (such as styleCloud, styleGradient, styleClipMinMax). Alpha blending for these other styles is under development. Also all low-level Gfx** functions are NOT affected by opacity setting, so whatever you draw using Gfx* functions will be 100% opaque (at the moment).

Please do NOT send "bug reports" about unsupported styles. Please read the CHANGE LOG and make sure you are using ONLY supported styles.

4 Likes