#NEWLINE# def build( self ) : #NEWLINE# #INDENT# self . clear_widgets ( ) #NEWLINE# texture = self . texture #NEWLINE# if ( not texture ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# bs = self . blocksize #NEWLINE# ( tw , th ) = self . texture_size #NEWLINE# for x in range ( int ( ( tw / bs ) ) ) : #NEWLINE# #INDENT# for y in range ( int ( ( th / bs ) ) ) : #NEWLINE# #INDENT# bx = ( x * bs ) #NEWLINE# by = ( y * bs ) #NEWLINE# subtexture = texture . get_region ( bx , by , bs , bs ) #NEWLINE# node = Scatter ( pos = ( bx , by ) , size = ( bs , bs ) ) #NEWLINE# with node . canvas : #NEWLINE# #INDENT# Color ( 1 , 1 , 1 ) #NEWLINE# Rectangle ( size = node . size , texture = subtexture ) #NEWLINE# #UNINDENT# self . add_widget ( node ) #NEWLINE# #UNINDENT# #UNINDENT# self . shuffle ( )