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

Method __init__

Lib/pagebot/contexts/flatcontext/flatbabeldata.py:21–28  ·  view source on GitHub ↗
(self, builder, doc, page, paragraphs, runs)

Source from the content-addressed store, hash-verified

19 """Class to store cached information in BabelString._cs."""
20
21 def __init__(self, builder, doc, page, paragraphs, runs):
22 self.builder = builder
23 self.doc = doc # Flat.document instance
24 self.page = page # Flat.page instance
25 self.paragraphs = paragraphs
26 self.txt = builder.text(paragraphs)
27 self.pt = page.place(self.txt) # Flat.placedText instance
28 self.runs = runs # List of FlatRunData instances
29 def __repr__(self):
30 spans = [span.string for p in self.paragraphs for span in p.spans]
31 # Show plain string accumulate string, compatible to DrawBotFormattedString

Callers

nothing calls this directly

Calls 2

placeMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected