Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/PIL/ImagePath.py
blob: 120a607477efad1d59754b403c75bff0c45b3496 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# The Python Imaging Library
# $Id: ImagePath.py 2134 2004-10-06 08:55:20Z fredrik $
#
# 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.
#

import Image

##
# Path wrapper.

class Path:

    ##
    # Creates a path object.
    #
    # @param xy Sequence.  The sequence can contain 2-tuples [(x, y), ...]
    #     or a flat list of numbers [x, y, ...].

    def __init__(self, xy):
        pass

    ##
    # Compacts the path, by removing points that are close to each
    # other.  This method modifies the path in place.

    def compact(self, distance=2):
        pass

    ##
    # Gets the bounding box.

    def getbbox(self):
        pass

    ##
    # Maps the path through a function.

    def map(self, function):
        pass

    ##
    # 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.

    def tolist(self, flat=0):
        pass

    ##
    # Transforms the path.

    def transform(self, matrix):
        pass


# override with C implementation
Path = Image.core.path