Subversion Repositories cheapmusic

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!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>SetPlotAreaBgImage</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="SetPieStartAngle.html" title="SetPieStartAngle" /><link rel="next" href="SetPlotAreaPixels.html" title="SetPlotAreaPixels" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetPlotAreaBgImage</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetPieStartAngle.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetPlotAreaPixels.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetPlotAreaBgImage"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetPlotAreaBgImage</span></h2><p>SetPlotAreaBgImage &#8212; Set a graphic file to be used in the plot area background</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetPlotAreaBgImage(<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="idp1378549748"></a><h2>Description</h2><p>
<code class="function">SetPlotAreaBgImage</code> sets an image file to be used as
the plot area background. The image can be scaled or tiled to fit.
    </p></div><div class="refsect1"><a id="idp1378550804"></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>
Path to the file to be used. The file can be any type allowed by GD, which
usually includes JPEG, GIF, and PNG.
          </p></dd><dt><span class="term"><em class="replaceable"><code>$mode</code></em></span></dt><dd><p>
Optional display mode for the background image: one of the strings
'centeredtile', 'tile', or 'scale'. The default is 'tile'.
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1378553364"></a><h2>Notes</h2><p>
If a background image has been set, background color (set with
<a class="xref" href="SetPlotBgColor.html" title="SetPlotBgColor"><span class="refentrytitle">SetPlotBgColor</span></a>) is ignored.
    </p><p>
Scale mode scales the supplied background image file to fit the plot area.
Tile and centeredtile modes repeat the supplied background image file as
needed to fit the plot area.  The difference is that centeredtile offsets the
start position within the background image by half its size, which works
better for some images.
    </p><p>
SetPlotAreaBgImage sets a background for the plot area, while
<a class="xref" href="SetBgImage.html" title="SetBgImage"><span class="refentrytitle">SetBgImage</span></a> sets a background for the entire image area.
If both are used, the plot area background overlays that portion
of the overall background.
    </p><p>
If <code class="varname">$input_file</code> is <code class="literal">NULL</code>, no background
image will be used for the plot area.
    </p><p>
If you are going to use a JPEG file for the plot area background, you should be
using a truecolor PHPlot image.  Truecolor images do not have a
limited-size color map like palette images (which PHPlot uses by default).
If you use  palette image with a JPEG background, the background will
likely overflow your image's color map and leave no free color slots for PHPlot
to use for plot elements.  The same is true if using a 24-bit color
(non-mapped) PNG file for a background if it has many colors.
For more on truecolor PHPlot images, see <a class="xref" href="adv-truecolor.html" title="4.3. Truecolor Images">Section 4.3, &#8220;Truecolor Images&#8221;</a>.
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetPieStartAngle.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="SetPlotAreaPixels.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetPieStartAngle </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetPlotAreaPixels</td></tr></table></div></body></html>