[cairo-commit] pycairo/doc/reference patterns.rst, 1.1, 1.2 surfaces.rst, 1.3, 1.4 mattributes.rst, 1.1, 1.2 text.rst, 1.1, 1.2

Steve Chaplin commit at pdx.freedesktop.org
Thu Feb 12 01:04:31 PST 2009


Committed by: stevech1097

Update of /cvs/cairo/pycairo/doc/reference
In directory kemper:/tmp/cvs-serv26561/doc/reference

Modified Files:
	patterns.rst surfaces.rst mattributes.rst text.rst 
Log Message:
'SC'

Index: patterns.rst
===================================================================
RCS file: /cvs/cairo/pycairo/doc/reference/patterns.rst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- patterns.rst	10 Dec 2008 06:57:46 -0000	1.1
+++ patterns.rst	12 Feb 2009 09:04:28 -0000	1.2
@@ -82,7 +82,7 @@
 
       Gets the solid color for a *SolidPattern*.
 
-      Since: 1.4
+      .. versionadded:: 1.4
 
 
 class SurfacePattern(:class:`Pattern`)
@@ -118,7 +118,7 @@
 
       :returns: the :class:`Surface` of the *SurfacePattern*.
 
-      Since: 1.4
+      .. versionadded:: 1.4
 
    .. method:: set_extend(extend)
 
@@ -245,7 +245,7 @@
 
       Gets the gradient endpoints for a *LinearGradient*.
 
-      Since: 1.4
+      .. versionadded:: 1.4
 
 
 class RadialGradient(:class:`Gradient`)
@@ -290,4 +290,4 @@
       Gets the *Gradient* endpoint circles for a *RadialGradient*, each
       specified as a center coordinate and a radius.
 
-      Since: 1.4
+      .. versionadded:: 1.4

Index: surfaces.rst
===================================================================
RCS file: /cvs/cairo/pycairo/doc/reference/surfaces.rst,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- surfaces.rst	15 Jan 2009 09:04:43 -0000	1.3
+++ surfaces.rst	12 Feb 2009 09:04:29 -0000	1.4
@@ -28,7 +28,7 @@
 
       :meth:`Context.copy_page` is a convenience function for this.
 
-      Since: 1.6
+      .. versionadded:: 1.6
 
    .. method:: create_similar(content, width, height)
 
@@ -77,7 +77,7 @@
       whether the surface contains color and/or alpha information. See
       :ref:`content <mattributes_content>`.
 
-      Since: 1.2
+      .. versionadded:: 1.2
 
    .. method:: get_device_offset()
 
@@ -88,7 +88,7 @@
 
       This method returns the previous device offset set by :meth:`.set_device_offset`.
 
-      Since: 1.2
+      .. versionadded:: 1.2
 
    .. method:: get_fallback_resolution()
 
@@ -101,7 +101,7 @@
       :meth:`.set_fallback_resolution`, or default fallback resolution if
       never set.
 
-      Since: 1.8
+      .. versionadded:: 1.8
 
    .. method:: get_font_options()
 
@@ -185,7 +185,7 @@
       The default fallback resoultion is 300 pixels per inch in both
       dimensions.
 
-      Since: 1.2
+      .. versionadded:: 1.2
 
    .. method:: show_page()
 
@@ -195,7 +195,7 @@
       There is a convenience function for this that takes a
       :meth:`Context.show_page`.
 
-      Since: 1.6
+      .. versionadded:: 1.6
 
    .. method:: write_to_png(fobj)
 

Index: mattributes.rst
===================================================================
RCS file: /cvs/cairo/pycairo/doc/reference/mattributes.rst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mattributes.rst	10 Dec 2008 06:57:46 -0000	1.1
+++ mattributes.rst	12 Feb 2009 09:04:29 -0000	1.2
@@ -134,6 +134,7 @@
 
  These attributes are used to indicate what filtering should be applied when reading pixel values from patterns. See :meth:`SurfacePattern.set_filter` for indicating the desired filter to be used with a particular pattern.
 
+.. _mattributes_weight:
 .. attribute:: cairo.FONT_WEIGHT_NORMAL
                cairo.FONT_WEIGHT_BOLD
 
@@ -142,6 +143,7 @@
 
  These attributes specify variants of a font face based on their weight.
 
+.. _mattributes_slant:
 .. attribute:: cairo.FONT_SLANT_NORMAL
                cairo.FONT_SLANT_ITALIC
                cairo.FONT_SLANT_OBLIQUE
@@ -162,7 +164,8 @@
 * *cairo.FORMAT_RGB24*: each pixel is a 32-bit quantity, with the upper 8 bits unused. Red, Green, and Blue are stored in the remaining 24 bits in that order.
 * *cairo.FORMAT_A8*: each pixel is a 8-bit quantity holding an alpha value.
 * *cairo.FORMAT_A1*: each pixel is a 1-bit quantity holding an alpha value. Pixels are packed together into 32-bit quantities. The ordering of the bits matches the endianess of the platform. On a big-endian machine, the first pixel is in the uppermost bit, on a little-endian machine the first pixel is in the least-significant bit.
-* *cairo.FORMAT_RGB16_565*: This format value is deprecated. It has never been properly implemented in cairo and should not be used by applications. (since 1.2)
+* *cairo.FORMAT_RGB16_565*: This format value is deprecated. It has never been properly implemented in cairo and should not be used by applications.
+   .. versionadded:: 1.2
 
  These attributes are used to identify the memory format of image data.
 

Index: text.rst
===================================================================
RCS file: /cvs/cairo/pycairo/doc/reference/text.rst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- text.rst	10 Dec 2008 06:57:47 -0000	1.1
+++ text.rst	12 Feb 2009 09:04:29 -0000	1.2
@@ -22,12 +22,69 @@
 matrix are set with :meth:`Context.set_font_size` and
 :meth:`Context.set_font_matrix`.
 
-*FontFace* cannot be instantiated directly, it is returned from
-:meth:`Context.get_font_face`
-
 There are various types of *FontFace*, depending on the font backend they
 use.
 
+.. class:: FontFace()
+
+   .. note:: This class cannot be instantiated directly, it is returned by :meth:`Context.get_font_face`.
+
+
+
+class ToyFontFace(:class:`FontFace`)
+====================================
+
+The *cairo.ToyFontFace* class can be used instead of :meth:`Context.select_font_face` to create a toy font independently of a context.
+
+.. class:: ToyFontFace(family, [slant[, weight]])
+
+   :param family: a font family name, encoded in UTF-8
+   :type family: str
+   :param slant: the slant of the font, by default
+        :attr:`cairo.FONT_SLANT_NORMAL`.  See :ref:`SLANT attributes
+        <mattributes_slant>` for details of the slant values available.
+   :param weight: the weight of the font, by default
+        :attr:`cairo.FONT_WEIGHT_NORMAL`.  See :ref:`WEIGHT attributes
+	<mattributes_weight>` for details of the available weights.
+   :returns: a new *ToyFontFace*
+
+   Creates a *ToyFontFace* from a triplet of family, slant, and weight. These
+   font faces are used in implementation of the the cairo_t "toy" font API.
+
+   If family is the zero-length string "", the platform-specific default
+   family is assumed. The default family then can be queried using
+   :meth:`.get_family`.
+
+   The :meth:`Context.select_font_face` method uses this to create font
+   faces. See that function for limitations of toy font faces.
+
+   .. versionadded:: 1.8.4
+
+   .. method:: get_family()
+
+      :returns: the family name
+      :rtype: str
+
+      Gets the familly name of a toy font.
+
+      .. versionadded:: 1.8.4
+
+   .. method:: get_slant()
+
+      :returns: the slant value
+
+      Gets the slant a toy font.
+
+      .. versionadded:: 1.8.4
+
+   .. method:: get_weight()
+
+      :returns: the weight value
+
+      Gets the weight a toy font.
+
+      .. versionadded:: 1.8.4
+
 
 class ScaledFont()
 ==================
@@ -64,7 +121,7 @@
 
       :returns: the :class:`FontFace` that this *ScaledFont* was created for.
 
-      Since: 1.2
+      .. versionadded:: 1.2
 
    .. method:: get_scale_matrix()
 
@@ -74,7 +131,7 @@
       with the scaled font, and hence is the matrix mapping from font space to
       device space.
 
-      Since: 1.8
+      .. versionadded:: 1.8
 
 
    .. method:: text_extents()
@@ -96,7 +153,7 @@
       trailing whitespace characters are likely to not affect the size of the
       rectangle, though they will affect the x_advance and y_advance values.
 
-      Since: 1.2
+      .. versionadded:: 1.2
 
 
 class FontOptions()



More information about the cairo-commit mailing list