mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- completed the list of function parameters
- added examples where needed git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@208537 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
61154ca32c
commit
6e22866c37
55 changed files with 1783 additions and 223 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-add-bookmark">
|
||||
<refnamediv>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<term><parameter>parent</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parameter <parameter>parent</parameter> is another bookmark which
|
||||
A bookmark previously created by this function which
|
||||
is used as the parent of the new bookmark.
|
||||
</para>
|
||||
</listitem>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-add-launchlink">
|
||||
<refnamediv>
|
||||
|
@ -20,7 +20,8 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Places a hyperlink at the given position pointing to a file program
|
||||
which is being started when clicked on. The hyperlink start is a rectangle
|
||||
which is being started when clicked on. The hyperlink's source position
|
||||
is a rectangle
|
||||
with its lower left corner at (llx, lly) and its upper right corner at
|
||||
(urx, ury). The rectangle has by default a thin blue border.
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-add-locallink">
|
||||
<refnamediv>
|
||||
|
@ -25,7 +25,7 @@
|
|||
in a document has number 1.
|
||||
</para>
|
||||
<para>
|
||||
The hyperlink start is a rectangle with its lower left corner at
|
||||
The hyperlink's source position is a rectangle with its lower left corner at
|
||||
(<parameter>llx</parameter>, <parameter>lly</parameter>) and its upper
|
||||
right corner at (<parameter>urx</parameter>, <parameter>ury</parameter>).
|
||||
The rectangle has by default a thin blue border.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-add-note">
|
||||
<refnamediv>
|
||||
|
@ -23,9 +23,15 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Adds a note at a certain position on the page. Notes are like little
|
||||
<<<<<<< ps-add-note.xml
|
||||
rectangular sheets with text on it, which can be placed anywhere on
|
||||
a page. They
|
||||
are shown either folded or unfolded. If unfolded, the specified icon
|
||||
=======
|
||||
rectangular sheets with text on it, which can be place somewhere on
|
||||
a page. The notes
|
||||
are shown either folded or unfolded. If unfolded the specified icon
|
||||
>>>>>>> 1.4
|
||||
is used as placeholder.
|
||||
</para>
|
||||
<para>
|
||||
|
@ -113,7 +119,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
If <parameter>open</parameter> is unequal to zero the note will
|
||||
be shown unfolded by the pdf viewer.
|
||||
be shown unfolded after opening the document with a pdf viewer.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-add-pdflink">
|
||||
<refnamediv>
|
||||
|
@ -26,7 +26,7 @@
|
|||
first page in a document has number 1.
|
||||
</para>
|
||||
<para>
|
||||
The hyperlink start is a rectangle with its lower left corner at
|
||||
The hyperlink's source position is a rectangle with its lower left corner at
|
||||
(<parameter>llx</parameter>, <parameter>lly</parameter>) and its upper
|
||||
right corner at (<parameter>urx</parameter>, <parameter>ury</parameter>).
|
||||
The rectangle has by default a thin blue border.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-add-weblink">
|
||||
<refnamediv>
|
||||
|
@ -20,7 +20,7 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Places a hyperlink at the given position pointing to a web page. The
|
||||
hyperlink start is a rectangle with its lower left corner at
|
||||
hyperlink's source position is a rectangle with its lower left corner at
|
||||
(<parameter>llx</parameter>, <parameter>lly</parameter>) and
|
||||
its upper right corner at (<parameter>urx</parameter>,
|
||||
<parameter>ury</parameter>). The rectangle has by default a thin
|
||||
|
@ -83,7 +83,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
The url of the hyperlink to be opened when clicking on
|
||||
this link.
|
||||
this link, e.g. <literal>http://www.php.net</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-arc">
|
||||
<refnamediv>
|
||||
|
@ -22,7 +22,8 @@
|
|||
Draws a portion of a circle with at middle point at
|
||||
(<parameter>x</parameter>, <parameter>y</parameter>). The arc starts at an
|
||||
angle of <parameter>alpha</parameter> and ends at an angle of
|
||||
<parameter>beta</parameter>. It is drawn counterclockwise. The subpath added
|
||||
<parameter>beta</parameter>. It is drawn counterclockwise (use
|
||||
<function>ps_arcn</function> to draw clockwise). The subpath added
|
||||
to the current path starts on the arc at angle <parameter>alpha</parameter>
|
||||
and ends on the arc at angle <parameter>beta</parameter>.
|
||||
</para>
|
||||
|
@ -69,7 +70,7 @@
|
|||
<term><parameter>alpha</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The starting angle given in degrees.
|
||||
The start angle given in degrees.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-arcn">
|
||||
<refnamediv>
|
||||
|
@ -22,7 +22,8 @@
|
|||
Draws a portion of a circle with at middle point at
|
||||
(<parameter>x</parameter>, <parameter>y</parameter>). The arc starts at an
|
||||
angle of <parameter>alpha</parameter> and ends at an angle of
|
||||
<parameter>beta</parameter>. It is drawn clockwise. The subpath added to
|
||||
<parameter>beta</parameter>. It is drawn clockwise (use
|
||||
<function>ps_arc</function> to draw counterclockwise). The subpath added to
|
||||
the current path starts on the arc at angle <parameter>beta</parameter> and
|
||||
ends on the arc at angle <parameter>alpha</parameter>.
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-begin-page">
|
||||
<refnamediv>
|
||||
|
@ -26,6 +26,15 @@
|
|||
can set the size for each page indiviually. The resulting PDF document will
|
||||
have different page sizes.
|
||||
</para>
|
||||
<para>
|
||||
Though PostScript does not know different page sizes, pslib places
|
||||
a bounding box for each page into the document. This size is evaluated
|
||||
by some PostScript viewers and will have precedence over the BoundingBox
|
||||
in the Header of the document. This can lead to unexpected results when
|
||||
you set a BoundingBox whose lower left corner is not (0, 0), because the
|
||||
bounding box of the page will always have a lower left corner (0, 0)
|
||||
and overwrites the global setting.
|
||||
</para>
|
||||
<para>
|
||||
Each page is encapsulated into save/restore. This means, that most of the
|
||||
settings made on one page will not be retained on the next page.
|
||||
|
@ -34,8 +43,8 @@
|
|||
If there is up to the first call of <function>ps_begin_page</function> no
|
||||
call of <function>ps_findfont</function>, then the header of the PostScript
|
||||
document will be output and the bounding box will be set to the size of
|
||||
the first page. If <function>ps_findfont</function> was called before, then
|
||||
the
|
||||
the first page. The lower left corner of the bounding box is set to (0, 0).
|
||||
If <function>ps_findfont</function> was called before, then the
|
||||
header has been output already, and the document will not have a valid
|
||||
bounding box. In order to prevent this, one should call
|
||||
<function>ps_set_info</function> to set the info field
|
||||
|
@ -43,6 +52,14 @@
|
|||
before any <function>ps_findfont</function> or
|
||||
<function>ps_begin_page</function> calls.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Upt to version 0.2.6 of pslib, this function will always overwrite
|
||||
the BoundingBox and Orientation, if it has been set before with
|
||||
<function>ps_set_info</function> and <function>ps_findfont</function>
|
||||
has not been called before.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-get-parameter">
|
||||
<refnamediv>
|
||||
|
@ -93,6 +93,44 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>linebreak</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Only used if text is output with <function>ps_show_boxed</function>.
|
||||
If set to <literal>true</literal> a carriage return will add a line
|
||||
break.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>parbreak</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Only used if text is output with <function>ps_show_boxed</function>.
|
||||
If set to <literal>true</literal> a carriage return will start
|
||||
a new paragraph.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>hyphenation</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Only used if text is output with <function>ps_show_boxed</function>.
|
||||
If set to <literal>true</literal> the paragraph will be hyphenated
|
||||
if a hypen dictionary is set and exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>hyphendict</literal></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Filename of the dictionary used for hyphenation pattern.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-get-value">
|
||||
<refnamediv>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<methodparam choice="opt"><type>float</type><parameter>modifier</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Gets several values which were set by
|
||||
<function>ps_set_value</function>. Parameters are by definition float values.
|
||||
<function>ps_set_value</function>. Values are by definition float values.
|
||||
</para>
|
||||
<para>
|
||||
The parameter <parameter>name</parameter> can have the following values.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-hyphenate">
|
||||
<refnamediv>
|
||||
|
@ -16,13 +16,14 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Hyphenates the passed word. <function>ps_hyphenate</function> evaluates the
|
||||
value hyphenminchars and the parameter hyphendict. hyphendict must be set
|
||||
before calling this function.
|
||||
value hyphenminchars set by (<function>ps_set_value</function>) and
|
||||
the parameter hyphendict (set by <function>ps_set_parameter</function>).
|
||||
hyphendict must be set before calling this function.
|
||||
</para>
|
||||
<para>
|
||||
This function requires the locale category LC_CTYPE to be set properly.
|
||||
This is done when the extension is initialized by using the environment
|
||||
variables. On Unix systems read the man page of locale.
|
||||
variables. On Unix systems read the man page of locale for more information.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -34,7 +35,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -53,6 +55,42 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
An array of integers indicating the position of possible breaks in
|
||||
the text or &false; in case of an error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Hyphennate a text</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$word = "Koordinatensystem";
|
||||
$psdoc = ps_new();
|
||||
ps_set_parameter($psdoc, "hyphendict", "hyph_de.dic");
|
||||
$hyphens = ps_hyphenate($psdoc, $word);
|
||||
for($i=0; $i<strlen($word); $i++) {
|
||||
echo $word[$i];
|
||||
if(in_array($i, $hyphens))
|
||||
echo "-";
|
||||
}
|
||||
ps_delete($psdoc);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This example should output <literal>Ko-ordi-na-ten-sys-tem</literal>.
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-lineto">
|
||||
<refnamediv>
|
||||
|
@ -22,6 +22,39 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the end point of the line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the end point of the line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
@ -29,6 +62,41 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Drawing a rectangle</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ps = ps_new();
|
||||
if (!ps_open_file($ps, "rectangle.ps")) {
|
||||
print "Cannot open PostScript file\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
ps_set_info($ps, "Creator", "rectangle.php");
|
||||
ps_set_info($ps, "Author", "Uwe Steinmann");
|
||||
ps_set_info($ps, "Title", "Lineto example");
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
ps_moveto($ps, 100, 100);
|
||||
ps_lineto($ps, 100, 200);
|
||||
ps_lineto($ps, 200, 200);
|
||||
ps_lineto($ps, 200, 100);
|
||||
ps_lineto($ps, 100, 100);
|
||||
ps_stroke($ps);
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_delete($ps);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-makespotcolor">
|
||||
<refnamediv>
|
||||
|
@ -19,7 +19,34 @@
|
|||
Creates a spot color from the current fill color. The fill color must be
|
||||
defined in rgb, cmyk or gray colorspace. The spot color name can be an
|
||||
arbitrary name. A spot color can be set as any color with
|
||||
<function>ps_setcolor</function>.
|
||||
<function>ps_setcolor</function>. When the document is not printed
|
||||
but displayed by an postscript viewer the given color in the specified
|
||||
color space is use.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of the spot color, e.g. Pantone 5565.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -30,6 +57,48 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Creating and using a spot color</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ps = ps_new();
|
||||
if (!ps_open_file($ps, "spotcolor.ps")) {
|
||||
print "Cannot open PostScript file\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
ps_set_info($ps, "Creator", "spotcolor.php");
|
||||
ps_set_info($ps, "Author", "Uwe Steinmann");
|
||||
ps_set_info($ps, "Title", "Spot color example");
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
ps_setcolor($ps, "fill", "cmyk", 0.37, 0.0, 0.34, 0.34);
|
||||
$spotcolor = ps_makespotcolor($ps, "PANTONE 5565 C", 0);
|
||||
ps_setcolor($ps, "fill", "spot", $spotcolor, 0.5, 0.0, 0.0);
|
||||
ps_moveto($ps, 100, 100);
|
||||
ps_lineto($ps, 100, 200);
|
||||
ps_lineto($ps, 200, 200);
|
||||
ps_lineto($ps, 200, 100);
|
||||
ps_lineto($ps, 100, 100);
|
||||
ps_fill($ps);
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_delete($ps);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This example creates the spot color "PANTONE 5565 C" which
|
||||
is a darker green (olive) and fills a rectangle with 50% intensity.
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-moveto">
|
||||
<refnamediv>
|
||||
|
@ -23,6 +23,39 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the point ot move to.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the point to move to.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-new">
|
||||
<refnamediv>
|
||||
|
@ -15,14 +15,17 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Creates a new document instance. It does not create the file on disk or in
|
||||
memory. It just sets up everything.
|
||||
memory, it just sets up everything. <function>ps_new</function> is usually
|
||||
followed by a call of <function>ps_open_file</function> to actually create
|
||||
the postscript document.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Resource of PostScript document or &false; on failure.
|
||||
Resource of PostScript document or &false; on failure. The return value
|
||||
is passed to all other functions as the first argument.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-open-file">
|
||||
<refnamediv>
|
||||
|
@ -28,7 +28,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -36,6 +37,7 @@
|
|||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the postscript file.
|
||||
If <parameter>filename</parameter> is not passed the document will be
|
||||
created in memory and all output will go straight to the browser.
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-open-image-file">
|
||||
<refnamediv>
|
||||
|
@ -17,7 +17,59 @@
|
|||
<methodparam choice="opt"><type>string</type><parameter>stringparam</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>intparam</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.undocumented.func;
|
||||
<para>
|
||||
Loads an image for later use.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the image. Possible values are <literal>png</literal>,
|
||||
<literal>jpeg</literal>, or <literal>eps</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the file containing the image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>stringparam</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Not used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>intparam</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Not used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-open-image">
|
||||
<refnamediv>
|
||||
|
@ -25,7 +25,100 @@
|
|||
<para>
|
||||
Reads an image which is already available in memory. The parameter
|
||||
<parameter>source</parameter> is currently not evaluated and assumed to be
|
||||
<literal>memory</literal>.
|
||||
<literal>memory</literal>. The image data is a sequence of pixels starting
|
||||
in th upper left corner and ending in the lower right corner. Each pixel
|
||||
consists of <parameter>components</parameter> color components, and each
|
||||
component has <parameter>bpc</parameter> bits.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of the image. Possible values are <literal>png</literal>,
|
||||
<literal>jpeg</literal>, or <literal>eps</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>source</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Not used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>length</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the image data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The height of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>components</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of components for each pixel. This can be
|
||||
1 (gray scale images), 3 (rgb images), or 4 (cmyk, rgba images).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bpc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Number of bits per component (quite often 8).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>params</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-place-image">
|
||||
<refnamediv>
|
||||
|
@ -19,6 +19,61 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Places a formerly loaded image on the page. The image can be scaled.
|
||||
If the image shall be rotated as well, you will have to rotate the
|
||||
coordinate system before with <function>ps_rotate</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>imageid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The resource identifier of the image as returned by
|
||||
<function>ps_open_image</function> or
|
||||
<function>ps_open_image_file</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the lower left corner of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the lower left corner of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>scale</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The scaling factor for the image. A scale of 1.0 will result
|
||||
in a resolution of 72 dpi, because each pixel is equivalent to
|
||||
1 point.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-rect">
|
||||
<refnamediv>
|
||||
|
@ -27,6 +27,55 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the lower left corner of the rectangle.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the lower left corner of the rectangle.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The height of the image.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-restore">
|
||||
<refnamediv>
|
||||
|
@ -16,7 +16,26 @@
|
|||
<para>
|
||||
Restores a previously saved graphics context. Any call of
|
||||
<function>ps_save</function> must be accompanied by a call to
|
||||
<function>ps_restore</function>.
|
||||
<function>ps_restore</function>. All coordinate transformations, line
|
||||
style settings, color settings, etc. are being restored to the state
|
||||
before the call of <function>ps_save</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-rotate">
|
||||
<refnamediv>
|
||||
|
@ -19,6 +19,31 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>rot</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Angle of rotation in degree.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
@ -26,6 +51,72 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Rotation of the coordinate system</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function rectangle($ps) {
|
||||
ps_moveto($ps, 0, 0);
|
||||
ps_lineto($ps, 0, 50);
|
||||
ps_lineto($ps, 50, 50);
|
||||
ps_lineto($ps, 50, 0);
|
||||
ps_lineto($ps, 0, 0);
|
||||
ps_stroke($ps);
|
||||
}
|
||||
|
||||
$ps = ps_new();
|
||||
if (!ps_open_file($ps, "rotation.ps")) {
|
||||
print "Cannot open PostScript file\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
ps_set_info($ps, "Creator", "rotation.php");
|
||||
ps_set_info($ps, "Author", "Uwe Steinmann");
|
||||
ps_set_info($ps, "Title", "Rotation example");
|
||||
ps_set_info($ps, "BoundingBox", "0 0 596 842");
|
||||
|
||||
$psfont = ps_findfont($ps, "Helvetica", "", 0);
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
ps_set_text_pos($ps, 100, 100);
|
||||
ps_save($ps);
|
||||
ps_translate($ps, 100, 100);
|
||||
ps_rotate($ps, 45);
|
||||
rectangle($ps);
|
||||
ps_restore($ps);
|
||||
ps_setfont($ps, $psfont, 8.0);
|
||||
ps_show($ps, "Text without rotation");
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_delete($ps);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The above example illustrates a very common way of rotating a
|
||||
graphic (in this case just a rectangle) by simply rotating the
|
||||
coordinate system. Since the graphic's coordinate system assumes
|
||||
(0,0) to be the origin, the page coordinate system is also translated
|
||||
to place the graphics not on the edge of the page. Pay attention
|
||||
to the order of <function>ps_translate</function> and
|
||||
<function>ps_rotate</function>. In the above case the rectancle is
|
||||
rotated around the point (100, 100) in the untranslated coordinate
|
||||
system. Switching the two statements has a completely
|
||||
different result.
|
||||
</para>
|
||||
<para>
|
||||
In order to output the following text at the original position, all
|
||||
modifications of the coordinate system are encapsulated in
|
||||
<function>ps_save</function> and <function>ps_restore</function>.
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-save">
|
||||
<refnamediv>
|
||||
|
@ -15,11 +15,28 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Saves the current graphics context, containing colors, translation and
|
||||
rotation settings and some more. A save context can be restored with
|
||||
rotation settings and some more. A saved context can be restored with
|
||||
<function>ps_restore</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-scale">
|
||||
<refnamediv>
|
||||
|
@ -20,6 +20,39 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Scaling factor in horizontal direction.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Scaling factor in vertical direction.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-border-color">
|
||||
<refnamediv>
|
||||
|
@ -17,8 +17,53 @@
|
|||
<methodparam><type>float</type><parameter>blue</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Annotations like the starting points of links are surrounded by a rectangle.
|
||||
This function sets the color of the border line.
|
||||
Links added with one of the functions <function>ps_add_weblink</function>,
|
||||
<function>ps_add_pdflink</function>, etc. will be displayed with a
|
||||
surounded rectangle when the postscript document is converted to
|
||||
pdf and viewed in a pdf viewer. This rectangle is not visible in
|
||||
the postscript document.
|
||||
This function sets the color of the rectangle's border line.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>red</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The red component of the border color.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>green</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The green component of the border color.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>blue</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The blue component of the border color.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-border-dash">
|
||||
<refnamediv>
|
||||
|
@ -16,8 +16,46 @@
|
|||
<methodparam><type>float</type><parameter>white</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Annotations like the starting points of links are surrounded by a rectangle.
|
||||
This function sets the black and white portion of a dashed border line.
|
||||
Links added with one of the functions <function>ps_add_weblink</function>,
|
||||
<function>ps_add_pdflink</function>, etc. will be displayed with a
|
||||
surounded rectangle when the postscript document is converted to
|
||||
pdf and viewed in a pdf viewer. This rectangle is not visible in
|
||||
the postscript document.
|
||||
This function sets the length of the black and white portion of a
|
||||
dashed border line.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>black</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the dash.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>white</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the gap between dashes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-border-style">
|
||||
<refnamediv>
|
||||
|
@ -16,7 +16,11 @@
|
|||
<methodparam><type>float</type><parameter>width</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Annotations like the starting points of links are surrounded by a rectangle.
|
||||
Links added with one of the functions <function>ps_add_weblink</function>,
|
||||
<function>ps_add_pdflink</function>, etc. will be displayed with a
|
||||
surounded rectangle when the postscript document is converted to
|
||||
pdf and viewed in a pdf viewer. This rectangle is not visible in
|
||||
the postscript document.
|
||||
This function sets the appearance and width of the border line.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
@ -29,7 +33,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -46,7 +51,7 @@
|
|||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
The line width of the border.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-info">
|
||||
<refnamediv>
|
||||
|
@ -17,12 +17,9 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Sets certain information fields of the document. This fields will be shown
|
||||
as a comment in the header of the PostScript file. The values which can be
|
||||
set are <literal>Keywords</literal>, <literal>Subject</literal>,
|
||||
<literal>Title</literal>, <literal>Creator</literal>,
|
||||
<literal>Author</literal>, <literal>BoundingBox</literal>, and
|
||||
<literal>Orientation</literal>. Be aware that some of them has a meaning to
|
||||
PostScript viewers.
|
||||
as a comment in the header of the PostScript file. If the document is
|
||||
converted to pdf this fields will also be used for the document
|
||||
information.
|
||||
</para>
|
||||
<para>
|
||||
The <literal>BoundingBox</literal> is usually set to the value given to the
|
||||
|
@ -30,6 +27,62 @@
|
|||
been called before. In such cases the BoundingBox would be left unset
|
||||
unless you set it explicitly with this function.
|
||||
</para>
|
||||
<para>
|
||||
This function will have no effect anymore when the header of the postscript
|
||||
file has been already written. I must be called before the first page
|
||||
or the first call of <function>ps_findfont</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>key</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the information field to set. The values which can be
|
||||
set are <literal>Keywords</literal>, <literal>Subject</literal>,
|
||||
<literal>Title</literal>, <literal>Creator</literal>,
|
||||
<literal>Author</literal>, <literal>BoundingBox</literal>, and
|
||||
<literal>Orientation</literal>. Be aware that some of them has a
|
||||
meaning to PostScript viewers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value of the information field. The field
|
||||
<literal>Orientation</literal> can be set to either
|
||||
<literal>Portrait</literal> or <literal>Landscape</literal>. The
|
||||
<literal>BoundingBox</literal> is a string consisting of for numbers
|
||||
The first two numbers are the coordinates of the lower left corner of
|
||||
the page. The last two numbers are the coordinates of the upper
|
||||
right corner.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Upt to version 0.2.6 of pslib, the BoundingBox and Orientation
|
||||
will be overwritten by <function>ps_begin_page</function>,
|
||||
unless <function>ps_findfont</function> has been called before.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-parameter">
|
||||
<refnamediv>
|
||||
|
@ -21,6 +21,39 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
For a list of possible names see <function>ps_get_parameter</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The value of the parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-text-pos">
|
||||
<refnamediv>
|
||||
|
@ -21,6 +21,44 @@
|
|||
choosing <literal>textx</literal> respectively <literal>texty</literal> as
|
||||
the value name.
|
||||
</para>
|
||||
<para>
|
||||
If you want to output text at a certain position it is more convenient
|
||||
to use <function>ps_show_xy</function> instead of setting the text position
|
||||
and calling <function>ps_show</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the new text position.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the new text position.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
|
@ -30,6 +68,42 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Placing text at a given position</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ps = ps_new();
|
||||
if (!ps_open_file($ps, "text.ps")) {
|
||||
print "Cannot open PostScript file\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
ps_set_info($ps, "Creator", "rectangle.php");
|
||||
ps_set_info($ps, "Author", "Uwe Steinmann");
|
||||
ps_set_info($ps, "Title", "Text placement example");
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
$psfont = ps_findfont($ps, "Helvetica", "", 0);
|
||||
ps_setfont($ps, $psfont, 8.0);
|
||||
ps_show_xy($ps, "Some text at (100, 100)", 100, 100);
|
||||
|
||||
ps_set_value($ps, "textx", 100);
|
||||
ps_set_value($ps, "texty", 120);
|
||||
ps_show($ps, "Some text at (100, 120)");
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_delete($ps);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-set-value">
|
||||
<refnamediv>
|
||||
|
@ -24,45 +24,71 @@
|
|||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
The <parameter>name</parameter> can be one of the following:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>textrendering</term>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The way how text is shown.
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>textx</term>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The x coordinate for text output.
|
||||
The <parameter>name</parameter> can be one of the following:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>textrendering</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The way how text is shown.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>textx</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The x coordinate for text output.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>texty</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The y coordinate for text output.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>wordspacing</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between words relative to the width of a space.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>leading</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between lines in pixels.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>texty</term>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The y coordinate for text output.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>wordspacing</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between words relative to the width of a space.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>leading</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The distance between lines in pixels.
|
||||
The value of the parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setcolor">
|
||||
<refnamediv>
|
||||
|
@ -32,7 +32,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -62,7 +63,9 @@
|
|||
<term><parameter>c1</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Depending on the colorspace this is either the red component (rgb),
|
||||
the cyan component (cmyk), the gray value (gray), the identifier of
|
||||
the spot color or the identifier of the pattern.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -70,7 +73,8 @@
|
|||
<term><parameter>c2</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Depending on the colorspace this is either the green component (rgb),
|
||||
the magenta component (cmyk).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -78,7 +82,8 @@
|
|||
<term><parameter>c3</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Depending on the colorspace this is either the blue component (rgb),
|
||||
the yellow component (cmyk).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -86,7 +91,8 @@
|
|||
<term><parameter>c4</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
This must only be set in cmyk colorspace and specifies the black
|
||||
component.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setdash">
|
||||
<refnamediv>
|
||||
|
@ -20,6 +20,39 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>on</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the dash.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>off</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The length of the gap between dashes.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setflat">
|
||||
<refnamediv>
|
||||
|
@ -27,7 +27,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setfont">
|
||||
<refnamediv>
|
||||
|
@ -18,7 +18,40 @@
|
|||
<para>
|
||||
Sets a font, which has to be loaded before with
|
||||
<function>ps_findfont</function>. Outputting text without setting a font
|
||||
before results in an error.
|
||||
results in an error.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>fontid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The font identifier as returned by <function>ps_findfont</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of the font.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -34,6 +67,7 @@
|
|||
<para>
|
||||
<simplelist>
|
||||
<member><function>ps_findfont</function></member>
|
||||
<member><function>ps_set_text_pos</function> for an example.</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setgray">
|
||||
<refnamediv>
|
||||
|
@ -28,7 +28,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setlinecap">
|
||||
<refnamediv>
|
||||
|
@ -19,6 +19,34 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The type of line ends. Possible values are
|
||||
<literal>PS_LINECAP_BUTT</literal>,
|
||||
<literal>PS_LINECAP_ROUND</literal>, or
|
||||
<literal>PS_LINECAP_SQUARED</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setlinejoin">
|
||||
<refnamediv>
|
||||
|
@ -19,6 +19,34 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>type</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The way lines are joined. Possible values are
|
||||
<literal>PS_LINEJOIN_MITER</literal>,
|
||||
<literal>PS_LINEJOIN_ROUND</literal>, or
|
||||
<literal>PS_LINEJOIN_BEVEL</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setlinewidth">
|
||||
<refnamediv>
|
||||
|
@ -19,6 +19,31 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The width of lines in points.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setmiterlimit">
|
||||
<refnamediv>
|
||||
|
@ -15,12 +15,40 @@
|
|||
<methodparam><type>float</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
If two lines join in a small angle and the line join is set to miter, then
|
||||
If two lines join in a small angle and the line join is set to
|
||||
<literal>PS_LINEJOIN_MITER</literal>, then
|
||||
the resulting spike will be very long. The miter limit is the maximum
|
||||
ratio of the miter length (the length of the spike) and the line width.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The maximum ratio between the miter length and the line width. Larger
|
||||
values (> 10) wil result in very long spikes when two lines meet
|
||||
in a small angle. Keep the default unless you know what you are doing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-setpolydash">
|
||||
<refnamediv>
|
||||
|
@ -29,7 +29,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -53,6 +54,43 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Drawing a dashed line</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ps = ps_new();
|
||||
if (!ps_open_file($ps, "polydash.ps")) {
|
||||
print "Cannot open PostScript file\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
ps_set_info($ps, "Creator", "polydash.php");
|
||||
ps_set_info($ps, "Author", "Uwe Steinmann");
|
||||
ps_set_info($ps, "Title", "Poly dash example");
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
ps_setpolydash($ps, array(10, 5, 2, 5));
|
||||
ps_moveto($ps, 100, 100);
|
||||
ps_lineto($ps, 200, 200);
|
||||
ps_stroke($ps);
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_delete($ps);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This examples draws a line with a 10 and 1 points long line, and
|
||||
gaps of 5 points inbetween.
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-shading-pattern">
|
||||
<refnamediv>
|
||||
|
@ -22,6 +22,40 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>shadingid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The identifier of a shading previously createed with
|
||||
<function>ps_shading</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>optlist</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This argument is not currently used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-shading">
|
||||
<refnamediv>
|
||||
|
@ -41,7 +41,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -63,7 +64,9 @@
|
|||
<para>
|
||||
The coordinates <parameter>x0</parameter>, <parameter>y0</parameter>,
|
||||
<parameter>x1</parameter>, <parameter>y1</parameter> are the start and
|
||||
end point of the shading.
|
||||
end point of the shading. If the type of shading is
|
||||
<literal>radial</literal> the two points are the middle points of
|
||||
a starting and ending circle.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-shfill">
|
||||
<refnamediv>
|
||||
|
@ -16,7 +16,35 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
Fills an area with a shading, which has to be created before with
|
||||
<function>ps_shading</function>.
|
||||
<function>ps_shading</function>. This is an alternative way to creating
|
||||
a pattern from a shading <function>ps_shading_pattern</function> and using
|
||||
the pattern as the filling color.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>shadingid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The identifier of a shading previously createed with
|
||||
<function>ps_shading</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-show-boxed">
|
||||
<refnamediv>
|
||||
|
@ -27,24 +27,108 @@
|
|||
Tabulators are treated as spaces.
|
||||
</para>
|
||||
<para>
|
||||
The text will be hyphenated if the parameter "hyphenation" is set to "true"
|
||||
and the parameter "hyphendict" contains a valid filename for a hyphenation
|
||||
file. The line spacing is taken from the value "leading". Paragraphs can be
|
||||
separated by an empty line just like in TeX. If the value "parindent" is
|
||||
The text will be hyphenated if the parameter
|
||||
<parameter>hyphenation</parameter> is set to <literal>true</literal>
|
||||
and the parameter <parameter>hyphendict</parameter> contains a valid
|
||||
filename for a hyphenation
|
||||
file. The line spacing is taken from the value <literal>leading</literal>.
|
||||
Paragraphs can be
|
||||
separated by an empty line just like in TeX. If the value
|
||||
<literal>parindent</literal> is
|
||||
set to value > 0.0 then the first n lines will be indented. The number n
|
||||
of lines is set by the parameter "numindentlines". In order to prevent
|
||||
indenting of the first m paragraphs set the value "parindentskip" to a
|
||||
of lines is set by the parameter <literal>numindentlines</literal>.
|
||||
In order to prevent
|
||||
indenting of the first m paragraphs set the value
|
||||
<literal>parindentskip</literal> to a
|
||||
positive number.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>text</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The text to be output into the given box.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>left</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the lower left corner of the box.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bottom</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the lower left corner of the box.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Width of the box.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Height of the box.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>hmode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parameter <parameter>hmode</parameter> can be "justify",
|
||||
"fulljustify", "right", "left", or "center". The difference of
|
||||
"justify" and "fulljustify" just affects the last line of the box. In
|
||||
fulljustify mode the last line will be left and right justified unless
|
||||
this is also the last line of paragraph. In justify mode it will always
|
||||
be left justified.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>feature</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Used parameters</title>
|
||||
<para>
|
||||
The output of <function>ps_show_boxed</function> can be configured with
|
||||
several parameters and values which must be set with either
|
||||
<function>ps_set_parameter</function> or <function>ps_set_value</function>.
|
||||
Beside the parameters and values which affect text output the following
|
||||
Beside the parameters and values which affect text output, the following
|
||||
parameters and values are evaluated.
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
|
@ -195,83 +279,6 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>text</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>left</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>bottom</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>height</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>hmode</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parameter <parameter>hmode</parameter> can be "justify",
|
||||
"fulljustify", "right", "left", or "center". The difference of
|
||||
"justify" and "fulljustify" just affects the last line of the box. In
|
||||
fulljustify mode the last line will be left and right justified unless
|
||||
this is also the last line of paragraph. In justify mode it will always
|
||||
be left justified.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>feature</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-show-xy">
|
||||
<refnamediv>
|
||||
|
@ -21,6 +21,47 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>text</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The text to be output.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the lower left corner of the box surounding the text.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the lower left corner of the box surounding the text.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-show">
|
||||
<refnamediv>
|
||||
|
@ -15,8 +15,11 @@
|
|||
<methodparam><type>string</type><parameter>text</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Output a text at the current text position. The function will issue an
|
||||
error if no font was set before with <function>ps_setfont</function>.
|
||||
Output a text at the current text position. The text position can be set
|
||||
by storing the x and y coordinates into the values <literal>textx</literal>
|
||||
and <literal>texty</literal> with the function
|
||||
<function>ps_set_value</function>. The function will issue an
|
||||
error if a font was not set before with <function>ps_setfont</function>.
|
||||
</para>
|
||||
<para>
|
||||
<function>ps_show</function> evaluates the following parameters and values
|
||||
|
@ -82,6 +85,31 @@
|
|||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>text</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The text to be output.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-string-geometry">
|
||||
<refnamediv>
|
||||
|
@ -18,10 +18,54 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
This function is similar to <function>ps_stringwidth</function> but returns
|
||||
an array of dimensions.
|
||||
an array of dimensions containing the width, ascender, and descender
|
||||
of the text.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>text</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The text for which the geometry is to be calculated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>fontid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The identifier of the font to be used. If not font is specified
|
||||
the current font will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of the font. If no size is specified the current size
|
||||
is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev -->
|
||||
<refentry id="function.ps-stringwidth">
|
||||
<refnamediv>
|
||||
|
@ -25,6 +25,49 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>text</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The text for which the geometry is to be calculated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>fontid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The identifier of the font to be used. If not font is specified
|
||||
the current font will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The size of the font. If no size is specified the current size
|
||||
is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-stroke">
|
||||
<refnamediv>
|
||||
|
@ -19,6 +19,23 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-symbol-name">
|
||||
<refnamediv>
|
||||
|
@ -29,7 +29,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -46,7 +47,8 @@
|
|||
<term><parameter>fontid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
The identifier of the font to be used. If not font is specified
|
||||
the current font will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-symbol-width">
|
||||
<refnamediv>
|
||||
|
@ -31,7 +31,8 @@
|
|||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -39,8 +40,7 @@
|
|||
<term><parameter>ord</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parameter <parameter>ord</parameter> is the position of the glyph
|
||||
in the font encoding vector.
|
||||
The position of the glyph in the font encoding vector.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -48,7 +48,8 @@
|
|||
<term><parameter>fontid</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Its description
|
||||
The identifier of the font to be used. If not font is specified
|
||||
the current font will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -56,7 +57,8 @@
|
|||
<term><parameter>size</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
|
||||
The size of the font to be used. If not size is specified
|
||||
the current font size will be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-symbol">
|
||||
<refnamediv>
|
||||
|
@ -21,6 +21,31 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>ord</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The position of the glyph in the font encoding vector.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- splitted from ./en/functions/ps.xml, last change in rev 1.12 -->
|
||||
<refentry id="function.ps-translate">
|
||||
<refnamediv>
|
||||
|
@ -20,6 +20,39 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>psdoc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Resource identifier of the postscript file
|
||||
as returned by <function>ps_new</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
x-coordinate of the origin of the translated coordinate system.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>y</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
y-coordinate of the origin of the translated coordinate system.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
|
@ -27,6 +60,77 @@
|
|||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Translation of the coordinate system</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
function rectangle($ps) {
|
||||
ps_moveto($ps, 0, 0);
|
||||
ps_lineto($ps, 0, 50);
|
||||
ps_lineto($ps, 50, 50);
|
||||
ps_lineto($ps, 50, 0);
|
||||
ps_lineto($ps, 0, 0);
|
||||
ps_stroke($ps);
|
||||
}
|
||||
|
||||
$ps = ps_new();
|
||||
if (!ps_open_file($ps, "translate.ps")) {
|
||||
print "Cannot open PostScript file\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
ps_set_info($ps, "Creator", "translate.php");
|
||||
ps_set_info($ps, "Author", "Uwe Steinmann");
|
||||
ps_set_info($ps, "Title", "Translated example");
|
||||
ps_set_info($ps, "BoundingBox", "0 0 596 842");
|
||||
|
||||
$psfont = ps_findfont($ps, "Helvetica", "", 0);
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
ps_set_text_pos($ps, 100, 100);
|
||||
ps_translate($ps, 500, 750);
|
||||
rectangle($ps);
|
||||
ps_translate($ps, -500, -750);
|
||||
ps_setfont($ps, $psfont, 8.0);
|
||||
ps_show($ps, "Text at initial position");
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_begin_page($ps, 596, 842);
|
||||
ps_set_text_pos($ps, 100, 100);
|
||||
ps_save($ps);
|
||||
ps_translate($ps, 500, 750);
|
||||
rectangle($ps);
|
||||
ps_restore($ps);
|
||||
ps_setfont($ps, $psfont, 8.0);
|
||||
ps_show($ps, "Text at initial position");
|
||||
ps_end_page($ps);
|
||||
|
||||
ps_delete($ps);
|
||||
?>
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>The above example demonstrates two possible ways to place
|
||||
a graphic (in this case just a rectangle) at any position on the page,
|
||||
while the graphic itself uses its own coordinate system. The trick is
|
||||
to change the origin of the current coordinate system before drawing
|
||||
the rectangle. The translation has to undone after the graphic has
|
||||
been drawn.
|
||||
</para>
|
||||
<para>
|
||||
On the second page a slighty different and more elegant approach is
|
||||
applied. Instead of undoing the translation with a second call of
|
||||
<funktion>ps_translate</function> the graphics context is saved before
|
||||
modifying the coordinate system and restored after drawing the rectangle.
|
||||
</para>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue