MCPcopy Index your code
hub / github.com/clips/pattern / init_state

Method init_state

pattern/web/pdf/pdfinterp.py:352–366  ·  view source on GitHub ↗
(self, ctm)

Source from the content-addressed store, hash-verified

350 # init_state(ctm)
351 # Initialize the text and graphic states for rendering a page.
352 def init_state(self, ctm):
353 # gstack: stack for graphical states.
354 self.gstack = []
355 self.ctm = ctm
356 self.device.set_ctm(self.ctm)
357 self.textstate = PDFTextState()
358 self.graphicstate = PDFGraphicState()
359 self.curpath = []
360 # argstack: stack for command arguments.
361 self.argstack = []
362 # set some global states.
363 self.scs = self.ncs = None
364 if self.csmap:
365 self.scs = self.ncs = self.csmap.values()[0]
366 return
367
368 def push(self, obj):
369 self.argstack.append(obj)

Callers 1

render_contentsMethod · 0.95

Calls 4

PDFTextStateClass · 0.85
PDFGraphicStateClass · 0.85
set_ctmMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected