Contents Previous Next

4.8.1 Adjusting the transparency

From version 1.10 JpGraph also supports the use of Alpha Blending together with GD2.x This lets you specify how much of the underlying color should be visible. You specify the amount of transparency for a color by adding an extra parameter to the color specification separated by an '@' (at) character.

For example to specify a red color which is 40% transparent you write

 SetColor( "red@0.4");

or to specify 90% transparancy you write

 SetColor ("red@0.9");

Below is an example of how a bar graph with a background image can make use of transparency


Contents Previous Next