#NEWLINE# def onClickLines( self , sender ) : #NEWLINE# #INDENT# self . chart . run = False #NEWLINE# self . canvas . saveContext ( ) #NEWLINE# self . canvas . clear ( ) #NEWLINE# self . canvas . scale ( 0.9 , 0.9 ) #NEWLINE# self . canvas . translate ( 30 , 40 ) #NEWLINE# self . canvas . saveContext ( ) #NEWLINE# self . canvas . setStrokeStyle ( Color . Color ( '#9CFF00' ) ) #NEWLINE# for i in range ( 10 ) : #NEWLINE# #INDENT# self . canvas . setLineWidth ( ( 1 + dy ) ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( ( 5 + ( i * 14 ) ) , 5 ) #NEWLINE# self . canvas . lineTo ( ( 5 + ( i * 14 ) ) , 140 ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# #UNINDENT# self . canvas . restoreContext ( ) #NEWLINE# self . canvas . saveContext ( ) #NEWLINE# self . canvas . translate ( 0 , 170 ) #NEWLINE# self . canvas . setStrokeStyle ( Color . Color ( '#09f' ) ) #NEWLINE# self . canvas . setLineWidth ( 2 ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( 10 , 10 ) #NEWLINE# self . canvas . lineTo ( 140 , 10 ) #NEWLINE# self . canvas . moveTo ( 10 , 140 ) #NEWLINE# self . canvas . lineTo ( 140 , 140 ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . setStrokeStyle ( Color . Color ( '#9CFF00' ) ) #NEWLINE# self . canvas . setLineWidth ( 15 ) #NEWLINE# self . canvas . setLineCap ( GWTCanvasConsts . BUTT ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( 25 , 10 ) #NEWLINE# self . canvas . lineTo ( 25 , 140 ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . setLineCap ( GWTCanvasConsts . ROUND ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( 75 , 10 ) #NEWLINE# self . canvas . lineTo ( 75 , 140 ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . setLineCap ( GWTCanvasConsts . SQUARE ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( 125 , 10 ) #NEWLINE# self . canvas . lineTo ( 125 , 140 ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . restoreContext ( ) #NEWLINE# self . canvas . saveContext ( ) #NEWLINE# self . canvas . translate ( 170 , 0 ) #NEWLINE# self . canvas . setStrokeStyle ( Color . Color ( '#9CFF00' ) ) #NEWLINE# self . canvas . setLineWidth ( 10 ) #NEWLINE# self . canvas . setLineJoin ( GWTCanvasConsts . ROUND ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( ( - 5 ) , 5 ) #NEWLINE# self . canvas . lineTo ( 35 , 45 ) #NEWLINE# self . canvas . lineTo ( 75 , 5 ) #NEWLINE# self . canvas . lineTo ( 115 , 45 ) #NEWLINE# self . canvas . lineTo ( 155 , 5 ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . setLineJoin ( GWTCanvasConsts . BEVEL ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( ( - 5 ) , ( 5 + 40 ) ) #NEWLINE# self . canvas . lineTo ( 35 , ( 45 + 40 ) ) #NEWLINE# self . canvas . lineTo ( 75 , ( 5 + 40 ) ) #NEWLINE# self . canvas . lineTo ( 115 , ( 45 + 40 ) ) #NEWLINE# self . canvas . lineTo ( 155 , ( 5 + 40 ) ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . setLineJoin ( GWTCanvasConsts . MITER ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( ( - 5 ) , ( 5 + 80 ) ) #NEWLINE# self . canvas . lineTo ( 35 , ( 45 + 80 ) ) #NEWLINE# self . canvas . lineTo ( 75 , ( 5 + 80 ) ) #NEWLINE# self . canvas . lineTo ( 115 , ( 45 + 80 ) ) #NEWLINE# self . canvas . lineTo ( 155 , ( 5 + 80 ) ) #NEWLINE# self . canvas . stroke ( ) #NEWLINE# self . canvas . restoreContext ( ) #NEWLINE# self . canvas . saveContext ( ) #NEWLINE# self . canvas . translate ( 170 , 170 ) #NEWLINE# self . canvas . setStrokeStyle ( Color . Color ( '#09f' ) ) #NEWLINE# self . canvas . setLineWidth ( 2 ) #NEWLINE# self . canvas . strokeRect ( ( - 5 ) , 50 , 160 , 50 ) #NEWLINE# self . canvas . setStrokeStyle ( Color . Color ( '#9CFF00' ) ) #NEWLINE# self . canvas . setLineWidth ( 10 ) #NEWLINE# self . canvas . setMiterLimit ( 10 ) #NEWLINE# self . canvas . beginPath ( ) #NEWLINE# self . canvas . moveTo ( 0 , 100 ) #NEWLINE# for i in range ( 19 ) : #NEWLINE# #INDENT# if ( ( i % 2 ) == 0 ) : #NEWLINE# #INDENT# dy = 25.0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# dy = ( - 25.0 ) #NEWLINE# #UNINDENT# self . canvas . lineTo ( ( math . pow ( i , 1.5 ) * 2.0 ) , ( 75 + dy ) ) #NEWLINE# #UNINDENT# self . canvas . stroke ( ) #NEWLINE# self . canvas . restoreContext ( ) #NEWLINE# self . canvas . restoreContext ( )