File: textmode.py

package info (click to toggle)
python-reportlab 4.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,708 kB
  • sloc: python: 99,020; xml: 1,494; makefile: 143; sh: 12
file content (20 lines) | stat: -rw-r--r-- 2,027 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.shapes import _DrawingEditorMixin, Drawing, Group, String, Line, Path
from reportlab.lib.colors import Color, CMYKColor, PCMYKColor

class ExplodedDrawing_TextRenderModeDrawing(_DrawingEditorMixin,Drawing):
	def __init__(self,width=400,height=200,*args,**kw):
		Drawing.__init__(self,width,height,*args,**kw)
		self.transform = (1,0,0,1,0,0)
		self.add(String(65,10,'text0',textAnchor='start',fontName='Helvetica',fontSize=80,fillColor=Color(0,0,1,1),strokeColor=Color(1,0,0,1),strokeWidth=1.5,textRenderMode=0))
		self.add(String(405,20,'text1',textAnchor='end',fontName='Helvetica',fontSize=80,fillColor=Color(0,0,1,1),strokeColor=Color(1,0,0,1),strokeWidth=1.5,textRenderMode=1))
		self.add(String(190,90,'text2',textAnchor='start',fontName='Helvetica',fontSize=80,fillColor=Color(0,0,1,1),strokeColor=Color(1,0,0,1),strokeWidth=1.5,textRenderMode=2))
		self.add(String(240,150,'text3',textAnchor='start',fontName='Helvetica',fontSize=40,fillColor=Color(0,.501961,0,1),strokeColor=Color(1,0,1,1),strokeWidth=.5,textRenderMode=2))
		self.add(String(140,150,'text4',textAnchor='start',fontName='Helvetica',fontSize=40,fillColor=Color(0,.501961,0,1),strokeColor=Color(1,0,1,1),strokeWidth=.5,textRenderMode=1))
		self.add(String(70,120,'text5',textAnchor='start',fontName='Helvetica',fontSize=40,fillColor=Color(0,.501961,0,1),strokeColor=Color(1,0,1,1),strokeWidth=.5,textRenderMode=0))
		self.add(Line(40,40,70,70,strokeColor=Color(0,.501961,0,1),strokeWidth=.5,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))
		self.add(Path(points=[80,80,110,110,80,110],operators=[0,1,1,3],isClipPath=0,autoclose=None,fillMode=0,fillColor=None,fillOpacity=None,strokeColor=Color(1,1,0,1),strokeWidth=2,strokeLineCap=0,strokeLineJoin=0,strokeMiterLimit=0,strokeDashArray=None,strokeOpacity=None))


if __name__=="__main__": #NORUNTESTS
	ExplodedDrawing_TextRenderModeDrawing().save(formats=['pdf'],outDir='.',fnRoot=None)