Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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>PHPlot_truecolor</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="PHPlot.html" title="PHPlot" /><link rel="next" href="PrintImage.html" title="PrintImage" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">PHPlot_truecolor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="PHPlot.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="PrintImage.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="PHPlot-truecolor"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">PHPlot_truecolor</span></h2><p>PHPlot_truecolor &#8212; Construct a new PHPlot Truecolor Class Object</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot = new PHPlot_truecolor([<span class="optional"><em class="parameter"><code>$width</code></em></span>], [<span class="optional"><em class="parameter"><code>$height</code></em></span>], [<span class="optional"><em class="parameter"><code>$output_file</code></em></span>], [<span class="optional"><em class="parameter"><code>$input_file</code></em></span>])</pre></div><div class="refsect1"><a id="idp1377757588"></a><h2>Description</h2><p>
3
This is the constructor for the PHPlot_truecolor class, which is an
4
extended class that inherits from the PHPlot class. Like the PHPlot class,
5
it creates a new plot object and initializes all internal settings to
6
default values, but the resulting image will be a
7
<a class="link" href="concepts.html#def-truecolor">truecolor</a> image, rather than a
8
<a class="link" href="concepts.html#def-palette">palette</a> image.
9
(See the notes below regarding an exception to this rule.)
10
    </p></div><div class="refsect1"><a id="idp1377759380"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$width</code></em></span></dt><dd><p>
11
Optional width of the plot image, in pixels. Default is 600.
12
          </p></dd><dt><span class="term"><em class="replaceable"><code>$height</code></em></span></dt><dd><p>
13
Optional height of the plot image, in pixels. Default is 400.
14
          </p></dd><dt><span class="term"><em class="replaceable"><code>$output_file</code></em></span></dt><dd><p>
15
Optional name of a file where the image output will be written.
16
This is the same as using <a class="xref" href="SetOutputFile.html" title="SetOutputFile"><span class="refentrytitle">SetOutputFile</span></a>.
17
Default is no output file, meaning the image is written to standard output
18
(that is, sent back to the browser).
19
          </p></dd><dt><span class="term"><em class="replaceable"><code>$input_file</code></em></span></dt><dd><p>
20
Optional name of a file to use as a starting image. This becomes the
21
background for the plot.  If an input_file is given, any width and height
22
given to the constructor are ignored, and the size of the image in the
23
named input_file are the plot image size.  Default is no input file,
24
meaning a blank image will be created at the given or default width and
25
height.
26
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1377764508"></a><h2>Return Value</h2><p>
27
Returns an object, an instance of the PHPlot_truecolor class, which
28
inherits all the functions (methods) of the PHPlot class.
29
    </p></div><div class="refsect1"><a id="idp1377765220"></a><h2>Notes</h2><p>
30
Refer to <a class="xref" href="PHPlot.html" title="PHPlot"><span class="refentrytitle">PHPlot</span></a> for the base class constructor. Refer to
31
<a class="xref" href="adv-truecolor.html" title="4.3. Truecolor Images">Section 4.3, &#8220;Truecolor Images&#8221;</a> for more information on truecolor images.
32
    </p><p>
33
The output_file will be ignored unless <a class="xref" href="SetIsInline.html" title="SetIsInline"><span class="refentrytitle">SetIsInline</span></a>(True) is
34
called.
35
    </p><p>
36
If no input_file is supplied, the PHPlot_truecolor constructor creates
37
a <a class="link" href="concepts.html#def-truecolor">truecolor</a> plot image,
38
and the <a class="xref" href="PHPlot.html" title="PHPlot"><span class="refentrytitle">PHPlot</span></a> constructor creates
39
a <a class="link" href="concepts.html#def-palette">palette</a> plot image.
40
If an input_file is supplied, the two constructors are equivalent, and the
41
type of the input file (truecolor or palette) determines the type of the
42
plot image.
43
    </p><p>
44
The type of the plot image (truecolor or palette) might not be the same as
45
the type of output file or stream which is generated by PHPlot. For
46
example, a truecolor image is converted to palette if the output
47
format (as set with <a class="xref" href="SetFileFormat.html" title="SetFileFormat"><span class="refentrytitle">SetFileFormat</span></a>) is GIF, which supports
48
only palette images. A palette image is converted to truecolor if the
49
output format is JPEG, which supports only truecolor images.
50
More information can be found in <a class="xref" href="adv-truecolor.html#adv-truecolor-fileformats" title="4.3.5. Image Formats and File Formats, Palette and Truecolor">Section 4.3.5, &#8220;Image Formats and File Formats, Palette and Truecolor&#8221;</a>.
51
    </p></div><div class="refsect1"><a id="idp1377770204"></a><h2>History</h2><p>
52
The PHPlot_truecolor class and its constructor were added in PHPlot-5.1.1.
53
For that release only, there was a greater dependency between which
54
constructor was used and which features were available, but this was
55
removed in the next release.
56
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="PHPlot.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="PrintImage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">PHPlot </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PrintImage</td></tr></table></div></body></html>