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

Method build_inds

Lib/pagebot/elements/image.py:400–413  ·  view source on GitHub ↗

It is better to have a separate InDesignContext build tree, since we need more information down there than just drawing instructions. This way the InDesignContext just gets the PageBot Element passed over, using its own API.

(self, view, origin)

Source from the content-addressed store, hash-verified

398 '''
399
400 def build_inds(self, view, origin):
401 """It is better to have a separate InDesignContext build tree, since we
402 need more information down there than just drawing instructions.
403
404 This way the InDesignContext just gets the PageBot Element passed over,
405 using its own API."""
406 context = view.context
407 p = pointOffset(self.origin, origin)
408 p2D = point2D(self._applyAlignment(p)) # Ignore z-axis for now.
409 context.image(self.path, p2D, pageNumber=self.index,
410 alpha=self._getAlpha(), w=self.w, h=self.h,
411 scaleType=self.scaleType, e=self)
412 for e in self.elements:
413 e.build_inds(view, p2D)
414
415 def prepare(self, view):
416 """Respond to the top-down element broadcast to prepare for build. If

Callers

nothing calls this directly

Calls 5

_getAlphaMethod · 0.95
pointOffsetFunction · 0.90
point2DFunction · 0.90
_applyAlignmentMethod · 0.80
imageMethod · 0.45

Tested by

no test coverage detected