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

Method drawPageMetaInfo

Lib/pagebot/elements/views/pageview.py:225–255  ·  view source on GitHub ↗

Draw the foreground meta info of the page, depending on the settings. >>> from pagebot import getContext >>> context = getContext() >>> from pagebot.document import Document >>> path = '_export/PageMetaInfo.pdf' >>> w, h = 300, 400 >>> doc = D

(self, page, origin, path=None)

Source from the content-addressed store, hash-verified

223 # D R A W I N G P A G E M E T A I N F O
224
225 def drawPageMetaInfo(self, page, origin, path=None):
226 """Draw the foreground meta info of the page, depending on the
227 settings.
228
229 >>> from pagebot import getContext
230 >>> context = getContext()
231 >>> from pagebot.document import Document
232 >>> path = '_export/PageMetaInfo.pdf'
233 >>> w, h = 300, 400
234 >>> doc = Document(w=w, h=h, autoPages=1, padding=30, context=context)
235 >>> #doc.view.padding # result is (0, 0, 0, 0), shouldn't be 30pt?
236 >>> page = doc[1]
237 >>> #page.view.padding
238 >>> # result is (0, 0, 0, 0), shouldn't be 30pt?
239 >>> view = doc.getView()
240 >>> view.showGrid = [GRID_COL, GRID_ROW]
241 >>> view.drawPageMetaInfo(page, (0, 0), path)
242 """
243 self.drawFrame(page, origin)
244 self.drawMargin(page, origin)
245 self.drawPadding(page, origin)
246
247 # Use path to show file name in page meta info.
248 self.drawNameInfo(page, origin, path)
249
250 # Color bars under registration marks?
251 self.drawColorBars(page, origin)
252 self.drawRegistrationMarks(page, origin)
253 self.drawCropMarks(page, origin)
254 self.drawGrid(page, origin, background=False)
255 self.drawBaselines(page, origin, background=False)
256
257 def drawPageMetaInfoBackground(self, page, origin, path=None):
258 """Draws the background meta info on the page, depending on the

Callers 1

buildMethod · 0.95

Calls 9

drawFrameMethod · 0.95
drawMarginMethod · 0.95
drawPaddingMethod · 0.95
drawNameInfoMethod · 0.95
drawColorBarsMethod · 0.95
drawRegistrationMarksMethod · 0.95
drawCropMarksMethod · 0.95
drawGridMethod · 0.95
drawBaselinesMethod · 0.95

Tested by

no test coverage detected