~ubuntu-branches/debian/sid/pyx/sid

« back to all changes in this revision

Viewing changes to pyx/pattern.py

  • Committer: Package Import Robot
  • Author(s): Stuart Prescott
  • Date: 2012-12-17 13:45:12 UTC
  • mfrom: (1.1.4)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20121217134512-u0w6lrgdowsc1sfu
Tags: 0.12.1-1
* New upstream release
* Update maintainer address.
* Update copyright format URL.
* Bump standards version to 3.9.4 (no changes required).
* Drop postinst that was needed for lenny->squeeze upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
# TODO: pattern should not derive from canvas but wrap a canvas
30
30
 
31
 
class pattern(canvas._canvas, attr.exclusiveattr, style.fillstyle):
 
31
class pattern(canvas.canvas, attr.exclusiveattr, style.fillstyle):
32
32
 
33
33
    def __init__(self, painttype=1, tilingtype=1, xstep=None, ystep=None,
34
34
                 bbox=None, trafo=None, bboxenlarge=5*unit.t_pt, **kwargs):
35
 
        canvas._canvas.__init__(self, **kwargs)
 
35
        canvas.canvas.__init__(self, **kwargs)
36
36
        attr.exclusiveattr.__init__(self, pattern)
37
37
        self.id = "pattern%d" % id(self)
38
38
        self.patterntype = 1
73
73
        # process pattern, letting it register its resources and calculate the bbox of the pattern
74
74
        patternfile = cStringIO.StringIO()
75
75
        realpatternbbox = bboxmodule.empty()
76
 
        canvas._canvas.processPS(self, patternfile, writer, pswriter.context(), registry, realpatternbbox)
 
76
        canvas.canvas.processPS(self, patternfile, writer, pswriter.context(), registry, realpatternbbox)
77
77
        patternproc = patternfile.getvalue()
78
78
        patternfile.close()
79
79
 
114
114
 
115
115
        patternfile = cStringIO.StringIO()
116
116
        realpatternbbox = bboxmodule.empty()
117
 
        canvas._canvas.processPDF(self, patternfile, writer, pdfwriter.context(), patternregistry, realpatternbbox)
 
117
        canvas.canvas.processPDF(self, patternfile, writer, pdfwriter.context(), patternregistry, realpatternbbox)
118
118
        patternproc = patternfile.getvalue()
119
119
        patternfile.close()
120
120