minor edits, filled in some blanks
Thu, 13 Jul 2000 14:40:49 +0000
changeset 374 1342601fdc4a
parent 373 8e76a875686f
child 375 301cae28e052
minor edits, filled in some blanks
--- a/docs/userguide/ch2_graphics.py	Thu Jul 13 14:33:38 2000 +0000
+++ b/docs/userguide/ch2_graphics.py	Thu Jul 13 14:40:49 2000 +0000
@@ -252,7 +252,7 @@
 A program creates a text object from the $canvas$ using $beginText$
 and then formats text by invoking $textobject$ methods.
 Finally the $textobject$ is drawn onto the canvas using
 heading3("The path object methods")
@@ -261,15 +261,38 @@
 eg("""canvas.drawPath(path, stroke=1, fill=0) """)
 eg("""canvas.clipPath(path, stroke=1, fill=0) """)
+Path objects are similar to text objects: they provide dedicated control
+for performing complex graphical drawing not directly provided by the
+canvas interface.  A program creates a path object using $beginPath$
+populates the path with graphics using the methods of the path object
+and then draws the path on the canvas using $drawPath$.""")
+disc("""It is also possible
+to use a path as a "clipping region" using the $clipPath$ method -- for example a circular path
+can be used to clip away the outer parts of a rectangular image leaving
+only a circular part of the image visible on the page. 
 heading3("Image methods")
 eg("""canvas.drawInlineImage(self, image, x,y, width=None,height=None) """)
+The $drawInlineImage$ method places an image on the canvas.
+You need the Python Imaging Library (PIL) to use images with the ReportLab package.
 heading3("Ending a page")
-disc("""The showPage method finishes the current page.  All additional drawing will
+disc("""The $showPage$ method finishes the current page.  All additional drawing will
 be done on another page.""")
@@ -297,9 +320,24 @@
 eg("""canvas.setFillGray(gray) """)
 eg("""canvas.setStrokeGray(gray) """)
+PDF supports three different color models: gray level, additive (red/green/blue or RGB), and
+subtractive with darkness parameter (cyan/magenta/yellow/darkness or CMYK).
+The ReportLab packages also provide named colors such as $lawngreen$.  There are two
+basic color parameters in the graphics state: the $Fill$ color for the interior of graphic
+figures and the $Stroke$ color for the boundary of graphic figures.  The above methods
+support setting the fill or stroke color using any of the four color specifications.
 heading3("Changing Fonts")
 eg("""canvas.setFont(psfontname, size, leading = None) """)
+The $setFont$ method changes the current text font to a given type and size.
+The $leading$ parameter specifies the distance down to move when advancing from
+one text line to the next.
 heading3("Changing Graphical Line Styles")
 eg("""canvas.setLineWidth(width) """)
--- a/docs/userguide/ch3_pdffeatures.py	Thu Jul 13 14:33:38 2000 +0000
+++ b/docs/userguide/ch3_pdffeatures.py	Thu Jul 13 14:40:49 2000 +0000
@@ -171,4 +171,28 @@
 page during interactive viewing.  These effects are useful in spicing up
 slide presentations, mong other places.
 Please see the reference manual for more detail on how to use this method.
\ No newline at end of file
+heading2("Internal File Annotations")
+ canvas.setAuthor(name)
+ canvas.setTitle(title)
+ canvas.setSubject(subj)
+ """)
+These methods have no automatically seen visible effect on the document.
+They add internal annotations to the document.
+If you want the subject, title, and author to automatically display
+in the document when viewed and printed you must paint them onto the
+document like any other text.
+illust(examples.annotations, "Setting document internal annotations")
\ No newline at end of file
--- a/docs/userguide/examples.py	Thu Jul 13 14:33:38 2000 +0000
+++ b/docs/userguide/examples.py	Thu Jul 13 14:40:49 2000 +0000
@@ -1,5 +1,16 @@
 import string
+def annotations(canvas):
+    from reportlab.lib.units import inch
+    canvas.drawString(inch, 2.5*inch, "setAuthor, setTitle, setSubject have no visible effect")
+    canvas.drawString(inch, inch, "But if you are viewing this document dynamically")
+    canvas.drawString(inch, 0.5*inch, "please look at File/Document Info")
+    canvas.setAuthor("the ReportLab Team")
+    canvas.setTitle("ReportLab PDF Generation User Guide")
+    canvas.setSubject("How to Generate PDF files using the ReportLab modules")
 # magic function making module
 test1 = """