This file is indexed.

/usr/lib/python3/dist-packages/pyx/baseclasses.py is in python3-pyx 0.14.1-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
72
73
74
# -*- encoding: utf-8 -*-
#
#
# Copyright (C) 2002-2007 Jörg Lehmann <joergl@users.sourceforge.net>
# Copyright (C) 2002-2007 André Wobst <wobsta@users.sourceforge.net>
#
# This file is part of PyX (http://pyx.sourceforge.net/).
#
# PyX is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PyX is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyX; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA

from . import attr

class canvasitem:

    """Base class for everything which can be inserted into a canvas"""

    def bbox(self):
        """return bounding box of canvasitem"""
        raise NotImplementedError()

    def requiretextregion(self):
        """indicates whether a canvasitem needs to be part of a PDF text
        region"""
        return False

    def processPS(self, file, writer, context, registry, bbox):
        """process canvasitem by writing the corresponding PS code to file and
        by updating context, registry as well as bbox

        - the PS code corresponding to the canvasitem has to be written in the
          stream file, which provides a write(string) method
        - writer is the PSwriter used for the output
        - context is an instance of pswriter.context which is used for keeping
          track of the graphics state (current linewidth, colorspace and font,
          etc.)
        - registry is used for tracking resources needed by the canvasitem
        - bbox has to be updated to include the bounding box of the canvasitem
        """
        raise NotImplementedError()

    def processPDF(self, file, writer, context, registry, bbox):
        """process canvasitem by writing the corresponding PDF code to file and
        by updating context, registry as well as bbox

        - the PDF code corresponding to the canvasitem has to be written in the
          stream file, which provides a write(string) method
        - writer is the PDFwriter used for the output, which contains properties
          like whether streamcompression is used
        - context is an instance of pdfwriter.context which is used for keeping
          track of the graphics state, in particular for the emulation of PS
          behaviour regarding fill and stroke styles, for keeping track of the
          currently selected font as well as of text regions.
        - registry is used for tracking resources needed by the canvasitem
        - bbox has to be updated to include the bounding box of the canvasitem
        """
        raise NotImplementedError()


class deformer(attr.attr):

    def deform(self, basepath):
        raise NotImplementedError()