Blame | Letzte Änderung | Log anzeigen | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1"><LINK REL="Start" HREF="index.html"><LINK REL="Contents" HREF="toc.html"><LINK REL="Prev" HREF="48SpecifyingcolorsinJpGraph.html"><LINK REL="Next" HREF="482Availablenamedcolors.html"><STYLE TYPE="text/css"><!--BODY { font-family: serif }H1 { font-family: sans-serif }H2 { font-family: sans-serif }H3 { font-family: sans-serif }H4 { font-family: sans-serif }H5 { font-family: sans-serif }H6 { font-family: sans-serif }SUB { font-size: smaller }SUP { font-size: smaller }PRE { font-family: monospace }A { text-decoration: none }--></STYLE></HEAD><BODY><A HREF="toc.html">Contents</A><A HREF="48SpecifyingcolorsinJpGraph.html">Previous</A><A HREF="482Availablenamedcolors.html">Next</A><HR NOSHADE><H3><A NAME="4_8_1">4.8.1 Adjusting the transparency</A></H3><P> From version 1.10 JpGraph also supports the use of Alpha Blendingtogether with GD2.x This lets you specify how much of the underlyingcolor should be visible. You specify the amount of transparency for acolor by adding an extra parameter to the color specification separatedby an '@' (at) character.</P><P> For example to specify a red color which is 40% transparent youwrite<DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB"> SetColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">"red@0.4"</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT></FONT></CODE></DIV></P><P> or to specify 90% transparancy you write<DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB"> SetColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">"red@0.9"</FONT><FONT color="#007700">);</FONT><FONTcolor="#0000BB"></FONT></FONT></CODE></DIV></P><P> Below is an example of how a bar graph with a background image canmake use of transparency<!--?Example('alphabarex1','Using alpha blending in a bar graph');?--></P><HR NOSHADE><A HREF="toc.html">Contents</A><A HREF="48SpecifyingcolorsinJpGraph.html">Previous</A><A HREF="482Availablenamedcolors.html">Next</A></BODY></HTML>