File: epsfile.tex

package info (click to toggle)
pyx 0.9-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,060 kB
  • ctags: 2,665
  • sloc: python: 15,205; makefile: 142; ansic: 131
file content (53 lines) | stat: -rw-r--r-- 1,940 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
\chapter{Module epsfile: EPS file inclusion}

With the help of the \verb|epsfile.epsfile| class, you can easily embed
another EPS file in your canvas, thereby scaling, aligning the content
at discretion. The most simple example looks like
\begin{quote}
\begin{verbatim}
from pyx import *
c = canvas.canvas()
c.insert(epsfile.epsfile(0, 0, "file.eps"))
c.writeEPSfile("output")
\end{verbatim}
\end{quote}

All relevant parameters are passed to the \verb|epsfile.epsfile|
constructor. They are summarized in the following table:

\medskip
\begin{tabularx}{\linewidth}{l>{\raggedright\arraybackslash}X}
argument name&description\\
\hline
\texttt{x} & $x$-coordinate of position.\\
\texttt{y} & $y$-coordinate of position.\\
\texttt{filename} & Name of the EPS file (including a possible
extension).\\
\texttt{width=None} & Desired width of EPS graphics or \texttt{None}
for original width. Cannot be combined with scale specification.\\
\texttt{height=None} & Desired height of EPS graphics or \texttt{None}
for original height. Cannot be combined with scale specification.\\
\texttt{scale=None} & Scaling factor for EPS graphics or \texttt{None}
for no scaling. Cannot be combined with width or height specification.\\
\texttt{align="bl"} & Alignment of EPS graphics. The first character
specifies the vertical alignment: \texttt{b} for bottom, \texttt{c}
for center, and \texttt{t} for top. The second character fixes the
horizontal alignment: \texttt{l} for left, \texttt{c} for center
\texttt{r} for right.\\
\texttt{clip=1} & Clip to bounding box of EPS file?\\
\texttt{translatebbox=1} & Use lower left corner of bounding box of EPS
file? Set to $0$ with care.\\
\texttt{bbox=None} & If given, use \texttt{bbox} instance instead of
bounding box of EPS file.\\
\texttt{kpsearch=0} & Search for file using the kpathsea library.
\end{tabularx}



\label{epsfile}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "manual.tex"
%%% End: