2
# The Python Imaging Library
8
# 1996-11-04 fl Created
9
# 2002-04-14 fl Added documentation stub class
11
# Copyright (c) Secret Labs AB 1997.
12
# Copyright (c) Fredrik Lundh 1996.
14
# See the README file for information on usage and redistribution.
25
# Creates a path object.
27
# @param xy Sequence. The sequence can contain 2-tuples [(x, y), ...]
28
# or a flat list of numbers [x, y, ...].
30
def __init__(self, xy):
34
# Compacts the path, by removing points that are close to each
35
# other. This method modifies the path in place.
37
def compact(self, distance=2):
41
# Gets the bounding box.
47
# Maps the path through a function.
49
def map(self, function):
53
# Converts the path to Python list.
55
# @param flat By default, this function returns a list of 2-tuples
56
# [(x, y), ...]. If this argument is true, it returns a flat
57
# list [x, y, ...] instead.
58
# @return A list of coordinates.
60
def tolist(self, flat=0):
64
# Transforms the path.
66
def transform(self, matrix):
70
# override with C implementation
71
Path = Image.core.path