From a0532b6a02a2d8fb72d76212bb2630ed5d6f1f1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Thu, 18 May 2006 17:42:58 +0000 Subject: [PATCH] make the process with processmethod local to the page (still getattr, but at least its completely page internal) git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@2721 069f4177-920e-0410-937b-c2a4a81bcd90 --- pyx/document.py | 8 +++++++- pyx/pdfwriter.py | 2 +- pyx/pswriter.py | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pyx/document.py b/pyx/document.py index 8cd13909..45e320cb 100644 --- a/pyx/document.py +++ b/pyx/document.py @@ -67,7 +67,7 @@ class page: self.bboxenlarge = bboxenlarge self.pagebbox = bbox - def process(self, processMethod, contentfile, writer, context, registry, bbox): + def _process(self, processMethod, contentfile, writer, context, registry, bbox): assert not bbox # check whether we expect a page trafo and use a temporary canvasfile to insert the @@ -135,6 +135,12 @@ class page: contentfile.write(canvasfile.getvalue()) canvasfile.close() + def processPS(self, *args): + self._process("processPS", *args) + + def processPDF(self, *args): + self._process("processPDF", *args) + class document: diff --git a/pyx/pdfwriter.py b/pyx/pdfwriter.py index ec65eaa4..c11e8bad 100644 --- a/pyx/pdfwriter.py +++ b/pyx/pdfwriter.py @@ -255,7 +255,7 @@ class PDFcontent(PDFobject): contentfile = cStringIO.StringIO() self.bbox = bbox.empty() acontext = context() - page.process("processPDF", contentfile, writer, acontext, registry, self.bbox) + page.processPDF(contentfile, writer, acontext, registry, self.bbox) self.content = contentfile.getvalue() contentfile.close() diff --git a/pyx/pswriter.py b/pyx/pswriter.py index f704a9f1..6fb2e750 100644 --- a/pyx/pswriter.py +++ b/pyx/pswriter.py @@ -260,7 +260,7 @@ class epswriter: acontext = context() pagebbox = bbox.empty() - page.process("processPS", pagefile, self, acontext, registry, pagebbox) + page.processPS(pagefile, self, acontext, registry, pagebbox) file.write("%!PS-Adobe-3.0 EPSF-3.0\n") if pagebbox: @@ -309,7 +309,7 @@ class pswriter: pagefile = cStringIO.StringIO() acontext = context() pagebbox = bbox.empty() - page.process("processPS", pagefile, self, acontext, registry, pagebbox) + page.processPS(pagefile, self, acontext, registry, pagebbox) documentbbox += pagebbox -- 2.11.4.GIT