(spec)
| 317 | self.csmap = PREDEFINED_COLORSPACE.copy() |
| 318 | if not resources: return |
| 319 | def get_colorspace(spec): |
| 320 | if isinstance(spec, list): |
| 321 | name = literal_name(spec[0]) |
| 322 | else: |
| 323 | name = literal_name(spec) |
| 324 | if name == 'ICCBased' and isinstance(spec, list) and 2 <= len(spec): |
| 325 | return PDFColorSpace(name, stream_value(spec[1])['N']) |
| 326 | elif name == 'DeviceN' and isinstance(spec, list) and 2 <= len(spec): |
| 327 | return PDFColorSpace(name, len(list_value(spec[1]))) |
| 328 | else: |
| 329 | return PREDEFINED_COLORSPACE[name] |
| 330 | for (k,v) in dict_value(resources).iteritems(): |
| 331 | if 2 <= self.debug: |
| 332 | print >>sys.stderr, 'Resource: %r: %r' % (k,v) |
nothing calls this directly
no test coverage detected