diff --git a/PIL/ImageDraw.py b/PIL/ImageDraw.py index a3e527091..b674e6763 100644 --- a/PIL/ImageDraw.py +++ b/PIL/ImageDraw.py @@ -50,8 +50,8 @@ class ImageDraw(object): """ Create a drawing instance. - @param im The image to draw in. - @param mode Optional mode to use for color values. For RGB + :param im: The image to draw in. + :param mode: Optional mode to use for color values. For RGB images, this argument can be RGB or RGBA (to blend the drawing into the image). For all other modes, this argument must be the same as the image mode. If omitted, the mode @@ -286,8 +286,8 @@ def Draw(im, mode=None): """ A simple 2D drawing interface for PIL images. - @param im The image to draw in. - @param mode Optional mode to use for color values. For RGB + :param im: The image to draw in. + :param mode: Optional mode to use for color values. For RGB images, this argument can be RGB or RGBA (to blend the drawing into the image). For all other modes, this argument must be the same as the image mode. If omitted, the mode @@ -310,9 +310,9 @@ def getdraw(im=None, hints=None): (Experimental) A more advanced 2D drawing interface for PIL images, based on the WCK interface. - @param im The image to draw in. - @param hints An optional list of hints. - @return A (drawing context, drawing resource factory) tuple. + :param im: The image to draw in. + :param hints: An optional list of hints. + :returns: A (drawing context, drawing resource factory) tuple. """ # FIXME: this needs more work! # FIXME: come up with a better 'hints' scheme. @@ -333,10 +333,10 @@ def floodfill(image, xy, value, border=None): """ (experimental) Fills a bounded region with a given color. - @param image Target image. - @param xy Seed position (a 2-item coordinate tuple). - @param value Fill color. - @param border Optional border value. If given, the region consists of + :param image: Target image. + :param xy: Seed position (a 2-item coordinate tuple). + :param value: Fill color. + :param border: Optional border value. If given, the region consists of pixels with a color different from the border color. If not given, the region consists of pixels having the same color as the seed pixel. diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py index c18ff22d3..08d333b73 100644 --- a/PIL/ImageShow.py +++ b/PIL/ImageShow.py @@ -42,10 +42,10 @@ def show(image, title=None, **options): """ Display a given image. - @param image An image object. - @param title Optional title. Not all viewers can display the title. - @param **options Additional viewer options. - @return True if a suitable viewer was found, false otherwise. + :param image: An image object. + :param title: Optional title. Not all viewers can display the title. + :param \**options: Additional viewer options. + :returns: True if a suitable viewer was found, false otherwise. """ for viewer in _viewers: if viewer.show(image, title=title, **options): diff --git a/PIL/ImageTransform.py b/PIL/ImageTransform.py index 9f48833ab..93eba9924 100644 --- a/PIL/ImageTransform.py +++ b/PIL/ImageTransform.py @@ -41,10 +41,10 @@ class AffineTransform(Transform): This function can be used to scale, translate, rotate, and shear the original image. - @def AffineTransform(matrix) - @param matrix A 6-tuple (a, b, c, d, e, f) containing the first two rows + See :py:meth:`~PIL.Image.Image.transform` + + :param matrix: A 6-tuple (a, b, c, d, e, f) containing the first two rows from an affine transform matrix. - @see Image#Image.transform """ method = Image.AFFINE @@ -62,10 +62,10 @@ class ExtentTransform(Transform): rectangle in the current image. It is slightly slower than crop, but about as fast as a corresponding resize operation. - @def ExtentTransform(bbox) - @param bbox A 4-tuple (x0, y0, x1, y1) which specifies two points in the + See :py:meth:`~PIL.Image.Image.transform` + + :param bbox: A 4-tuple (x0, y0, x1, y1) which specifies two points in the input image's coordinate system. - @see Image#Image.transform """ method = Image.EXTENT @@ -77,11 +77,11 @@ class QuadTransform(Transform): Maps a quadrilateral (a region defined by four corners) from the image to a rectangle of the given size. - @def QuadTransform(xy) - @param xy An 8-tuple (x0, y0, x1, y1, x2, y2, y3, y3) which contain the + See :py:meth:`~PIL.Image.Image.transform` + + :param xy: An 8-tuple (x0, y0, x1, y1, x2, y2, y3, y3) which contain the upper left, lower left, lower right, and upper right corner of the source quadrilateral. - @see Image#Image.transform """ method = Image.QUAD @@ -91,9 +91,9 @@ class MeshTransform(Transform): Define a mesh image transform. A mesh transform consists of one or more individual quad transforms. - @def MeshTransform(data) - @param data A list of (bbox, quad) tuples. - @see Image#Image.transform + See :py:meth:`~PIL.Image.Image.transform` + + :param data: A list of (bbox, quad) tuples. """ method = Image.MESH