src/reportlab/pdfbase/pdfdoc.py
changeset 3712 960245b5737e
parent 3711 49cde747af53
child 3713 2e111f9f105c
--- a/src/reportlab/pdfbase/pdfdoc.py	Tue Jul 09 11:38:52 2013 -0600
+++ b/src/reportlab/pdfbase/pdfdoc.py	Tue Jul 09 11:48:13 2013 -0600
@@ -1723,7 +1723,12 @@
 
 class HighlightAnnotation(Annotation):
     """
-    HighlightAnnotation adds a highlighted
+    HighlightAnnotation is an annotation that highlights the selected area.
+
+    Rect is the mouseover area that will show the contents.
+
+    QuadPoints is a list of points to highlight, you can have many groups of
+    four QuadPoints to allow highlighting many lines.
     """
     permitted = Annotation.permitted + ("QuadPoints", )
 
@@ -1739,13 +1744,13 @@
         Rect = d["Rect"]
         Quad = d["QuadPoints"]
         Color = d["C"]
-        if type(Rect) is not types.StringType:
+        if not isinstance(Rect, str):
             d["Rect"] = PDFArray(Rect)
-        if type(Quad) is not types.StringType:
+        if not isinstance(Quad, str):
             d["QuadPoints"] = PDFArray(Quad)
-        if type(Color) is not types.StringType:
+        if not isinstance(Color, str):
             d["C"] = PDFArray(Color)
-        d["Contents"] = PDFString(d["Contents"],escape)
+        d["Contents"] = PDFString(d["Contents"], escape)
         return d
 
     def Dict(self):