4 # Copyright (C) 2002 Jörg Lehmann <joergl@users.sourceforge.net>
5 # Copyright (C) 2002 André Wobst <wobsta@users.sourceforge.net>
7 # This file is part of PyX (http://pyx.sourceforge.net/).
9 # PyX is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # PyX is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with PyX; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 # Postscript operators
31 Everything, you can write in a (E)PS file
35 def write(self
, file):
36 """writing into a file is the only routine, a PSOp has to supply"""
37 raise NotImplementedError, "cannot call virtual method write()"
45 """ PSCmd is the base class of all visible elements
47 Visible elements are those, that can be embedded in the Canvas
53 raise NotImplementedError, "cannot call virtual method bbox()"
61 """ PSText is the base class of all text elements
63 Text elements are those, that (may) contain text and thus provide a
64 writefontheader method.
68 def writefontheader(self
, file, containsfonts
):
69 raise NotImplementedError, "cannot call virtual method writefontheader()"
74 # note that as usual in PyX most classes have default instances as members
76 class PathStyle(PSOp
):
78 """style modifiers for paths
90 class PyXExcept(Exception):
92 """base class for all PyX Exceptions"""