Pillow/PIL/ImagePath.py

63 lines
1.3 KiB
Python
Raw Normal View History

2010-07-31 06:52:47 +04:00
#
# The Python Imaging Library
# $Id$
#
# path interface
#
# History:
# 1996-11-04 fl Created
# 2002-04-14 fl Added documentation stub class
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistribution.
#
2013-03-07 20:20:28 +04:00
from PIL import Image
2010-07-31 06:52:47 +04:00
2013-10-14 08:41:21 +04:00
# the Python class below is overridden by the C implementation.
2010-07-31 06:52:47 +04:00
2013-10-14 08:41:21 +04:00
2015-05-26 17:07:21 +03:00
class Path(object):
2010-07-31 06:52:47 +04:00
def __init__(self, xy):
pass
def compact(self, distance=2):
2016-05-24 10:36:14 +03:00
"""
Compacts the path, by removing points that are close to each other.
This method modifies the path in place.
"""
2010-07-31 06:52:47 +04:00
pass
def getbbox(self):
2016-05-24 10:36:14 +03:00
"""Gets the bounding box."""
2010-07-31 06:52:47 +04:00
pass
def map(self, function):
2016-05-24 10:36:14 +03:00
"""Maps the path through a function."""
2010-07-31 06:52:47 +04:00
pass
def tolist(self, flat=0):
2016-05-24 10:36:14 +03:00
"""
Converts the path to Python list.
#
@param flat By default, this function returns a list of 2-tuples
[(x, y), ...]. If this argument is true, it returns a flat list
[x, y, ...] instead.
@return A list of coordinates.
"""
2010-07-31 06:52:47 +04:00
pass
def transform(self, matrix):
2016-05-24 10:36:14 +03:00
"""Transforms the path."""
2010-07-31 06:52:47 +04:00
pass
# override with C implementation
Path = Image.core.path
2016-05-24 10:36:14 +03:00
# End of file