From db39be37af8e1f7947c186a2b4688f5963ed7cc7 Mon Sep 17 00:00:00 2001
From: pinky <>
Date: Sun, 7 Jan 2007 21:26:16 +0000
Subject: Reportlab 2.0
bzr revid: pinky-42646ca164f938abd312f6b2f8dccf73970f0c59
---
bin/reportlab/tools/pythonpoint/demos/LeERC___.AFM | 93 ++
bin/reportlab/tools/pythonpoint/demos/LeERC___.PFB | Bin 0 -> 48590 bytes
bin/reportlab/tools/pythonpoint/demos/examples.py | 841 ++++++++++++++++
bin/reportlab/tools/pythonpoint/demos/figures.xml | 71 ++
bin/reportlab/tools/pythonpoint/demos/htu.xml | 96 ++
bin/reportlab/tools/pythonpoint/demos/leftlogo.a85 | 53 +
bin/reportlab/tools/pythonpoint/demos/leftlogo.gif | Bin 0 -> 2198 bytes
bin/reportlab/tools/pythonpoint/demos/lj8100.jpg | Bin 0 -> 12463 bytes
bin/reportlab/tools/pythonpoint/demos/monterey.xml | 306 ++++++
bin/reportlab/tools/pythonpoint/demos/outline.gif | Bin 0 -> 12918 bytes
bin/reportlab/tools/pythonpoint/demos/pplogo.gif | Bin 0 -> 3429 bytes
bin/reportlab/tools/pythonpoint/demos/python.gif | Bin 0 -> 125666 bytes
.../tools/pythonpoint/demos/pythonpoint.xml | 1051 ++++++++++++++++++++
bin/reportlab/tools/pythonpoint/demos/slidebox.py | 29 +
bin/reportlab/tools/pythonpoint/demos/spectrum.png | Bin 0 -> 1855 bytes
.../tools/pythonpoint/demos/vertpython.gif | Bin 0 -> 20910 bytes
16 files changed, 2540 insertions(+)
create mode 100644 bin/reportlab/tools/pythonpoint/demos/LeERC___.AFM
create mode 100644 bin/reportlab/tools/pythonpoint/demos/LeERC___.PFB
create mode 100644 bin/reportlab/tools/pythonpoint/demos/examples.py
create mode 100644 bin/reportlab/tools/pythonpoint/demos/figures.xml
create mode 100644 bin/reportlab/tools/pythonpoint/demos/htu.xml
create mode 100644 bin/reportlab/tools/pythonpoint/demos/leftlogo.a85
create mode 100644 bin/reportlab/tools/pythonpoint/demos/leftlogo.gif
create mode 100644 bin/reportlab/tools/pythonpoint/demos/lj8100.jpg
create mode 100644 bin/reportlab/tools/pythonpoint/demos/monterey.xml
create mode 100644 bin/reportlab/tools/pythonpoint/demos/outline.gif
create mode 100644 bin/reportlab/tools/pythonpoint/demos/pplogo.gif
create mode 100644 bin/reportlab/tools/pythonpoint/demos/python.gif
create mode 100644 bin/reportlab/tools/pythonpoint/demos/pythonpoint.xml
create mode 100644 bin/reportlab/tools/pythonpoint/demos/slidebox.py
create mode 100644 bin/reportlab/tools/pythonpoint/demos/spectrum.png
create mode 100644 bin/reportlab/tools/pythonpoint/demos/vertpython.gif
(limited to 'bin/reportlab/tools/pythonpoint/demos')
diff --git a/bin/reportlab/tools/pythonpoint/demos/LeERC___.AFM b/bin/reportlab/tools/pythonpoint/demos/LeERC___.AFM
new file mode 100644
index 00000000000..fe491e473a2
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/LeERC___.AFM
@@ -0,0 +1,93 @@
+StartFontMetrics 2.0
+Comment Generated by RoboFog 08-06-2001 4:26:40 PM
+FontName LettErrorRobot-Chrome
+FullName LettErrorRobot-Chrome
+FamilyName LettErrorRobot
+Weight Medium
+Notice (C) 1998-2001 LettError, Just van Rossum, Erik van Blokland, http://www.letterror.com/
+ItalicAngle 0
+IsFixedPitch false
+UnderlinePosition -133
+UnderlineThickness 20
+Version 001.000
+EncodingScheme AdobeStandardEncoding
+FontBBox -53 -252 1047 752
+CapHeight 647
+XHeight 548
+Descender -252
+Ascender 747
+StartCharMetrics 68
+C 32 ; WX 300 ; N space ; B 0 0 0 0 ;
+C 33 ; WX 300 ; N exclam ; B 48 -52 253 652 ;
+C 38 ; WX 700 ; N ampersand ; B 48 -47 653 647 ;
+C 42 ; WX 700 ; N asterisk ; B 48 148 653 752 ;
+C 48 ; WX 700 ; N zero ; B 53 -47 648 548 ;
+C 49 ; WX 500 ; N one ; B 48 -47 453 553 ;
+C 50 ; WX 600 ; N two ; B 48 -47 553 548 ;
+C 51 ; WX 600 ; N three ; B 48 -147 553 548 ;
+C 52 ; WX 700 ; N four ; B 48 -152 653 553 ;
+C 53 ; WX 600 ; N five ; B 48 -147 553 548 ;
+C 54 ; WX 600 ; N six ; B 53 -47 553 647 ;
+C 55 ; WX 600 ; N seven ; B 48 -152 548 548 ;
+C 56 ; WX 600 ; N eight ; B 48 -47 553 647 ;
+C 57 ; WX 600 ; N nine ; B 48 -147 548 548 ;
+C 63 ; WX 500 ; N question ; B 48 -52 448 647 ;
+C 64 ; WX 800 ; N at ; B 53 -47 748 647 ;
+C 65 ; WX 700 ; N A ; B 53 -52 648 652 ;
+C 66 ; WX 600 ; N B ; B 53 -47 553 647 ;
+C 67 ; WX 600 ; N C ; B 53 -47 553 647 ;
+C 68 ; WX 700 ; N D ; B 53 -47 648 647 ;
+C 69 ; WX 600 ; N E ; B 53 -47 553 647 ;
+C 70 ; WX 600 ; N F ; B 53 -52 553 647 ;
+C 71 ; WX 700 ; N G ; B 53 -47 653 647 ;
+C 72 ; WX 700 ; N H ; B 53 -52 648 652 ;
+C 73 ; WX 300 ; N I ; B 53 -52 248 652 ;
+C 74 ; WX 300 ; N J ; B -53 -252 248 652 ;
+C 75 ; WX 700 ; N K ; B 53 -52 653 652 ;
+C 76 ; WX 600 ; N L ; B 53 -47 553 652 ;
+C 77 ; WX 900 ; N M ; B 53 -52 848 652 ;
+C 78 ; WX 700 ; N N ; B 53 -52 648 652 ;
+C 79 ; WX 700 ; N O ; B 53 -47 648 647 ;
+C 80 ; WX 600 ; N P ; B 53 -52 548 647 ;
+C 81 ; WX 700 ; N Q ; B 53 -252 653 647 ;
+C 82 ; WX 600 ; N R ; B 53 -52 653 647 ;
+C 83 ; WX 600 ; N S ; B 48 -47 553 647 ;
+C 84 ; WX 700 ; N T ; B 48 -52 653 647 ;
+C 85 ; WX 700 ; N U ; B 53 -47 648 652 ;
+C 86 ; WX 700 ; N V ; B 53 -52 648 652 ;
+C 87 ; WX 1100 ; N W ; B 53 -52 1047 652 ;
+C 88 ; WX 700 ; N X ; B 48 -52 653 652 ;
+C 89 ; WX 700 ; N Y ; B 53 -52 648 652 ;
+C 90 ; WX 700 ; N Z ; B 48 -47 653 647 ;
+C 97 ; WX 600 ; N a ; B 48 -47 548 548 ;
+C 98 ; WX 600 ; N b ; B 53 -47 548 752 ;
+C 99 ; WX 600 ; N c ; B 53 -47 553 548 ;
+C 100 ; WX 600 ; N d ; B 53 -47 548 752 ;
+C 101 ; WX 600 ; N e ; B 53 -47 553 548 ;
+C 102 ; WX 400 ; N f ; B -53 -52 453 747 ;
+C 103 ; WX 600 ; N g ; B 48 -247 548 548 ;
+C 104 ; WX 600 ; N h ; B 53 -52 548 752 ;
+C 105 ; WX 300 ; N i ; B 48 -52 253 752 ;
+C 106 ; WX 300 ; N j ; B -53 -252 253 752 ;
+C 107 ; WX 600 ; N k ; B 53 -52 553 752 ;
+C 108 ; WX 300 ; N l ; B 53 -52 248 752 ;
+C 109 ; WX 900 ; N m ; B 53 -52 848 548 ;
+C 110 ; WX 600 ; N n ; B 53 -52 548 548 ;
+C 111 ; WX 600 ; N o ; B 53 -47 548 548 ;
+C 112 ; WX 600 ; N p ; B 53 -252 548 548 ;
+C 113 ; WX 600 ; N q ; B 53 -252 548 548 ;
+C 114 ; WX 400 ; N r ; B 53 -52 453 553 ;
+C 115 ; WX 600 ; N s ; B 48 -47 553 548 ;
+C 116 ; WX 400 ; N t ; B -53 -47 453 652 ;
+C 117 ; WX 600 ; N u ; B 53 -47 548 553 ;
+C 118 ; WX 600 ; N v ; B 53 -52 548 553 ;
+C 119 ; WX 900 ; N w ; B 53 -52 848 553 ;
+C 120 ; WX 700 ; N x ; B 48 -52 653 553 ;
+C 121 ; WX 600 ; N y ; B 48 -252 548 553 ;
+C 122 ; WX 500 ; N z ; B -53 -47 553 548 ;
+EndCharMetrics
+StartKernData
+StartKernPairs 0
+EndKernPairs
+EndKernData
+EndFontMetrics
diff --git a/bin/reportlab/tools/pythonpoint/demos/LeERC___.PFB b/bin/reportlab/tools/pythonpoint/demos/LeERC___.PFB
new file mode 100644
index 00000000000..c1cf7ec189a
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/LeERC___.PFB differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/examples.py b/bin/reportlab/tools/pythonpoint/demos/examples.py
new file mode 100644
index 00000000000..14aee2336fb
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/examples.py
@@ -0,0 +1,841 @@
+import string
+
+testannotations="""
+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 = """
+def f(a,b):
+ print "it worked", a, b
+ return a+b
+"""
+
+test2 = """
+def g(n):
+ if n==0: return 1
+ else: return n*g(n-1)
+ """
+
+testhello = """
+def hello(c):
+ from reportlab.lib.units import inch
+ # move the origin up and to the left
+ c.translate(inch,inch)
+ # define a large font
+ c.setFont("Helvetica", 14)
+ # choose some colors
+ c.setStrokeColorRGB(0.2,0.5,0.3)
+ c.setFillColorRGB(1,0,1)
+ # draw some lines
+ c.line(0,0,0,1.7*inch)
+ c.line(0,0,1*inch,0)
+ # draw a rectangle
+ c.rect(0.2*inch,0.2*inch,1*inch,1.5*inch, fill=1)
+ # make text go straight up
+ c.rotate(90)
+ # change color
+ c.setFillColorRGB(0,0,0.77)
+ # say hello (note after rotate the y coord needs to be negative!)
+ c.drawString(0.3*inch, -inch, "Hello World")
+"""
+
+testcoords = """
+def coords(canvas):
+ from reportlab.lib.units import inch
+ from reportlab.lib.colors import pink, black, red, blue, green
+ c = canvas
+ c.setStrokeColor(pink)
+ c.grid([inch, 2*inch, 3*inch, 4*inch], [0.5*inch, inch, 1.5*inch, 2*inch, 2.5*inch])
+ c.setStrokeColor(black)
+ c.setFont("Times-Roman", 20)
+ c.drawString(0,0, "(0,0) the Origin")
+ c.drawString(2.5*inch, inch, "(2.5,1) in inches")
+ c.drawString(4*inch, 2.5*inch, "(4, 2.5)")
+ c.setFillColor(red)
+ c.rect(0,2*inch,0.2*inch,0.3*inch, fill=1)
+ c.setFillColor(green)
+ c.circle(4.5*inch, 0.4*inch, 0.2*inch, fill=1)
+"""
+
+testtranslate = """
+def translate(canvas):
+ from reportlab.lib.units import cm
+ canvas.translate(2.3*cm, 0.3*cm)
+ coords(canvas)
+ """
+
+testscale = """
+def scale(canvas):
+ canvas.scale(0.75, 0.5)
+ coords(canvas)
+"""
+
+testscaletranslate = """
+def scaletranslate(canvas):
+ from reportlab.lib.units import inch
+ canvas.setFont("Courier-BoldOblique", 12)
+ # save the state
+ canvas.saveState()
+ # scale then translate
+ canvas.scale(0.3, 0.5)
+ canvas.translate(2.4*inch, 1.5*inch)
+ canvas.drawString(0, 2.7*inch, "Scale then translate")
+ coords(canvas)
+ # forget the scale and translate...
+ canvas.restoreState()
+ # translate then scale
+ canvas.translate(2.4*inch, 1.5*inch)
+ canvas.scale(0.3, 0.5)
+ canvas.drawString(0, 2.7*inch, "Translate then scale")
+ coords(canvas)
+"""
+
+testmirror = """
+def mirror(canvas):
+ from reportlab.lib.units import inch
+ canvas.translate(5.5*inch, 0)
+ canvas.scale(-1.0, 1.0)
+ coords(canvas)
+"""
+
+testcolors = """
+def colors(canvas):
+ from reportlab.lib import colors
+ from reportlab.lib.units import inch
+ black = colors.black
+ y = x = 0; dy=inch*3/4.0; dx=inch*5.5/5; w=h=dy/2; rdx=(dx-w)/2
+ rdy=h/5.0; texty=h+2*rdy
+ canvas.setFont("Helvetica",10)
+ for [namedcolor, name] in (
+ [colors.lavenderblush, "lavenderblush"],
+ [colors.lawngreen, "lawngreen"],
+ [colors.lemonchiffon, "lemonchiffon"],
+ [colors.lightblue, "lightblue"],
+ [colors.lightcoral, "lightcoral"]):
+ canvas.setFillColor(namedcolor)
+ canvas.rect(x+rdx, y+rdy, w, h, fill=1)
+ canvas.setFillColor(black)
+ canvas.drawCentredString(x+dx/2, y+texty, name)
+ x = x+dx
+ y = y + dy; x = 0
+ for rgb in [(1,0,0), (0,1,0), (0,0,1), (0.5,0.3,0.1), (0.4,0.5,0.3)]:
+ r,g,b = rgb
+ canvas.setFillColorRGB(r,g,b)
+ canvas.rect(x+rdx, y+rdy, w, h, fill=1)
+ canvas.setFillColor(black)
+ canvas.drawCentredString(x+dx/2, y+texty, "r%s g%s b%s"%rgb)
+ x = x+dx
+ y = y + dy; x = 0
+ for cmyk in [(1,0,0,0), (0,1,0,0), (0,0,1,0), (0,0,0,1), (0,0,0,0)]:
+ c,m,y1,k = cmyk
+ canvas.setFillColorCMYK(c,m,y1,k)
+ canvas.rect(x+rdx, y+rdy, w, h, fill=1)
+ canvas.setFillColor(black)
+ canvas.drawCentredString(x+dx/2, y+texty, "c%s m%s y%s k%s"%cmyk)
+ x = x+dx
+ y = y + dy; x = 0
+ for gray in (0.0, 0.25, 0.50, 0.75, 1.0):
+ canvas.setFillGray(gray)
+ canvas.rect(x+rdx, y+rdy, w, h, fill=1)
+ canvas.setFillColor(black)
+ canvas.drawCentredString(x+dx/2, y+texty, "gray: %s"%gray)
+ x = x+dx
+"""
+
+testspumoni = """
+def spumoni(canvas):
+ from reportlab.lib.units import inch
+ from reportlab.lib.colors import pink, green, brown, white
+ x = 0; dx = 0.4*inch
+ for i in range(4):
+ for color in (pink, green, brown):
+ canvas.setFillColor(color)
+ canvas.rect(x,0,dx,3*inch,stroke=0,fill=1)
+ x = x+dx
+ canvas.setFillColor(white)
+ canvas.setStrokeColor(white)
+ canvas.setFont("Helvetica-Bold", 85)
+ canvas.drawCentredString(2.75*inch, 1.3*inch, "SPUMONI")
+"""
+
+testspumoni2 = """
+def spumoni2(canvas):
+ from reportlab.lib.units import inch
+ from reportlab.lib.colors import pink, green, brown, white, black
+ # draw the previous drawing
+ spumoni(canvas)
+ # now put an ice cream cone on top of it:
+ # first draw a triangle (ice cream cone)
+ p = canvas.beginPath()
+ xcenter = 2.75*inch
+ radius = 0.45*inch
+ p.moveTo(xcenter-radius, 1.5*inch)
+ p.lineTo(xcenter+radius, 1.5*inch)
+ p.lineTo(xcenter, 0)
+ canvas.setFillColor(brown)
+ canvas.setStrokeColor(black)
+ canvas.drawPath(p, fill=1)
+ # draw some circles (scoops)
+ y = 1.5*inch
+ for color in (pink, green, brown):
+ canvas.setFillColor(color)
+ canvas.circle(xcenter, y, radius, fill=1)
+ y = y+radius
+"""
+
+testbezier = """
+def bezier(canvas):
+ from reportlab.lib.colors import yellow, green, red, black
+ from reportlab.lib.units import inch
+ i = inch
+ d = i/4
+ # define the bezier curve control points
+ x1,y1, x2,y2, x3,y3, x4,y4 = d,1.5*i, 1.5*i,d, 3*i,d, 5.5*i-d,3*i-d
+ # draw a figure enclosing the control points
+ canvas.setFillColor(yellow)
+ p = canvas.beginPath()
+ p.moveTo(x1,y1)
+ for (x,y) in [(x2,y2), (x3,y3), (x4,y4)]:
+ p.lineTo(x,y)
+ canvas.drawPath(p, fill=1, stroke=0)
+ # draw the tangent lines
+ canvas.setLineWidth(inch*0.1)
+ canvas.setStrokeColor(green)
+ canvas.line(x1,y1,x2,y2)
+ canvas.setStrokeColor(red)
+ canvas.line(x3,y3,x4,y4)
+ # finally draw the curve
+ canvas.setStrokeColor(black)
+ canvas.bezier(x1,y1, x2,y2, x3,y3, x4,y4)
+"""
+
+testbezier2 = """
+def bezier2(canvas):
+ from reportlab.lib.colors import yellow, green, red, black
+ from reportlab.lib.units import inch
+ # make a sequence of control points
+ xd,yd = 5.5*inch/2, 3*inch/2
+ xc,yc = xd,yd
+ dxdy = [(0,0.33), (0.33,0.33), (0.75,1), (0.875,0.875),
+ (0.875,0.875), (1,0.75), (0.33,0.33), (0.33,0)]
+ pointlist = []
+ for xoffset in (1,-1):
+ yoffset = xoffset
+ for (dx,dy) in dxdy:
+ px = xc + xd*xoffset*dx
+ py = yc + yd*yoffset*dy
+ pointlist.append((px,py))
+ yoffset = -xoffset
+ for (dy,dx) in dxdy:
+ px = xc + xd*xoffset*dx
+ py = yc + yd*yoffset*dy
+ pointlist.append((px,py))
+ # draw tangent lines and curves
+ canvas.setLineWidth(inch*0.1)
+ while pointlist:
+ [(x1,y1),(x2,y2),(x3,y3),(x4,y4)] = pointlist[:4]
+ del pointlist[:4]
+ canvas.setLineWidth(inch*0.1)
+ canvas.setStrokeColor(green)
+ canvas.line(x1,y1,x2,y2)
+ canvas.setStrokeColor(red)
+ canvas.line(x3,y3,x4,y4)
+ # finally draw the curve
+ canvas.setStrokeColor(black)
+ canvas.bezier(x1,y1, x2,y2, x3,y3, x4,y4)
+"""
+
+testpencil = """
+def pencil(canvas, text="No.2"):
+ from reportlab.lib.colors import yellow, red, black,white
+ from reportlab.lib.units import inch
+ u = inch/10.0
+ canvas.setStrokeColor(black)
+ canvas.setLineWidth(4)
+ # draw erasor
+ canvas.setFillColor(red)
+ canvas.circle(30*u, 5*u, 5*u, stroke=1, fill=1)
+ # draw all else but the tip (mainly rectangles with different fills)
+ canvas.setFillColor(yellow)
+ canvas.rect(10*u,0,20*u,10*u, stroke=1, fill=1)
+ canvas.setFillColor(black)
+ canvas.rect(23*u,0,8*u,10*u,fill=1)
+ canvas.roundRect(14*u, 3.5*u, 8*u, 3*u, 1.5*u, stroke=1, fill=1)
+ canvas.setFillColor(white)
+ canvas.rect(25*u,u,1.2*u,8*u, fill=1,stroke=0)
+ canvas.rect(27.5*u,u,1.2*u,8*u, fill=1, stroke=0)
+ canvas.setFont("Times-Roman", 3*u)
+ canvas.drawCentredString(18*u, 4*u, text)
+ # now draw the tip
+ penciltip(canvas,debug=0)
+ # draw broken lines across the body.
+ canvas.setDash([10,5,16,10],0)
+ canvas.line(11*u,2.5*u,22*u,2.5*u)
+ canvas.line(22*u,7.5*u,12*u,7.5*u)
+ """
+
+testpenciltip = """
+def penciltip(canvas, debug=1):
+ from reportlab.lib.colors import tan, black, green
+ from reportlab.lib.units import inch
+ u = inch/10.0
+ canvas.setLineWidth(4)
+ if debug:
+ canvas.scale(2.8,2.8) # make it big
+ canvas.setLineWidth(1) # small lines
+ canvas.setStrokeColor(black)
+ canvas.setFillColor(tan)
+ p = canvas.beginPath()
+ p.moveTo(10*u,0)
+ p.lineTo(0,5*u)
+ p.lineTo(10*u,10*u)
+ p.curveTo(11.5*u,10*u, 11.5*u,7.5*u, 10*u,7.5*u)
+ p.curveTo(12*u,7.5*u, 11*u,2.5*u, 9.7*u,2.5*u)
+ p.curveTo(10.5*u,2.5*u, 11*u,0, 10*u,0)
+ canvas.drawPath(p, stroke=1, fill=1)
+ canvas.setFillColor(black)
+ p = canvas.beginPath()
+ p.moveTo(0,5*u)
+ p.lineTo(4*u,3*u)
+ p.lineTo(5*u,4.5*u)
+ p.lineTo(3*u,6.5*u)
+ canvas.drawPath(p, stroke=1, fill=1)
+ if debug:
+ canvas.setStrokeColor(green) # put in a frame of reference
+ canvas.grid([0,5*u,10*u,15*u], [0,5*u,10*u])
+"""
+
+testnoteannotation = """
+from reportlab.platypus.flowables import Flowable
+class NoteAnnotation(Flowable):
+ '''put a pencil in the margin.'''
+ def wrap(self, *args):
+ return (1,10) # I take up very little space! (?)
+ def draw(self):
+ canvas = self.canv
+ canvas.translate(-10,-10)
+ canvas.rotate(180)
+ canvas.scale(0.2,0.2)
+ pencil(canvas, text="NOTE")
+"""
+
+testhandannotation = """
+from reportlab.platypus.flowables import Flowable
+from reportlab.lib.colors import tan, green
+class HandAnnotation(Flowable):
+ '''A hand flowable.'''
+ def __init__(self, xoffset=0, size=None, fillcolor=tan, strokecolor=green):
+ from reportlab.lib.units import inch
+ if size is None: size=4*inch
+ self.fillcolor, self.strokecolor = fillcolor, strokecolor
+ self.xoffset = xoffset
+ self.size = size
+ # normal size is 4 inches
+ self.scale = size/(4.0*inch)
+ def wrap(self, *args):
+ return (self.xoffset, self.size)
+ def draw(self):
+ canvas = self.canv
+ canvas.setLineWidth(6)
+ canvas.setFillColor(self.fillcolor)
+ canvas.setStrokeColor(self.strokecolor)
+ canvas.translate(self.xoffset+self.size,0)
+ canvas.rotate(90)
+ canvas.scale(self.scale, self.scale)
+ hand(canvas, debug=0, fill=1)
+"""
+
+lyrics = '''\
+well she hit Net Solutions
+and she registered her own .com site now
+and filled it up with yahoo profile pics
+she snarfed in one night now
+and she made 50 million when Hugh Hefner
+bought up the rights now
+and she'll have fun fun fun
+til her Daddy takes the keyboard away'''
+
+lyrics = string.split(lyrics, "\n")
+testtextsize = """
+def textsize(canvas):
+ from reportlab.lib.units import inch
+ from reportlab.lib.colors import magenta, red
+ canvas.setFont("Times-Roman", 20)
+ canvas.setFillColor(red)
+ canvas.drawCentredString(2.75*inch, 2.5*inch, "Font size examples")
+ canvas.setFillColor(magenta)
+ size = 7
+ y = 2.3*inch
+ x = 1.3*inch
+ for line in lyrics:
+ canvas.setFont("Helvetica", size)
+ canvas.drawRightString(x,y,"%s points: " % size)
+ canvas.drawString(x,y, line)
+ y = y-size*1.2
+ size = size+1.5
+"""
+
+teststar = """
+def star(canvas, title="Title Here", aka="Comment here.",
+ xcenter=None, ycenter=None, nvertices=5):
+ from math import pi
+ from reportlab.lib.units import inch
+ radius=inch/3.0
+ if xcenter is None: xcenter=2.75*inch
+ if ycenter is None: ycenter=1.5*inch
+ canvas.drawCentredString(xcenter, ycenter+1.3*radius, title)
+ canvas.drawCentredString(xcenter, ycenter-1.4*radius, aka)
+ p = canvas.beginPath()
+ p.moveTo(xcenter,ycenter+radius)
+ from math import pi, cos, sin
+ angle = (2*pi)*2/5.0
+ startangle = pi/2.0
+ for vertex in range(nvertices-1):
+ nextangle = angle*(vertex+1)+startangle
+ x = xcenter + radius*cos(nextangle)
+ y = ycenter + radius*sin(nextangle)
+ p.lineTo(x,y)
+ if nvertices==5:
+ p.close()
+ canvas.drawPath(p)
+"""
+
+testjoins = """
+def joins(canvas):
+ from reportlab.lib.units import inch
+ # make lines big
+ canvas.setLineWidth(5)
+ star(canvas, "Default: mitered join", "0: pointed", xcenter = 1*inch)
+ canvas.setLineJoin(1)
+ star(canvas, "Round join", "1: rounded")
+ canvas.setLineJoin(2)
+ star(canvas, "Bevelled join", "2: square", xcenter=4.5*inch)
+"""
+
+testcaps = """
+def caps(canvas):
+ from reportlab.lib.units import inch
+ # make lines big
+ canvas.setLineWidth(5)
+ star(canvas, "Default", "no projection",xcenter = 1*inch,
+ nvertices=4)
+ canvas.setLineCap(1)
+ star(canvas, "Round cap", "1: ends in half circle", nvertices=4)
+ canvas.setLineCap(2)
+ star(canvas, "Square cap", "2: projects out half a width", xcenter=4.5*inch,
+ nvertices=4)
+"""
+
+testdashes = """
+def dashes(canvas):
+ from reportlab.lib.units import inch
+ # make lines big
+ canvas.setDash(6,3)
+ star(canvas, "Simple dashes", "6 points on, 3 off", xcenter = 1*inch)
+ canvas.setDash(1,2)
+ star(canvas, "Dots", "One on, two off")
+ canvas.setDash([1,1,3,3,1,4,4,1], 0)
+ star(canvas, "Complex Pattern", "[1,1,3,3,1,4,4,1]", xcenter=4.5*inch)
+"""
+
+testcursormoves1 = """
+def cursormoves1(canvas):
+ from reportlab.lib.units import inch
+ textobject = canvas.beginText()
+ textobject.setTextOrigin(inch, 2.5*inch)
+ textobject.setFont("Helvetica-Oblique", 14)
+ for line in lyrics:
+ textobject.textLine(line)
+ textobject.setFillGray(0.4)
+ textobject.textLines('''
+ With many apologies to the Beach Boys
+ and anyone else who finds this objectionable
+ ''')
+ canvas.drawText(textobject)
+"""
+
+testcursormoves2 = """
+def cursormoves2(canvas):
+ from reportlab.lib.units import inch
+ textobject = canvas.beginText()
+ textobject.setTextOrigin(2, 2.5*inch)
+ textobject.setFont("Helvetica-Oblique", 14)
+ for line in lyrics:
+ textobject.textOut(line)
+ textobject.moveCursor(14,14) # POSITIVE Y moves down!!!
+ textobject.setFillColorRGB(0.4,0,1)
+ textobject.textLines('''
+ With many apologies to the Beach Boys
+ and anyone else who finds this objectionable
+ ''')
+ canvas.drawText(textobject)
+"""
+
+testcharspace = """
+def charspace(canvas):
+ from reportlab.lib.units import inch
+ textobject = canvas.beginText()
+ textobject.setTextOrigin(3, 2.5*inch)
+ textobject.setFont("Helvetica-Oblique", 10)
+ charspace = 0
+ for line in lyrics:
+ textobject.setCharSpace(charspace)
+ textobject.textLine("%s: %s" %(charspace,line))
+ charspace = charspace+0.5
+ textobject.setFillGray(0.4)
+ textobject.textLines('''
+ With many apologies to the Beach Boys
+ and anyone else who finds this objectionable
+ ''')
+ canvas.drawText(textobject)
+"""
+
+testwordspace = """
+def wordspace(canvas):
+ from reportlab.lib.units import inch
+ textobject = canvas.beginText()
+ textobject.setTextOrigin(3, 2.5*inch)
+ textobject.setFont("Helvetica-Oblique", 12)
+ wordspace = 0
+ for line in lyrics:
+ textobject.setWordSpace(wordspace)
+ textobject.textLine("%s: %s" %(wordspace,line))
+ wordspace = wordspace+2.5
+ textobject.setFillColorCMYK(0.4,0,0.4,0.2)
+ textobject.textLines('''
+ With many apologies to the Beach Boys
+ and anyone else who finds this objectionable
+ ''')
+ canvas.drawText(textobject)
+"""
+testhorizontalscale = """
+def horizontalscale(canvas):
+ from reportlab.lib.units import inch
+ textobject = canvas.beginText()
+ textobject.setTextOrigin(3, 2.5*inch)
+ textobject.setFont("Helvetica-Oblique", 12)
+ horizontalscale = 80 # 100 is default
+ for line in lyrics:
+ textobject.setHorizScale(horizontalscale)
+ textobject.textLine("%s: %s" %(horizontalscale,line))
+ horizontalscale = horizontalscale+10
+ textobject.setFillColorCMYK(0.0,0.4,0.4,0.2)
+ textobject.textLines('''
+ With many apologies to the Beach Boys
+ and anyone else who finds this objectionable
+ ''')
+ canvas.drawText(textobject)
+"""
+testleading = """
+def leading(canvas):
+ from reportlab.lib.units import inch
+ textobject = canvas.beginText()
+ textobject.setTextOrigin(3, 2.5*inch)
+ textobject.setFont("Helvetica-Oblique", 14)
+ leading = 8
+ for line in lyrics:
+ textobject.setLeading(leading)
+ textobject.textLine("%s: %s" %(leading,line))
+ leading = leading+2.5
+ textobject.setFillColorCMYK(0.8,0,0,0.3)
+ textobject.textLines('''
+ With many apologies to the Beach Boys
+ and anyone else who finds this objectionable
+ ''')
+ canvas.drawText(textobject)
+"""
+
+testhand = """
+def hand(canvas, debug=1, fill=0):
+ (startx, starty) = (0,0)
+ curves = [
+ ( 0, 2), ( 0, 4), ( 0, 8), # back of hand
+ ( 5, 8), ( 7,10), ( 7,14),
+ (10,14), (10,13), ( 7.5, 8), # thumb
+ (13, 8), (14, 8), (17, 8),
+ (19, 8), (19, 6), (17, 6),
+ (15, 6), (13, 6), (11, 6), # index, pointing
+ (12, 6), (13, 6), (14, 6),
+ (16, 6), (16, 4), (14, 4),
+ (13, 4), (12, 4), (11, 4), # middle
+ (11.5, 4), (12, 4), (13, 4),
+ (15, 4), (15, 2), (13, 2),
+ (12.5, 2), (11.5, 2), (11, 2), # ring
+ (11.5, 2), (12, 2), (12.5, 2),
+ (14, 2), (14, 0), (12.5, 0),
+ (10, 0), (8, 0), (6, 0), # pinky, then close
+ ]
+ from reportlab.lib.units import inch
+ if debug: canvas.setLineWidth(6)
+ u = inch*0.2
+ p = canvas.beginPath()
+ p.moveTo(startx, starty)
+ ccopy = list(curves)
+ while ccopy:
+ [(x1,y1), (x2,y2), (x3,y3)] = ccopy[:3]
+ del ccopy[:3]
+ p.curveTo(x1*u,y1*u,x2*u,y2*u,x3*u,y3*u)
+ p.close()
+ canvas.drawPath(p, fill=fill)
+ if debug:
+ from reportlab.lib.colors import red, green
+ (lastx, lasty) = (startx, starty)
+ ccopy = list(curves)
+ while ccopy:
+ [(x1,y1), (x2,y2), (x3,y3)] = ccopy[:3]
+ del ccopy[:3]
+ canvas.setStrokeColor(red)
+ canvas.line(lastx*u,lasty*u, x1*u,y1*u)
+ canvas.setStrokeColor(green)
+ canvas.line(x2*u,y2*u, x3*u,y3*u)
+ (lastx,lasty) = (x3,y3)
+"""
+
+testhand2 = """
+def hand2(canvas):
+ canvas.translate(20,10)
+ canvas.setLineWidth(3)
+ canvas.setFillColorRGB(0.1, 0.3, 0.9)
+ canvas.setStrokeGray(0.5)
+ hand(canvas, debug=0, fill=1)
+"""
+
+testfonts = """
+def fonts(canvas):
+ from reportlab.lib.units import inch
+ text = "Now is the time for all good men to..."
+ x = 1.8*inch
+ y = 2.7*inch
+ for font in canvas.getAvailableFonts():
+ canvas.setFont(font, 10)
+ canvas.drawString(x,y,text)
+ canvas.setFont("Helvetica", 10)
+ canvas.drawRightString(x-10,y, font+":")
+ y = y-13
+"""
+
+testarcs = """
+def arcs(canvas):
+ from reportlab.lib.units import inch
+ canvas.setLineWidth(4)
+ canvas.setStrokeColorRGB(0.8, 1, 0.6)
+ # draw rectangles enclosing the arcs
+ canvas.rect(inch, inch, 1.5*inch, inch)
+ canvas.rect(3*inch, inch, inch, 1.5*inch)
+ canvas.setStrokeColorRGB(0, 0.2, 0.4)
+ canvas.setFillColorRGB(1, 0.6, 0.8)
+ p = canvas.beginPath()
+ p.moveTo(0.2*inch, 0.2*inch)
+ p.arcTo(inch, inch, 2.5*inch,2*inch, startAng=-30, extent=135)
+ p.arc(3*inch, inch, 4*inch, 2.5*inch, startAng=-45, extent=270)
+ canvas.drawPath(p, fill=1, stroke=1)
+"""
+testvariousshapes = """
+def variousshapes(canvas):
+ from reportlab.lib.units import inch
+ inch = int(inch)
+ canvas.setStrokeGray(0.5)
+ canvas.grid(range(0,11*inch/2,inch/2), range(0,7*inch/2,inch/2))
+ canvas.setLineWidth(4)
+ canvas.setStrokeColorRGB(0, 0.2, 0.7)
+ canvas.setFillColorRGB(1, 0.6, 0.8)
+ p = canvas.beginPath()
+ p.rect(0.5*inch, 0.5*inch, 0.5*inch, 2*inch)
+ p.circle(2.75*inch, 1.5*inch, 0.3*inch)
+ p.ellipse(3.5*inch, 0.5*inch, 1.2*inch, 2*inch)
+ canvas.drawPath(p, fill=1, stroke=1)
+"""
+
+testclosingfigures = """
+def closingfigures(canvas):
+ from reportlab.lib.units import inch
+ h = inch/3.0; k = inch/2.0
+ canvas.setStrokeColorRGB(0.2,0.3,0.5)
+ canvas.setFillColorRGB(0.8,0.6,0.2)
+ canvas.setLineWidth(4)
+ p = canvas.beginPath()
+ for i in (1,2,3,4):
+ for j in (1,2):
+ xc,yc = inch*i, inch*j
+ p.moveTo(xc,yc)
+ p.arcTo(xc-h, yc-k, xc+h, yc+k, startAng=0, extent=60*i)
+ # close only the first one, not the second one
+ if j==1:
+ p.close()
+ canvas.drawPath(p, fill=1, stroke=1)
+"""
+
+testforms = """
+def forms(canvas):
+ #first create a form...
+ canvas.beginForm("SpumoniForm")
+ #re-use some drawing functions from earlier
+ spumoni(canvas)
+ canvas.endForm()
+
+ #then draw it
+ canvas.doForm("SpumoniForm")
+"""
+
+def doctemplateillustration(canvas):
+ from reportlab.lib.units import inch
+ canvas.setFont("Helvetica", 10)
+ canvas.drawString(inch/4.0, 2.75*inch, "DocTemplate")
+ W = 4/3.0*inch
+ H = 2*inch
+ Wd = x = inch/4.0
+ Hd =y = inch/2.0
+ for name in ("two column", "chapter page", "title page"):
+ canvas.setFillColorRGB(0.5,1.0,1.0)
+ canvas.rect(x,y,W,H, fill=1)
+ canvas.setFillColorRGB(0,0,0)
+ canvas.drawString(x+inch/8, y+H-Wd, "PageTemplate")
+ canvas.drawCentredString(x+W/2.0, y-Wd, name)
+ x = x+W+Wd
+ canvas.saveState()
+ d = inch/16
+ dW = (W-3*d)/2.0
+ hD = H -2*d-Wd
+ canvas.translate(Wd+d, Hd+d)
+ for name in ("left Frame", "right Frame"):
+ canvas.setFillColorRGB(1.0,0.5,1.0)
+ canvas.rect(0,0, dW,hD, fill=1)
+ canvas.setFillGray(0.7)
+ dd= d/2.0
+ ddH = (hD-6*dd)/5.0
+ ddW = dW-2*dd
+ yy = dd
+ xx = dd
+ for i in range(5):
+ canvas.rect(xx,yy,ddW,ddH, fill=1, stroke=0)
+ yy = yy+ddH+dd
+ canvas.setFillColorRGB(0,0,0)
+ canvas.saveState()
+ canvas.rotate(90)
+ canvas.drawString(d,-dW/2, name)
+ canvas.restoreState()
+ canvas.translate(dW+d,0)
+ canvas.restoreState()
+ canvas.setFillColorRGB(1.0, 0.5, 1.0)
+ mx = Wd+W+Wd+d
+ my = Hd+d
+ mW = W-2*d
+ mH = H-d-Hd
+ canvas.rect(mx, my, mW, mH, fill=1)
+ canvas.rect(Wd+2*(W+Wd)+d, Hd+3*d, W-2*d, H/2.0, fill=1)
+ canvas.setFillGray(0.7)
+ canvas.rect(Wd+2*(W+Wd)+d+dd, Hd+5*d, W-2*d-2*dd, H/2.0-2*d-dd, fill=1)
+ xx = mx+dd
+ yy = my+mH/5.0
+ ddH = (mH-6*dd-mH/5.0)/3.0
+ ddW = mW - 2*dd
+ for i in range(3):
+ canvas.setFillGray(0.7)
+ canvas.rect(xx,yy,ddW,ddH, fill=1, stroke=1)
+ canvas.setFillGray(0)
+ canvas.drawString(xx+dd/2.0,yy+dd/2.0, "flowable %s" %(157-i))
+ yy = yy+ddH+dd
+ canvas.drawCentredString(3*Wd+2*W+W/2, Hd+H/2.0, "First Flowable")
+ canvas.setFont("Times-BoldItalic", 8)
+ canvas.setFillGray(0)
+ canvas.drawCentredString(mx+mW/2.0, my+mH+3*dd, "Chapter 6: Lubricants")
+ canvas.setFont("Times-BoldItalic", 10)
+ canvas.drawCentredString(3*Wd+2*W+W/2, Hd+H-H/4, "College Life")
+
+class PlatIllust:
+ #wrap the above for PP#
+ def __init__(self, x, y, scale=1):
+ self.x = x
+ self.y = y
+ self.scale = scale
+ def drawOn(self, canvas):
+ canvas.saveState()
+ canvas.translate(self.x, self.y)
+ canvas.scale(self.scale, self.scale)
+ doctemplateillustration(canvas)
+ canvas.restoreState()
+
+class PingoIllust:
+ #wrap the above for PP#
+ def __init__(self, x, y, scale=1):
+## print 'Pingo illustration %f, %f, %f' % (x,y,scale)
+ self.x = x
+ self.y = y
+ self.scale = scale
+ def drawOn(self, canvas):
+ canvas.rect(self.x, self.y, 100,100, stroke=1, fill=1)
+## from pingo import testdrawings
+## from pingo import pingopdf
+## drawing = testdrawings.getDrawing3()
+## canvas.saveState()
+## canvas.scale(self.scale, self.scale)
+## pingopdf.draw(drawing, canvas, self.x, self.y)
+## canvas.restoreState()
+
+# D = dir()
+g = globals()
+Dprime = {}
+from types import StringType
+from string import strip
+for (a,b) in g.items():
+ if a[:4]=="test" and type(b) is StringType:
+ #print 'for', a
+ #print b
+ b = strip(b)
+ exec(b+'\n')
+
+platypussetup = """
+from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer
+from reportlab.lib.styles import getSampleStyleSheet
+from reportlab.lib.pagesizes import DEFAULT_PAGE_SIZE
+from reportlab.lib.units import inch
+PAGE_HEIGHT=DEFAULT_PAGE_SIZE[1]; PAGE_WIDTH=DEFAULT_PAGE_SIZE[0]
+styles = getSampleStyleSheet()
+"""
+platypusfirstpage = """
+Title = "Hello world"
+pageinfo = "platypus example"
+def myFirstPage(canvas, doc):
+ canvas.saveState()
+ canvas.setFont('Times-Bold',16)
+ canvas.drawCentredString(PAGE_WIDTH/2.0, PAGE_HEIGHT-108, Title)
+ canvas.setFont('Times-Roman',9)
+ canvas.drawString(inch, 0.75 * inch, "First Page / %s" % pageinfo)
+ canvas.restoreState()
+"""
+platypusnextpage = """
+def myLaterPages(canvas, doc):
+ canvas.saveState()
+ canvas.setFont('Times-Roman',9)
+ canvas.drawString(inch, 0.75 * inch, "Page %d %s" % (doc.page, pageinfo))
+ canvas.restoreState()
+"""
+platypusgo = """
+def go():
+ doc = SimpleDocTemplate("phello.pdf")
+ Story = [Spacer(1,2*inch)]
+ style = styles["Normal"]
+ for i in range(100):
+ bogustext = ("This is Paragraph number %s. " % i) *20
+ p = Paragraph(bogustext, style)
+ Story.append(p)
+ Story.append(Spacer(1,0.2*inch))
+ doc.build(Story, onFirstPage=myFirstPage, onLaterPages=myLaterPages)
+"""
+
+if __name__=="__main__":
+ # then do the platypus hello world
+ for b in platypussetup, platypusfirstpage, platypusnextpage, platypusgo:
+ b = strip(b)
+ exec(b+'\n')
+ go()
diff --git a/bin/reportlab/tools/pythonpoint/demos/figures.xml b/bin/reportlab/tools/pythonpoint/demos/figures.xml
new file mode 100644
index 00000000000..b3314ed8298
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/figures.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+ New Feature Tests
+
+ Andy Robinson
+
+
+ Reportlab Sample Applications
+
+
+
+
+
+
+
+
+
+
+
+ New Feature Test Cases - Figures, Drawings and Included Pages
+
+
+ especially images and pagecatcher stuff...
+
+
+
+ PythonPoint
+
+ lets you create attractive and consistent presentation slides
+ on any platform. It is a demo app built on top of the PDFgen PDF library
+ and the PLATYPUS Page Layout library. Essentially, it converts slides
+ in an XML format to PDF.
+
+
+ It can be used right now to create slide shows, but will
+ undoubtedly change and evolve. Read on for a tutorial...
+
+
+
+
+
+
+ Drawing Tag In Action within story context
+
+
+ especially images and pagecatcher stuff...
+
+ Hope that came out right-aligned with a box around it...
+
+
+
+
+
+ PageFigure
+ This imports a page and displays it. Since this will typically be used to show
+ A4/Letter pages, it does a 'shrink to fit' based on frame width. The scaleFactor attribute can override this,
+ as I did below...
+
+
+
+
+
+
+
+
+
diff --git a/bin/reportlab/tools/pythonpoint/demos/htu.xml b/bin/reportlab/tools/pythonpoint/demos/htu.xml
new file mode 100644
index 00000000000..56cb92457dc
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/htu.xml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+ © 2002, H. Turgut UYAR
+
+
+
+
+
+ New features in PythonPoint
+ H. Turgut Uyar
+ uyar@cs.itu.edu.tr
+
+
+
+
+ TrueType Support
+
+
+ PythonPoint can read UTF-8 encoded input files and produce
+ correct output (provided your font has all necessary
+ characters). That enables you, for example, to have native (in my
+ case, Turkish) characters in your document:
+
+
+ 0 ^ 1 _
+
+
+
+
+
+ Effects
+
+
+ Paragraphs, images, tables and geometric shapes can now have
+ effectname, effectdirection, effectdimension, effectmotion and
+ effectduration attributes:
+ A paragraph
+
+
+ Col1,Col2,Col3
+ Row1Col1,Row1Col2,Row1Col3
+ Row2Col1,Row2Col2,Row2Col3
+
+
+
+ String
+
+
+
+
+ Printing
+
+
+ Be careful when using effects: A new slide is created for
+ each effect, so DON'T print the resulting PDF file.
+ new command-line option: --printout
+ produces printable PDF
+
+
+
+
+ New Paragraph Styles
+
+
+ Bullet2 - Second level bullets
+ Here's an example
+ Or an example with a longer text to see
+ how it wraps at the end of each line
+ Author and EMail
+ See the cover page for examples
+ They have to be in the style file, so either use
+ the htu style file or edit your style file
+
+
+
+
+ ToDo
+
+
+ Unicode chars in the outline
+
+
+
+
diff --git a/bin/reportlab/tools/pythonpoint/demos/leftlogo.a85 b/bin/reportlab/tools/pythonpoint/demos/leftlogo.a85
new file mode 100644
index 00000000000..7d55afcf348
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/leftlogo.a85
@@ -0,0 +1,53 @@
+BI
+/W 103 /H 68 /BPC 8 /CS /RGB /F [/A85 /Fl]
+ID
+Gb"/*cYjIe']/l*^;)UQj:Ec+nd!,-,*G/5;0"E.+@qg.\92h2HbiE)jC5*M
+$a,@:RoXB@WPjMu=[F;88l[?@OO=6qV,HNNiL#(cac+!&rF)2^DHJ?_:WQkn
+1[fb`hOBr--B>FoSDXMt35Gnj6n\3XT8sf/Y%-NPLqg'pmQ+*EiV6D:,$akf
+!i2MA/A-"n[R.R)S!ePi$u('8mrCG8[3:WLlB[amBYAS4hR2*f7tR;&\%]Ld
+ZX5^f6Qj@\h7^FuQ(">[ml32FWhJG;Z)t2oADV4[H6GbW.mH`MDlesQZO5+Q5)]OWf2G9[
+U9W99*2'#PD+cIXnp"J"(BrY^=(rg;ITf("c#0"S<;fjK,APV+p9p+05LO&X
+jQNf`8c26f]J54N'k#I9=Bt4]e&6gN'#S[nK3*VhQ!`PpXcJ0i:J_2rC@=>X\5dUbEcCZ?\6O)+F/35ZJD6R$H^-Z!R
+5;8=l//9SUkC;LhQ*?di<'6e&/BNIqm(%(SDYXJ
+p%%Z+J.IshkX$tLPOD'"jSV#/6iY?QI>8P-%o0k3`e#X33RJS`f'D!D2rTJ-
+(4Znb03&koo>X[bKs.qpBOkU,KCCO3S$2.Gr@e8E=$On&hUiAB2[.;G@FQf7_K1&D6RJ.Ih@-56Ss&B1q:\)MgJ8P4Sa-(Fm
+J"d8Z]Mf`Q$G^\tK@pQWQs3iRB[KP=+H&@+iH@XGFQ'#n!DJ$)Mc?"U#od!oYl3En7nT"7UC,,Q&Hr
+9.SPlHak6s)J0;k;hQC:k82'=COeskp&dB-#@RrY1B=H^'L=,;9uJssq%XGf
+h/fXmq>1G\?k6ZH*GSk&M)?&TJ?rYW.9f!gdM2&:Kr51A3^MX?GV'T@$h)Da
+-RIIcpl8fhiQr=`\k[7;3`X"d!or(jb1YM>"Ppi`,67@]M"d
++mXd;WRE"IKX@n&dNNV/55(]`==+_r?K5bp?$^4Pn/[2ncL(/l#CfSYAg:iN
+@3j5R$qtm;AIF7k%^ak'%4Z1354d"1VT\g]cm[^hI.Yf>DcLS\rq+As2F?LI
+'gq+/_o9&kK,4@]qbdfA8FauP;!N'$5J@1P/\Th=9i^\b$/-6-kL#$E&39t%
+/O[1Fm`/F?!q;%bB')DM`KY&D!,6)lG5TQ88ejHiTWKt;3_8:@M!NnP'D2s$
+2Q25"dX)7pQ%VUq+r1%.iMQiLR#&.@\:Pe96FEbkgLu`Fb;!#d,DPC-H/d?u
+^']=P86?6qr/@_/T-T0?,+>brI`?=13["Y(3DYSMX7UAUk0'!l!aPN4$e\f&(i2TTrbVuOYhc05Rko:?UP09gLc(-/ni'Q6T.B&8]k
+#a_e\0FTMV`IT;W7M>_'NT_f=~>
+EI
diff --git a/bin/reportlab/tools/pythonpoint/demos/leftlogo.gif b/bin/reportlab/tools/pythonpoint/demos/leftlogo.gif
new file mode 100644
index 00000000000..2d9c990ba7a
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/leftlogo.gif differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/lj8100.jpg b/bin/reportlab/tools/pythonpoint/demos/lj8100.jpg
new file mode 100644
index 00000000000..be3c6183d3b
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/lj8100.jpg differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/monterey.xml b/bin/reportlab/tools/pythonpoint/demos/monterey.xml
new file mode 100644
index 00000000000..41bd979fa67
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/monterey.xml
@@ -0,0 +1,306 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Printing with Python
+
+
+
+ Andy Robinson, Robinson Analytics Ltd.
+
+
+ O'Reilly Python Conference, Monterey, 24th August 1999
+
+
+
+
+
+
+ Background to the project:
+
+
+ London-based consultant and corporate developer
+
+
+ want to do neat Python stuff in the daytime
+
+
+ working for many years on financial modelling
+
+
+ this is one of 6 modules in that system
+
+
+ quickest to deliver, offers very wide benefits
+
+
+ 25% of architecture done, but already very useful
+
+
+ Release early, release often!
+
+
+
+
+
+
+
+ Goal:
+
+
+ A Reporting Package on the Next Curve...
+
+
+ Report on objects, not databases
+
+
+ Scalable to million page runs
+
+
+ Light enough to embed in any application
+
+
+ Allow reuse of graphical objects across reports
+
+
+ Open and extensible on several levels
+
+
+ Publication quality
+
+
+ Support all the world's languages - one day
+
+
+
+
+
+
+ Portable Document Format
+
+
+ The New PostScript
+
+
+ Free readers on all platforms
+
+
+ Better than paper - view it, email it, print it
+
+
+ 'Final Form' for documents
+
+
+ High end solution - no limits to quality
+
+
+ ...but you can't learn it in Notepad!
+
+
+
+
+
+
+
+
+ PDFgen and PIDDLE
+
+
+
+
+
+
+ Layer One - PDFgen
+
+
+ makes PDF documents from pure Python
+
+
+ wraps up PDF document structure
+
+
+ exposes nice effects - page transitions, outline trees (RSN!)
+
+
+ low level graphics promitives (postscript imaging model)
+
+
+ Fine control of text placement
+
+
+ Supports Asian text
+
+
+ Supports coordinate transformations and clipping
+
+
+ ...a foundation for other apps to build on
+
+
+
+
+
+
+ PDFgen Image Support
+
+
+ Python Imaging Library and zlib do all the work - many formats.
+ Images cached (like .pyc files) - very fast builds possible.
+
+
+
+
+
+
+
+ Layer Two: PIDDLE
+
+
+ Plug In Drawing, Does Little Else
+
+
+ Easy Graphics Library
+
+
+ Abstract Canvas Interface
+
+
+ Pluggable Back Ends
+
+
+ Same code can do viewing and printing
+
+
+ Standard set of test patterns
+
+
+ Uses Python Imaging Library
+
+
+ Back ends includeTkinter, wxPython, Mac, Pythonwin, PDF, PostScript,
+ OpenGL, Adobe Illustrator and PIL. Really easy to add a new one!
+
+
+
+
+
+
+ Layer Three: PLATYPUS
+
+
+ "Page Layout And Typography Using Scripts"
+
+
+ Trying to work out the API now. Key Concepts:
+
+
+ Drawable objects - can 'wrap to fit'
+
+
+ Frames on page
+
+
+ Frame consumes from a list of drawables until full
+
+
+ Document Models e.g. SimpleFlowDocument
+
+
+ XSL Flow Object model may be a good target
+
+
+
+
+
+
+ Drawable Objects
+
+
+ Next layer of PIDDLE extensibility.
+ Each draws in its own coodinate system
+
+
+ paragraph, image, table
+
+
+ chart libraries
+
+
+ diagrams
+
+
+ Open Source - let people contribute new ones.
+ Anything you could have in a view can be a new
+ drawable type.
+
+
+
+
+
+
+ Style Sheet Driven
+
+
+ Styles use instance inheritance
+
+
+ Paragraph Styles - Style Sheet Compulsory!
+
+
+ Text Styles within a paragraph
+
+
+ Table and Table Cell Styles
+
+
+
+
+
+
+ Vision
+
+
+ XML to PDF in one step
+
+
+ Publish to web and print from same source
+
+
+ Financial and Scientific reporting tool
+
+
+ Embedded reporting engine
+
+
+ Volume reporting tool for business
+
+
+
+
+
+
+ PythonPoint
+
+
+ How I made this presentation...
+
+
+
+
+
diff --git a/bin/reportlab/tools/pythonpoint/demos/outline.gif b/bin/reportlab/tools/pythonpoint/demos/outline.gif
new file mode 100644
index 00000000000..4a294b59277
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/outline.gif differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/pplogo.gif b/bin/reportlab/tools/pythonpoint/demos/pplogo.gif
new file mode 100644
index 00000000000..d0344497ca5
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/pplogo.gif differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/python.gif b/bin/reportlab/tools/pythonpoint/demos/python.gif
new file mode 100644
index 00000000000..c68e1e4ec37
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/python.gif differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/pythonpoint.xml b/bin/reportlab/tools/pythonpoint/demos/pythonpoint.xml
new file mode 100644
index 00000000000..15d1ad709b5
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/pythonpoint.xml
@@ -0,0 +1,1051 @@
+
+
+
+
+ PythonPoint Demonstration
+ Andy Robinson
+ Reportlab Sample Applications
+
+
+
+
+
+
+
+
+
+
+ Welcome to PythonPoint
+
+
+ ...a library for creating presentation slides.
+
+
+
+ PythonPoint
+
+ lets you create attractive and consistent presentation slides
+ on any platform. It is a demo app built on top of the PDFgen PDF library
+ and the PLATYPUS Page Layout library. Essentially, it converts slides
+ in an XML format to PDF.
+
+
+ It can be used right now to create slide shows, but will
+ undoubtedly change and evolve. Read on for a tutorial...
+
+
+
+
+ Smile and look them in the eye!
+
+
+
+
+
+
+
+
+
+ Part 1 Feature Overview
+
+
+
+
+
+
+ XML Notation
+
+
+ You create slides in a text editor with a basic
+ XML syntax looking like this:
+
+
+
+ Welcome to PythonPoint
+
+
+ ...a library for creating presentation slides.
+
+ ]]>
+
+ Pythonpoint then converts these into slides. Just enter
+ "pythonpoint.py myfile.xml" to create a PDF document
+ (usually called "myfile.pdf", but you specify that in the XML).
+
+
+
+
+
+
+ Page Layout Model
+
+
+ The Page Layout model comes from PLATYPUS (Page Layout and Typography Using Scripts),
+ a key component of the toolkit. This covers concepts such as:
+
+
+ Reusable 'Drawable Objects'
+
+
+ Frames into which objects flow (like this one, around which we have drawn a border)
+
+
+ Style Sheets for text, table cells, line styles etc.
+
+
+ Wrapping, page breaking an document management logic
+
+
+ Everything is open and extensible. I hope a library of
+ reusable objects such as charts and diagrams will grow up.
+
+
+
+
+
+
+ Reuse and Consistency Sections
+
+
+ You can create a 'section' spanning some or all tags in the presentation
+ and place graphics on this. The blue border and title come from the
+ section. Here's how we did the border:
+
+
+
+
+
+
+ ...all slides go here...
+
+
+]]>
+
+ Thus you can re-brand an entire presentation for
+ a new audience in seconds.
+
+
+
+
+
+
+ Style Sheets
+
+
+ Paragraph styles are defined externally. You may specify a filename
+ from which to load a stylesheet with the stylesheet tag.
+
+
+ Thus you can have different sizes and formats by switching
+ stylesheets, or colour and black-and-white options.
+
+
+ When they are added, tables will be driven by line and cell
+ styles in a similar way.
+
+
+
+
+
+
+ Special Effects
+
+
+ Acrobat Reader supports tags to define page transition effects.
+ If you are reading this on screen, you should have seen a selection
+ of these:
+
+
+ Split
+
+
+ Blinds
+
+
+ Box
+
+
+ Wipe
+
+
+ Dissolve
+
+
+ Glitter
+
+
+ Each has a range of options to fine-tune.
+
+
+ When they are added, tables will be driven by line and cell
+ styles in a similar way.
+
+
+
+
+
+
+ Outlines and Hyperlinks
+
+
+ By default, we generate an outline view in the left pane to
+ help you navigate. Hyperlinks within documents are also
+ possible.
+
+
+ As far as we know, this is the first PDF library to expose
+ these features.
+
+
+
+
+
+
+ Basic Shapes
+
+
+ Here are some of the basic shapes available for decorating pages...
+
+
+
+
+
+
+
+
+ This is a\nmulti-line string\nplaced directly on the page.\n\nIt can be left-aligned,\ncentred,\nor right-aligned.
+
+
+
+
+
+
+ Tables
+
+
+ The Table tag lets you paste in bulk data and format it attractively:
+
+
+
+ Division,Jan,Feb,Mar,Q1 Total
+ North,100,115,120,335
+ South,215,145,180,540
+ East,75,90,135,300
+ West,100,120,115,335
+
+
+
+
+
+
+ Features Coming Soon
+
+
+ This is the first version that runs. A lot can now be added fairly easily:
+
+
+ Preprocessor to let you enter paragraphs and
+ bullets as one block of text, with less tag typing!
+
+
+ PIDDLE drawings
+
+
+ PINGO drawings 'Object Graphics' tags with grouping and coordinate transformations
+
+
+ Speaker notes and a mode to print them
+
+
+ Tools to archive slides in a database and build presentations to order
+
+
+ ...what else can YOU think of?
+
+
+
+
+
+
+
+
+
+ Part 2 Reference
+
+
+
+ This section covers all command line options
+ and tags currently in use.
+
+
+
+
+
+
+ Command Line Options
+
+
+ Usage (NT, or executable Unix script):
+
+
+
+ pythonpoint.py [/notes] myslides.xml
+
+
+
+ or (Win9x or non-executable script)
+
+
+
+ python pythonpoint.py [/notes] myslides.xml
+
+
+
+ Notes:
+
+
+ The resulting PDF file has the same
+ name as the input file.
+
+
+ The Speaker Notes mode prints a shrunken canvas with
+ room for notes around the edge. To create notes, make
+ an extra frame off the page. See the source of
+ Pythonpoint.xml slide 001 for an example.
+
+
+
+
+
+
+ Tag "presentation"
+
+
+ This is the outermost tag in an XML file and is always required.
+
+
+ Attributes:
+
+
+ filename (required)
+
+
+ Can Contain:
+
+
+ section, stylesheet, slides
+
+
+
+ To Do:
+
+
+ Support for page sizes, opening modes
+
+
+
+
+
+
+ Tag "stylesheet"
+
+
+ This defines an external style sheet full of paragraph styles.
+ For now, these are Python modules conforming to a common interface,
+ and examples are given. If not declared, a default style sheet is
+ used. You are strongly advised to define your own style sheet,
+ as the built-in one will change a few more times.
+
+
+ Attributes:
+
+
+ path, module, function
+
+
+ Contained By:
+
+
+ Presentation, Section
+
+
+ Can Contain:
+
+
+ nothing
+
+
+ Example
+
+
+]]>
+
+
+
+
+
+ Tag "section"
+
+
+ A Section spans across a number of slides and can apply an
+ overall background to them. Place graphics directly within
+ the section tag, either before or after slides. This lets
+ you re-brand a presentation very quickly. Documents
+ may contain multiple sections; nesting of sections is
+ not (yet) permitted.
+
+
+ Attributes:
+
+
+ name (required, but not used yet)
+
+
+ Contained By:
+
+
+ Presentation
+
+
+ Can Contain:
+
+
+ all graphic shapes; slides
+
+
+
+
+
+
+ Tag "slide"
+
+
+ Defines a single slide. The presentation effects are defined
+ in the PDF reference; best to just try the combinations.
+
+
+ Attributes (with defaults):
+
+
+ id (required)
+
+
+ title (required)
+
+
+ effectname: one of Split, Blinds, Box, Wipe, Dissolve, Glitter
+
+
+ effectdirection: '0','90','180' or '270'
+
+
+ effectdimension: 'H' or 'V' (Horiz./Vert.)
+
+
+ effectmotion: 'I' for inwards or 'O' for outwards
+
+
+ effectduration: time in seconds
+
+
+ Contained By:
+
+
+ Presentation
+
+
+ Can Contain:
+
+
+ all graphic shapes; frames
+
+
+
+
+
+
+ Tag "frame"
+
+
+ Defines a frame on the page which can hold content. You may have
+ as many frames as you like, to allow multi-column text or flow
+ around pictures.
+
+
+ Attributes:
+
+
+ x, y, width, height (all required): in points
+
+
+ leftmargin, rightmargin, topmargin, bottommargin
+ (optional, default to zero) define the 'inner rectangle' within
+ which content flows
+
+
+ border (defaults to 'false'): whether to show
+ a frame border useful when designing pages.
+
+
+ Contained By:
+
+
+ Slide
+
+
+ Can Contain:
+
+
+ all 'flowable objects' paragraphs, images
+
+
+
+
+
+
+ Tag family "Flowable Objects"
+
+
+ Flowable Objects currently include Paragraphs, Preformatted text
+ (used for code printing, where the line breaks and spaces matter)
+ and inline Images. More will be added in future.
+ They negotiate with their containing frame about height and
+ width; paragraphs do what you would expect, while images are centred.
+
+
+ Contained By:
+
+
+ Slide
+
+
+ Can Contain:
+
+
+ The three instances so far contain nothing.
+
+
+
+
+
+
+ Tag "para" Paragraphs
+
+
+ Paragraphs are used for wrapping text. They are very simple
+ they have a style attribute,
+ and the stylesheet defines most attributes externally.
+ Currently we use a hack to handle 'bullets', which may be in
+ a different font (such as 'ZapfDingbats, specified in style)
+ and offset to the left. These are used
+ for bullets, numbering and definition lists
+ This will vanish as soon as one can
+ switch fonts in mid-paragraph (due mid April).
+
+
+ Attributes:
+
+
+ style (defaults to 'Normal')
+ reference to stylesheet
+
+
+ bullettext
+ text for the optional 'bullet' section. To be deprecated.
+
+
+ Contained By:
+
+
+ Frame
+
+
+ Can Contain:
+
+
+ Their text
+
+
+
+
+
+
+ Tag "prefmt"
+
+
+ This is used for printing code, or other text which contains
+ line breaks.
+
+
+ Attributes:
+
+
+ style (defaults to 'Normal')
+ reference to stylesheet
+
+
+ Contained By:
+
+
+ Frame
+
+
+ Can Contain:
+
+
+ The text to be displayed
+
+
+
+
+
+
+ Tag "image" flowing images
+
+
+ This is used for an image to be displayed inline within
+ the frame. It will be drawn at a scale of 1 pixel to
+ 1 point, and centred in the frame.
+
+
+ Attributes:
+
+
+ filename (required)
+
+
+ Contained By:
+
+
+ Frame
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+ To do
+
+
+ Rename it 'flowing image'? Control
+ over alignment and size if needed. Image caching.
+
+
+
+
+
+
+ Tag "table" tables
+
+
+ This lets you draw tables with a wide variety of formatting
+ options.
+
+
+ Attributes:
+
+
+
+ widths
+
+ (optional) in points (auto-sizes if not given)
+
+
+
+ heights
+
+ (optional) in points (auto-sizes if not given)
+
+
+
+ style
+
+ (optional) name of a ReportLab
+ tablestyle defined in the stylesheet.
+
+
+
+ colDelim
+
+ (optional) the column
+ delimiter string for bulk data; defaults to a comma.
+
+
+
+ rowDelim
+
+ (optional) the line
+ delimiter string for bulk data; defaults to a carriage
+ return.
+
+
+ Contained By:
+
+
+ Frame
+
+
+ Can Contain:
+
+
+ Bulk data, with the row and column delimiters
+ specified
+
+
+
+
+
+
+ Tag family "Drawable Objects"
+
+
+ These are objects which know how to draw themselves directly on
+ the page (or section template). Use them for designing the backdrop,
+ and for custom graphics.
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Varies.
+
+
+ To Do:
+
+
+ Will include the full PINGO object
+ model a subset of SVG allowing any vector graphics
+ at all.
+
+
+
+
+
+
+ Tag "fixedimage"
+
+
+ This is an image draw directly at a fixed position
+ for example, the logo at top left of the page.
+
+
+ Attributes:
+
+
+ filename: required
+
+
+ x, y: required
+
+
+ width, height: optional, stretches image
+ to fit box if present.
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+
+
+
+
+ Tag "rectangle"
+
+
+ Attributes:
+
+
+ x, y, width, height: required
+
+
+ fill, stroke: either 'None', or an
+ (r,g,b) tuple.
+
+
+ linewidth: defaults to 0 (hairline)
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+
+
+
+
+ Tag "roundrect"
+
+
+ This is exactly like Rectangle,
+ but with an extra 'radius' attribute defining the corner
+ radius in points default is 6 points.
+
+
+
+
+
+
+ Tag "ellipse"
+
+
+ Draws an ellipse, defined by its
+ bounding box. Note that it can
+ create circles if height and width are equal.
+
+
+ Attributes:
+
+
+ x1, y1, x2, y2: required
+
+
+ fill, stroke: either 'None', or an
+ (r,g,b) tuple.
+
+
+ linewidth: defaults to 0 (hairline)
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+
+
+
+
+ Tag "polygon"
+
+
+ Draws a polygon from a list
+ of points you provide.
+
+
+ Attributes:
+
+
+ points: list such as "(0,0),(50,0),(25,25)"
+
+
+ fill, stroke: either 'None', or an
+ (r,g,b) tuple.
+
+
+ linewidth: defaults to 0 (hairline)
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+
+
+
+
+ Tag "line"
+
+
+ Draws a line.
+
+
+ Attributes:
+
+
+ x1, y1, x2, y2
+
+
+ stroke: either 'None', or an
+ (r,g,b) tuple.
+
+
+ width: defaults to 0 (hairline)
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+
+
+
+
+ Tag "string"
+
+
+ This places strings directly on the page. They may have
+ embedded newlines (use a '\n' in the XML), in which
+ case multi-line strings are printed. Left, right
+ and centre alignment are allowed.
+
+
+ Attributes:
+
+
+ x, y: required
+
+
+ color: RGB colour tuple such as '(0,1,0)'
+
+
+ font: default is 'Times-Roman'
+
+
+ size: default 12
+
+
+ align: default 'left', allows
+ also 'right' or 'center'
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ The text of the string
+
+
+
+
+
+
+ Tag "customshape"
+
+
+ This looks in a specified Python module for a
+ 'drawable object' you write, and initialises
+ it with arguments you provide before drawing.
+ This must provide a 'self.drawOn(canvas)' method.
+
+
+ Attributes:
+
+
+ path: where to look; searches Python path
+ if None
+
+
+ module: module name
+
+
+ class: class name to create
+
+
+ initargs: tuple of arguments with which
+ to initialize the class.
+
+
+ align: default 'left', allows
+ also 'right' or 'center'
+
+
+ Contained By:
+
+
+ Slide, Section
+
+
+ Can Contain:
+
+
+ Nothing
+
+
+
+
+
+
+ Part 3 To Do
+
+
+ Lots of testing
+
+
+ Text preprocessor to let you input text, styles and images
+ in something easier to type
+
+
+ Support for Pingo (http://pingo.sourceforge.net/) drawings using
+ the Scalable Vector Graphics imaging model
+
+
+ Proper caching of flowing images
+
+
+ Basic Tables and Charts
+
+
+ Use new XML parsers as wel as xmllib
+
+
+ Slide indexing and database search tools
+
+
+ Speaker Notes mode
+
+
+ Naturally, help is extremely welcome :-)
+
+
+
+
+
diff --git a/bin/reportlab/tools/pythonpoint/demos/slidebox.py b/bin/reportlab/tools/pythonpoint/demos/slidebox.py
new file mode 100644
index 00000000000..f0d9cf308e9
--- /dev/null
+++ b/bin/reportlab/tools/pythonpoint/demos/slidebox.py
@@ -0,0 +1,29 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.shapes import _DrawingEditorMixin
+from reportlab.graphics.charts.slidebox import SlideBox
+from rlextra.graphics.guiedit.datacharts import ODBCDataSource, CSVDataSource, DataAssociation, DataAwareDrawing
+
+class SlideBoxDrawing(_DrawingEditorMixin,DataAwareDrawing):
+ def __init__(self,width=400,height=200,*args,**kw):
+ apply(DataAwareDrawing.__init__,(self,width,height)+args,kw)
+ self._add(self,SlideBox(),name='SlideBox',validate=None,desc='The main chart')
+ self.height = 40
+ self.width = 168
+ #self.dataSource = ODBCDataSource()
+ self.dataSource = CSVDataSource()
+ self.dataSource.filename = 'slidebox.csv'
+ self.dataSource.integerColumns = ['chartId','value','numberOfBoxes']
+ self.dataSource.sql = 'SELECT chartId,numberOfBoxes,label,value FROM generic_slidebox'
+ self.dataSource.associations.size = 4
+ self.dataSource.associations.element00 = DataAssociation(column=0, target='chartId', assocType='scalar')
+ self.dataSource.associations.element01 = DataAssociation(column=1, target='SlideBox.numberOfBoxes', assocType='scalar')
+ self.dataSource.associations.element02 = DataAssociation(column=2, target='SlideBox.sourceLabelText', assocType='scalar')
+ self.dataSource.associations.element03 = DataAssociation(column=3, target='SlideBox.trianglePosition', assocType='scalar')
+ self.verbose = 1
+ self.formats = ['eps', 'pdf']
+ self.outDir = './output/'
+ self.fileNamePattern = 'slidebox%03d'
+
+
+if __name__=="__main__": #NORUNTESTS
+ SlideBoxDrawing().go()
diff --git a/bin/reportlab/tools/pythonpoint/demos/spectrum.png b/bin/reportlab/tools/pythonpoint/demos/spectrum.png
new file mode 100644
index 00000000000..06747655056
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/spectrum.png differ
diff --git a/bin/reportlab/tools/pythonpoint/demos/vertpython.gif b/bin/reportlab/tools/pythonpoint/demos/vertpython.gif
new file mode 100644
index 00000000000..5e5c60c3308
Binary files /dev/null and b/bin/reportlab/tools/pythonpoint/demos/vertpython.gif differ
--
cgit v1.2.3