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

Class Name

lib/matplotlib/backends/backend_pdf.py:395–425  ·  view source on GitHub ↗

PDF name object.

Source from the content-addressed store, hash-verified

393
394@total_ordering
395class Name:
396 """PDF name object."""
397 __slots__ = ('name',)
398 _hexify = {c: '#%02x' % c
399 for c in {*range(256)} - {*range(ord('!'), ord('~') + 1)}}
400
401 def __init__(self, name):
402 if isinstance(name, Name):
403 self.name = name.name
404 else:
405 if isinstance(name, bytes):
406 name = name.decode('ascii')
407 self.name = name.translate(self._hexify).encode('ascii')
408
409 def __repr__(self):
410 return "<Name %s>" % self.name
411
412 def __str__(self):
413 return '/' + self.name.decode('ascii')
414
415 def __eq__(self, other):
416 return isinstance(other, Name) and self.name == other.name
417
418 def __lt__(self, other):
419 return isinstance(other, Name) and self.name < other.name
420
421 def __hash__(self):
422 return hash(self.name)
423
424 def pdfRepr(self):
425 return b'/' + self.name
426
427
428class Verbatim:

Callers 15

_create_pdf_info_dictFunction · 0.85
_get_link_annotationFunction · 0.85
pdfReprFunction · 0.85
__init__Method · 0.85
_writeHeaderMethod · 0.85
__init__Method · 0.85
newPageMethod · 0.85
newTextnoteMethod · 0.85
finalizeMethod · 0.85
dviFontNameMethod · 0.85
_write_afm_fontMethod · 0.85
_embedTeXFontMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…