| 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>SetLineSpacing</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="SetLightGridColor.html" title="SetLightGridColor" /><link rel="next" href="SetLineStyles.html" title="SetLineStyles" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetLineSpacing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetLightGridColor.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetLineStyles.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetLineSpacing"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetLineSpacing</span></h2><p>SetLineSpacing — Set spacing between lines of multi-line text elements</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetLineSpacing(<em class="parameter"><code>$spc</code></em>)</pre></div><div class="refsect1"><a id="idp1378356660"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetLineSpacing</code> sets the default spacing between lines
|
|
|
4 |
of a multi-line text element. Multiple lines can be specified in titles,
|
|
|
5 |
for example, by placing a newline between lines (for example: "Line 1\nLine
|
|
|
6 |
2"). Line spacing also affects the legend.
|
|
|
7 |
You can override the default line spacing for individual text elements
|
|
|
8 |
(such as the X title) using <a class="xref" href="SetFont.html" title="SetFont"><span class="refentrytitle">SetFont</span></a>,
|
|
|
9 |
<a class="xref" href="SetFontGD.html" title="SetFontGD"><span class="refentrytitle">SetFontGD</span></a>, and <a class="xref" href="SetFontTTF.html" title="SetFontTTF"><span class="refentrytitle">SetFontTTF</span></a>.
|
|
|
10 |
</p></div><div class="refsect1"><a id="idp1378358932"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$spc</code></em></span></dt><dd><p>
|
|
|
11 |
Desired default line spacing factor.
|
|
|
12 |
For the built-in GD fonts, this is the number of pixels between lines.
|
|
|
13 |
For TrueType fonts, this is an adjustment factor for the font's built-in
|
|
|
14 |
line spacing (see notes).
|
|
|
15 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378360596"></a><h2>Notes</h2><p>
|
|
|
16 |
The default line spacing value is 4. For GD fonts, this is the number of
|
|
|
17 |
pixels between text lines, and is independent of the font size.
|
|
|
18 |
</p><p>
|
|
|
19 |
TrueType fonts have a built-in line spacing amount, which is the distance
|
|
|
20 |
between the baseline of one text line and the top of the next text line.
|
|
|
21 |
With TrueType text, PHPlot uses the line spacing value (set with SetLineSpacing
|
|
|
22 |
or one of the SetFont functions) as an adjustment factor for this built-in
|
|
|
23 |
line spacing. A value of 4 produces the built-in line spacing, lower values
|
|
|
24 |
reduce the spacing and larger values increase the spacing. A value of 0 for
|
|
|
25 |
line spacing would result in the baseline of one line nearly touching the
|
|
|
26 |
top of the next line.
|
|
|
27 |
</p></div><div class="refsect1"><a id="idp1378362092"></a><h2>History</h2><p>
|
|
|
28 |
The interpretation of the line spacing as an adjustment factor for TrueType
|
|
|
29 |
text, rather than a value in pixels, began with PHPlot-5.0.6. This is also
|
|
|
30 |
when the line spacing could be adjusted for each text element.
|
|
|
31 |
</p><p>
|
|
|
32 |
At PHPlot-5.0.5, line spacing was the number of pixels between lines of text,
|
|
|
33 |
for both GD or TrueType fonts.
|
|
|
34 |
Before PHPlot-5.0.5, line spacing did not affect TrueType font text at all,
|
|
|
35 |
except in the legend.
|
|
|
36 |
</p><p>
|
|
|
37 |
Before PHPlot-5.0.5, the line spacing had to be set before setting titles,
|
|
|
38 |
because the title height was calculated when setting the title. This
|
|
|
39 |
restriction was removed in PHPlot-5.0.5, so line spacing and titles can be
|
|
|
40 |
set in either order.
|
|
|
41 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetLightGridColor.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="SetLineStyles.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetLightGridColor </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetLineStyles</td></tr></table></div></body></html>
|