MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / writeXref

Method writeXref

lib/matplotlib/backends/backend_pdf.py:1842–1853  ·  view source on GitHub ↗

Write out the xref table.

(self)

Source from the content-addressed store, hash-verified

1840 object.write(contents, self)
1841
1842 def writeXref(self):
1843 """Write out the xref table."""
1844 self.startxref = self.fh.tell() - self.tell_base
1845 self.write(b"xref\n0 %d\n" % len(self.xrefTable))
1846 for i, (offset, generation, name) in enumerate(self.xrefTable):
1847 if offset is None:
1848 raise AssertionError(
1849 'No offset for object %d (%s)' % (i, name))
1850 else:
1851 key = b"f" if name == 'the zero object' else b"n"
1852 text = b"%010d %05d %b \n" % (offset, generation, key)
1853 self.write(text)
1854
1855 def writeInfoDict(self):
1856 """Write out the info dictionary, checking it for good form"""

Callers 1

finalizeMethod · 0.95

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected