#NEWLINE# @ filter_method ( '[\\d]+(?:\\|[\\d]+)?' , BaseFilter . PositiveNumber , BaseFilter . PositiveNumber , BaseFilter . PositiveNumber ) #NEWLINE# def round_corner( self , radius , r , g , b ) : #NEWLINE# #INDENT# ( width , height ) = self . engine . size #NEWLINE# radius_parts = radius . split ( '|' ) #NEWLINE# a_radius = int ( radius_parts [ 0 ] ) #NEWLINE# b_radius = ( int ( radius_parts [ 1 ] ) if ( len ( radius_parts ) > 1 ) else a_radius ) #NEWLINE# ( mode , data ) = self . engine . image_data_as_rgb ( ) #NEWLINE# imgdata = _round_corner . apply ( 1 , mode , a_radius , b_radius , r , g , b , width , height , data ) #NEWLINE# self . engine . set_image_data ( imgdata )