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

Method drawText

Lib/pagebot/contexts/basecontext/basecontext.py:910–920  ·  view source on GitHub ↗

Draws the text block, in case a width or height is defined.

(self, bs, box)

Source from the content-addressed store, hash-verified

908 self.textBox(bs, box)
909
910 def drawText(self, bs, box):
911 """Draws the text block, in case a width or height is defined."""
912 assert isinstance(bs, BabelString),\
913 'drawText needs a BabelString: %s' % (bs.__class__.__name__)
914 _, _, w, h = box
915 if bs.w is None:
916 bs.w = w
917 if bs.h is None:
918 bs.h = h
919
920 self.textBox(bs, upt(box))
921
922 def textOverflow(self, lines, h, align=None):
923 """Answers the part of the text that doesn't fit in the box.

Callers 1

buildMethod · 0.45

Calls 2

uptFunction · 0.90
textBoxMethod · 0.45

Tested by

no test coverage detected