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

Method build_inds

Lib/pagebot/elements/rect.py:66–78  ·  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 it's own API.

(self, view, origin)

Source from the content-addressed store, hash-verified

64 self.drawMeta(view, origin)
65
66 def build_inds(self, view, origin):
67 """It is better to have a separate InDesignContext build tree, since we
68 need more information down there than just drawing instructions. This
69 way the InDesignContext just gets the PageBot Element passed over,
70 using it's own API."""
71 context = view.context
72 p = pointOffset(self.origin, origin)
73 # Ignore z-axis for now.
74 px, py = p2D = point2D(self._applyAlignment(p))
75 context.rect(px, py, e=self)
76
77 for e in self.elements:
78 e.build_inds(view, p2D)
79
80if __name__ == '__main__':
81 import doctest

Callers

nothing calls this directly

Calls 4

pointOffsetFunction · 0.90
point2DFunction · 0.90
_applyAlignmentMethod · 0.80
rectMethod · 0.45

Tested by

no test coverage detected