#NEWLINE# def __init__( self , function , start = None , end = None , step = None , fill_color = False , color = None , transparency_mask = None ) : #NEWLINE# #INDENT# mod_main . CoordinateSystemElement . __init__ ( self , transparency_mask = transparency_mask ) #NEWLINE# if ( not function ) : #NEWLINE# #INDENT# raise Exception ( 'Invalid function: {0}' . format ( function ) ) #NEWLINE# #UNINDENT# self . function = function #NEWLINE# self . step = float ( ( step if step else 0.1 ) ) #NEWLINE# self . start = ( start if ( start != None ) else ( - 1 ) ) #NEWLINE# self . end = ( end if ( end != None ) else ( - 1 ) ) #NEWLINE# self . fill_color = self . get_color ( fill_color ) #NEWLINE# self . color = self . get_color ( ( color if color else mod_main . DEFAULT_ELEMENT_COLOR ) ) #NEWLINE# self . points = [ ] #NEWLINE# if ( not ( self . start < self . end ) ) : #NEWLINE# #INDENT# raise Exception ( 'Invalid function start ({0}) and end ({1})' . format ( self . start , self . end ) ) #NEWLINE# #UNINDENT# if ( not ( self . step > 0 ) ) : #NEWLINE# #INDENT# raise Exception ( 'Invalid function step: {0}' . format ( self . step ) ) #NEWLINE# #UNINDENT# self . compute ( )