From 14ba20be55924cbab54c0bf1e9b481094c07d467 Mon Sep 17 00:00:00 2001 From: Ariel Sosnovsky Date: Wed, 23 Jan 2019 22:12:14 -0500 Subject: [PATCH] - better repr for curves and colors --- .../commands/state/PDFGraphicState/PDFColor.py | 4 +++- pdfmajor/interpreter/commands/state/layout/LTCurves.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py b/pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py index c773786..1046255 100644 --- a/pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py +++ b/pdfmajor/interpreter/commands/state/PDFGraphicState/PDFColor.py @@ -13,4 +13,6 @@ class PDFColor: ) def __repr__(self): - return f"" + return f"""""" diff --git a/pdfmajor/interpreter/commands/state/layout/LTCurves.py b/pdfmajor/interpreter/commands/state/layout/LTCurves.py index c35c159..043bed2 100644 --- a/pdfmajor/interpreter/commands/state/layout/LTCurves.py +++ b/pdfmajor/interpreter/commands/state/layout/LTCurves.py @@ -24,6 +24,14 @@ class LTCurve(LTComponent): self.stroke = stroke self.fill = fill + def __repr__(self): + return ('<%s [%s] fill=%s stroke=%s>' % ( + self.__class__.__name__, + str(self.bbox), + self.fill, + self.stroke + )) + ## LTLine ## class LTLine(LTCurve):