3
*****************************************
4
Module :mod:`epsfile`: EPS file inclusion
5
*****************************************
7
With the help of the ``epsfile.epsfile`` class, you can easily embed another EPS
8
file in your canvas, thereby scaling, aligning the content at discretion. The
9
most simple example looks like
15
c.insert(epsfile.epsfile(0, 0, "file.eps"))
16
c.writeEPSfile("output")
19
All relevant parameters are passed to the ``epsfile.epsfile`` constructor. They
20
are summarized in the following table:
22
+---------------------+-----------------------------------------------+
23
| argument name | description |
24
+=====================+===============================================+
25
| ``x`` | :math:`x`\ -coordinate of position. |
26
+---------------------+-----------------------------------------------+
27
| ``y`` | :math:`y`\ -coordinate of position. |
28
+---------------------+-----------------------------------------------+
29
| ``filename`` | Name of the EPS file (including a possible |
31
+---------------------+-----------------------------------------------+
32
| ``width=None`` | Desired width of EPS graphics or ``None`` for |
33
| | original width. Cannot be combined with scale |
35
+---------------------+-----------------------------------------------+
36
| ``height=None`` | Desired height of EPS graphics or ``None`` |
37
| | for original height. Cannot be combined with |
38
| | scale specification. |
39
+---------------------+-----------------------------------------------+
40
| ``scale=None`` | Scaling factor for EPS graphics or ``None`` |
41
| | for no scaling. Cannot be combined with width |
42
| | or height specification. |
43
+---------------------+-----------------------------------------------+
44
| ``align="bl"`` | Alignment of EPS graphics. The first |
45
| | character specifies the vertical alignment: |
46
| | ``b`` for bottom, ``c`` for center, and ``t`` |
47
| | for top. The second character fixes the |
48
| | horizontal alignment: ``l`` for left, ``c`` |
49
| | for center ``r`` for right. |
50
+---------------------+-----------------------------------------------+
51
| ``clip=1`` | Clip to bounding box of EPS file? |
52
+---------------------+-----------------------------------------------+
53
| ``translatebbox=1`` | Use lower left corner of bounding box of EPS |
54
| | file? Set to :math:`0` with care. |
55
+---------------------+-----------------------------------------------+
56
| ``bbox=None`` | If given, use ``bbox`` instance instead of |
57
| | bounding box of EPS file. |
58
+---------------------+-----------------------------------------------+
59
| ``kpsearch=0`` | Search for file using the kpathsea library. |
60
+---------------------+-----------------------------------------------+