98 |
- |
1 |
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
|
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>SetBgImage</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="reference.html" title="PHPlot Function Reference" /><link rel="prev" href="SetBackgroundColor.html" title="SetBackgroundColor" /><link rel="next" href="SetBrowserCache.html" title="SetBrowserCache" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetBgImage</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetBackgroundColor.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetBrowserCache.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetBgImage"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetBgImage</span></h2><p>SetBgImage — Set a graphic file to be used in the graph background</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetBgImage(<em class="parameter"><code>$input_file</code></em>, [<span class="optional"><em class="parameter"><code>$mode</code></em></span>])</pre></div><div class="refsect1"><a id="idp1377805532"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetBgImage</code> sets an image file to be used as the graph
|
|
|
4 |
background. The image can be scaled or tiled to fit.
|
|
|
5 |
</p></div><div class="refsect1"><a id="idp1377806580"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$input_file</code></em></span></dt><dd><p>
|
|
|
6 |
Path to the file to be used. The file can be any type allowed by GD, which
|
|
|
7 |
usually includes JPEG, GIF, and PNG.
|
|
|
8 |
</p></dd><dt><span class="term"><em class="replaceable"><code>$mode</code></em></span></dt><dd><p>
|
|
|
9 |
Optional display mode for the background image: one of the strings
|
|
|
10 |
'centeredtile', 'tile', or 'scale'. The default is 'centeredtile'.
|
|
|
11 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1377809148"></a><h2>Notes</h2><p>
|
|
|
12 |
If a background image has been set, background color (set with
|
|
|
13 |
<a class="xref" href="SetBackgroundColor.html" title="SetBackgroundColor"><span class="refentrytitle">SetBackgroundColor</span></a>) is ignored.
|
|
|
14 |
</p><p>
|
|
|
15 |
Scale mode scales the supplied background image file to fit the image area
|
|
|
16 |
of the entire graph. Tile and centeredtile modes repeat the supplied
|
|
|
17 |
background image file as needed to fit the image area of the graph. The
|
|
|
18 |
difference is that centeredtile offsets the start position within the
|
|
|
19 |
background image by half its size, which works better for some images.
|
|
|
20 |
</p><p>
|
|
|
21 |
SetBgImage sets a background for the entire image area, while
|
|
|
22 |
<a class="xref" href="SetPlotAreaBgImage.html" title="SetPlotAreaBgImage"><span class="refentrytitle">SetPlotAreaBgImage</span></a> sets a background for
|
|
|
23 |
the plot area (generally, the area between the axes).
|
|
|
24 |
If both are used, the plot area background overlays that portion
|
|
|
25 |
of the overall background.
|
|
|
26 |
</p><p>
|
|
|
27 |
If <code class="varname">$input_file</code> is <code class="literal">NULL</code>, no background
|
|
|
28 |
image will be used.
|
|
|
29 |
</p><p>
|
|
|
30 |
If you are going to use a JPEG file for the image background, you should be
|
|
|
31 |
using a truecolor PHPlot image. Truecolor images do not have a
|
|
|
32 |
limited-size color map like palette images (which PHPlot uses by default).
|
|
|
33 |
If you use palette image with a JPEG background, the background will
|
|
|
34 |
likely overflow your image's color map and leave no free color slots for PHPlot
|
|
|
35 |
to use for plot elements. The same is true if using a 24-bit color
|
|
|
36 |
(non-mapped) PNG file for a background if it has many colors.
|
|
|
37 |
For more on truecolor PHPlot images, see <a class="xref" href="adv-truecolor.html" title="4.3. Truecolor Images">Section 4.3, “Truecolor Images”</a>.
|
|
|
38 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetBackgroundColor.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="SetBrowserCache.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetBackgroundColor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetBrowserCache</td></tr></table></div></body></html>
|