~ubuntu-branches/ubuntu/trusty/pyx/trusty

« back to all changes in this revision

Viewing changes to manual/epsfile.rst

  • Committer: Bazaar Package Importer
  • Author(s): Stuart Prescott
  • Date: 2011-05-20 00:13:52 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110520001352-7jfc1unuvduxji05
Tags: 0.11.1-1
* New upstream release.
* Change documentation build system to sphinx in line with new upstream docs.
* Rebuild lfs files as part of build process.
* Refresh patchs for new version:
  - drop manual-latex-define.patch no longer needed with sphinx.
  - drop siteconfig-static.patch: not needed with new build system
  - drop pyx-text-warnings26.patch: warnings fixed upstream
* Add patch sphinx-mathjax.patch to use pngmath in sphinx rather than mathjax
  which is not yet in Debian.
* Add patch createlfs-no-foiltex.patch to skip generation of foiltex-based
  lfs files that would require non-free components.
* Switch to dpkg-source 3.0 (quilt) format.
* Switch from python-support to dh_python2 as build helper.
* Update copyright format to newer DEP-5 specification.
* Add new files to copyright file.
* Bump standards version to 3.9.2 (no changes required).
* Set DM-Upload-Allowed: yes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. module:: epsfile
 
2
 
 
3
*****************************************
 
4
Module :mod:`epsfile`: EPS file inclusion
 
5
*****************************************
 
6
 
 
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
 
10
 
 
11
   ::
 
12
 
 
13
      from pyx import *
 
14
      c = canvas.canvas()
 
15
      c.insert(epsfile.epsfile(0, 0, "file.eps"))
 
16
      c.writeEPSfile("output")
 
17
 
 
18
 
 
19
All relevant parameters are passed to the ``epsfile.epsfile`` constructor. They
 
20
are summarized in the following table:
 
21
 
 
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    |
 
30
|                     | extension).                                   |
 
31
+---------------------+-----------------------------------------------+
 
32
| ``width=None``      | Desired width of EPS graphics or ``None`` for |
 
33
|                     | original width. Cannot be combined with scale |
 
34
|                     | specification.                                |
 
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
+---------------------+-----------------------------------------------+
 
61
 
 
62
.. _epsfile:
 
63