summaryrefslogtreecommitdiff
path: root/doc/reference/surfaces.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference/surfaces.rst')
-rw-r--r--doc/reference/surfaces.rst25
1 files changed, 14 insertions, 11 deletions
diff --git a/doc/reference/surfaces.rst b/doc/reference/surfaces.rst
index 0ba51c9..949b05e 100644
--- a/doc/reference/surfaces.rst
+++ b/doc/reference/surfaces.rst
@@ -227,7 +227,7 @@ class Surface()
.. method:: write_to_png(fobj)
:param fobj: the file to write to
- :type fobj: str, file or file-like object
+ :type fobj: filename (str), file or a file-like bytes-mode object
:raises: *MemoryError* if memory could not be allocated for the operation
*IOError* if an I/O error occurs while attempting to write the file
@@ -341,7 +341,7 @@ multi-page vector surface backend.
.. class:: PDFSurface(fobj, width_in_points, height_in_points)
:param fobj: a filename or writable file object. None may be used to specify no output. This will generate a *PDFSurface* that may be queried and used as a source, without generating a temporary file.
- :type fobj: None, str, file or file-like object
+ :type fobj: None, filename (str), file or a file-like bytes-mode object
:param width_in_points: width of the surface, in points
(1 point == 1/72.0 inch)
:type width_in_points: float
@@ -383,7 +383,7 @@ is a multi-page vector surface backend.
.. class:: PSSurface(fobj, width_in_points, height_in_points)
:param fobj: a filename or writable file object. None may be used to specify no output. This will generate a *PSSurface* that may be queried and used as a source, without generating a temporary file.
- :type fobj: None, str, file or file-like object
+ :type fobj: None, filename (str), file or a file-like bytes-mode object
:param width_in_points: width of the surface, in points
(1 point == 1/72.0 inch)
:type width_in_points: float
@@ -646,8 +646,10 @@ multi-page vector surface backend
.. class:: SVGSurface(fobj, width_in_points, height_in_points)
- :param fobj: a filename or writable file object. None may be used to specify no output. This will generate a *SVGSurface* that may be queried and used as a source, without generating a temporary file.
- :type fobj: None, str, file or file-like object
+ :param fobj: a filename or writable file object. None may be used to
+ specify no output. This will generate a *SVGSurface* that may be queried
+ and used as a source, without generating a temporary file.
+ :type fobj: None, filename (str), file or a file-like text-mode object
:param width_in_points: width of the surface, in points (1 point == 1/72.0 inch)
:type width_in_points: float
:param height_in_points: height of the surface, in points (1 point == 1/72.0 inch)
@@ -735,13 +737,14 @@ extension if it is available.
:param width: The width of the surface
:param height: The height of the surface
- Informs cairo of the new size of the X Drawable underlying the surface. For a surface created
- for a Window (rather than a Pixmap), this function must be called each time the size of the
- window changes. (For a subwindow, you are normally resizing the window yourself, but for a
- toplevel window, it is necessary to listen for ConfigureNotify events.)
+ Informs cairo of the new size of the X Drawable underlying the surface. For
+ a surface created for a Window (rather than a Pixmap), this function must
+ be called each time the size of the window changes. (For a subwindow, you
+ are normally resizing the window yourself, but for a toplevel window, it is
+ necessary to listen for ConfigureNotify events.)
- A Pixmap can never change size, so it is never necessary to call this function on a surface
- created for a Pixmap.
+ A Pixmap can never change size, so it is never necessary to call this
+ function on a surface created for a Pixmap.
class XlibSurface(:class:`Surface`)