MCPcopy Create free account
hub / github.com/PageBot/PageBot / __init__

Method __init__

Lib/pagebot/contexts/basecontext/basecontext.py:52–90  ·  view source on GitHub ↗
(self, name=None)

Source from the content-addressed store, hash-verified

50 EXPORT_TYPES = None
51
52 def __init__(self, name=None):
53 self.name = name or self.__class__.__name__
54 # Holds current open Bézier path.
55 self._bezierpath = None
56
57 self._fill = blackColor
58 self._stroke = noColor
59 self._strokeWidth = 0
60 self._textFill = blackColor
61 self._textStroke = noColor
62 self._textStrokeWidth = 0
63 font = findFont(DEFAULT_FONT)
64 self._font = font.path
65 self._fontSize = DEFAULT_FONT_SIZE
66 self._frameDuration = 0
67 self._fonts = {}
68
69 # Origin set by self.translate()
70 self._ox = pt(0)
71 self._oy = pt(0)
72 self._sx = 1
73 self._sy = 1
74 #self._sz = 1
75 self._rotationCenter = (0, 0)
76 self._rotate = 0
77 self._hyphenation = True
78 self._language = DEFAULT_LANGUAGE
79 self._openTypeFeatures = None # FIXME: what type?
80
81 # Stack of graphic states.
82 self._gState = []
83
84 self._pages = []
85 self.style = None
86 self.units = Pt.UNIT
87 self.hasPIL = False
88
89 if HAS_PIL:
90 self.hasPIL = True
91
92 def __repr__(self):
93 return '<%s>' % self.name

Callers

nothing calls this directly

Calls 2

findFontFunction · 0.90
ptFunction · 0.90

Tested by

no test coverage detected