centering some images
authorrgbecker
Fri, 14 Sep 2001 13:02:44 +0000
changeset 1211 5aaff40e1a3c
parent 1210 56ccf2bef0f9
child 1212 f13aa677b280
centering some images
docs/userguide/ch6_tables.py
docs/userguide/ch7_custom.py
--- a/docs/userguide/ch6_tables.py	Fri Sep 14 11:35:59 2001 +0000
+++ b/docs/userguide/ch6_tables.py	Fri Sep 14 13:02:44 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/ch6_tables.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/userguide/ch6_tables.py,v 1.18 2001/08/11 14:35:52 rgbecker Exp $
+#$Header: /tmp/reportlab/docs/userguide/ch6_tables.py,v 1.19 2001/09/14 13:02:44 rgbecker Exp $
 from rl_doc_utils import *
 from reportlab.platypus import Image
 
@@ -311,10 +311,13 @@
 	disc("""An image should have appeared here.""")
 disc("""whereas""")
 eg("""
-Image("lj8100.jpg", width=2*inch, height=2*inch)
+im = Image("lj8100.jpg", width=2*inch, height=2*inch)
+im.hAlign = 'CENTER'
 """, after=0.1)
 disc('produces')
 try:
+	im = Image(I, width=2*inch, height=2*inch)
+	im.hAlign = 'CENTER'
 	getStory().append(Image(I, width=2*inch, height=2*inch))
 except:
 	disc("""An image should have appeared here.""")
--- a/docs/userguide/ch7_custom.py	Fri Sep 14 11:35:59 2001 +0000
+++ b/docs/userguide/ch7_custom.py	Fri Sep 14 13:02:44 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2000
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/userguide/ch7_custom.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/userguide/ch7_custom.py,v 1.8 2001/08/11 14:35:52 rgbecker Exp $
+#$Header: /tmp/reportlab/docs/userguide/ch7_custom.py,v 1.9 2001/09/14 13:02:44 rgbecker Exp $
 from rl_doc_utils import *
 
 heading1("Writing your own $Flowable$ Objects")
@@ -78,4 +78,5 @@
 		self.canv.rotate(90)
 		Image.draw(self)
 I = RotatedImage('%s')
+I.hAlign = 'CENTER'
 """ % I,'I')