| 1 |
lars |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
|
2 |
<HTML>
|
|
|
3 |
<HEAD>
|
|
|
4 |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
|
|
|
5 |
<LINK REL="Start" HREF="index.html">
|
|
|
6 |
<LINK REL="Contents" HREF="toc.html">
|
|
|
7 |
<LINK REL="Prev" HREF="48SpecifyingcolorsinJpGraph.html">
|
|
|
8 |
<LINK REL="Next" HREF="482Availablenamedcolors.html">
|
|
|
9 |
<STYLE TYPE="text/css"><!--
|
|
|
10 |
BODY { font-family: serif }
|
|
|
11 |
H1 { font-family: sans-serif }
|
|
|
12 |
H2 { font-family: sans-serif }
|
|
|
13 |
H3 { font-family: sans-serif }
|
|
|
14 |
H4 { font-family: sans-serif }
|
|
|
15 |
H5 { font-family: sans-serif }
|
|
|
16 |
H6 { font-family: sans-serif }
|
|
|
17 |
SUB { font-size: smaller }
|
|
|
18 |
SUP { font-size: smaller }
|
|
|
19 |
PRE { font-family: monospace }
|
|
|
20 |
A { text-decoration: none }
|
|
|
21 |
--></STYLE>
|
|
|
22 |
</HEAD>
|
|
|
23 |
<BODY>
|
|
|
24 |
<A HREF="toc.html">Contents</A>
|
|
|
25 |
<A HREF="48SpecifyingcolorsinJpGraph.html">Previous</A>
|
|
|
26 |
<A HREF="482Availablenamedcolors.html">Next</A>
|
|
|
27 |
<HR NOSHADE>
|
|
|
28 |
<H3><A NAME="4_8_1">4.8.1 Adjusting the transparency</A></H3>
|
|
|
29 |
<P> From version 1.10 JpGraph also supports the use of Alpha Blending
|
|
|
30 |
together with GD2.x This lets you specify how much of the underlying
|
|
|
31 |
color should be visible. You specify the amount of transparency for a
|
|
|
32 |
color by adding an extra parameter to the color specification separated
|
|
|
33 |
by an '@' (at) character.</P>
|
|
|
34 |
<P> For example to specify a red color which is 40% transparent you
|
|
|
35 |
write<DIV class="phpscript"><CODE><FONT color="#000000"> <FONT color="#0000BB">
|
|
|
36 |
SetColor</FONT><FONT color="#007700">(</FONT><FONT color="#DD0000">
|
|
|
37 |
"red@0.4"</FONT><FONT color="#007700">);</FONT><FONT color="#0000BB"></FONT>
|
|
|
38 |
</FONT></CODE></DIV></P>
|
|
|
39 |
<P> or to specify 90% transparancy you write<DIV class="phpscript"><CODE>
|
|
|
40 |
<FONT color="#000000"> <FONT color="#0000BB"> SetColor</FONT><FONT color="#007700">
|
|
|
41 |
(</FONT><FONT color="#DD0000">"red@0.9"</FONT><FONT color="#007700">);</FONT><FONT
|
|
|
42 |
color="#0000BB"></FONT></FONT></CODE></DIV></P>
|
|
|
43 |
<P> Below is an example of how a bar graph with a background image can
|
|
|
44 |
make use of transparency
|
|
|
45 |
<!--?
|
|
|
46 |
Example('alphabarex1','Using alpha blending in a bar graph');
|
|
|
47 |
?-->
|
|
|
48 |
</P>
|
|
|
49 |
<HR NOSHADE>
|
|
|
50 |
<A HREF="toc.html">Contents</A>
|
|
|
51 |
<A HREF="48SpecifyingcolorsinJpGraph.html">Previous</A>
|
|
|
52 |
<A HREF="482Availablenamedcolors.html">Next</A>
|
|
|
53 |
</BODY>
|
|
|
54 |
</HTML>
|