@@ -399,8 +399,8 @@ def pdfRepr(self):
399
399
return b'/' + self .name
400
400
401
401
402
+ @_api .deprecated ("3.6" )
402
403
class Operator :
403
- """PDF operator object."""
404
404
__slots__ = ('op' ,)
405
405
406
406
def __init__ (self , op ):
@@ -422,46 +422,52 @@ def pdfRepr(self):
422
422
return self ._x
423
423
424
424
425
- # PDF operators (not an exhaustive list)
426
- class Op (Operator , Enum ):
425
+ class Op (Enum ):
426
+ """PDF operators (not an exhaustive list)."""
427
+
427
428
close_fill_stroke = b'b'
428
429
fill_stroke = b'B'
429
430
fill = b'f'
430
- closepath = b'h' ,
431
+ closepath = b'h'
431
432
close_stroke = b's'
432
433
stroke = b'S'
433
434
endpath = b'n'
434
- begin_text = b'BT' ,
435
+ begin_text = b'BT'
435
436
end_text = b'ET'
436
437
curveto = b'c'
437
438
rectangle = b're'
438
439
lineto = b'l'
439
- moveto = b'm' ,
440
+ moveto = b'm'
440
441
concat_matrix = b'cm'
441
442
use_xobject = b'Do'
442
- setgray_stroke = b'G' ,
443
+ setgray_stroke = b'G'
443
444
setgray_nonstroke = b'g'
444
445
setrgb_stroke = b'RG'
445
- setrgb_nonstroke = b'rg' ,
446
+ setrgb_nonstroke = b'rg'
446
447
setcolorspace_stroke = b'CS'
447
- setcolorspace_nonstroke = b'cs' ,
448
+ setcolorspace_nonstroke = b'cs'
448
449
setcolor_stroke = b'SCN'
449
450
setcolor_nonstroke = b'scn'
450
- setdash = b'd' ,
451
+ setdash = b'd'
451
452
setlinejoin = b'j'
452
453
setlinecap = b'J'
453
454
setgstate = b'gs'
454
- gsave = b'q' ,
455
+ gsave = b'q'
455
456
grestore = b'Q'
456
457
textpos = b'Td'
457
458
selectfont = b'Tf'
458
- textmatrix = b'Tm' ,
459
+ textmatrix = b'Tm'
459
460
show = b'Tj'
460
461
showkern = b'TJ'
461
462
setlinewidth = b'w'
462
463
clip = b'W'
463
464
shading = b'sh'
464
465
466
+ op = _api .deprecated ('3.6' )(property (lambda self : self .value ))
467
+
468
+ def pdfRepr (self ):
469
+ return self .value
470
+
465
471
@classmethod
466
472
def paint_path (cls , fill , stroke ):
467
473
"""
@@ -1833,7 +1839,8 @@ def pathOperations(path, transform, clip=None, simplify=None, sketch=None):
1833
1839
return [Verbatim (_path .convert_to_string (
1834
1840
path , transform , clip , simplify , sketch ,
1835
1841
6 ,
1836
- [Op .moveto .op , Op .lineto .op , b'' , Op .curveto .op , Op .closepath .op ],
1842
+ [Op .moveto .value , Op .lineto .value , b'' , Op .curveto .value ,
1843
+ Op .closepath .value ],
1837
1844
True ))]
1838
1845
1839
1846
def writePath (self , path , transform , clip = False , sketch = None ):
0 commit comments