@@ -87,7 +87,7 @@ def initialize(self, *args, **kwargs):
8787 ImageDraw .Draw (self .circle ).ellipse (
8888 (0 , 0 , fake_size , fake_size ), fill = self .img .paint_color
8989 )
90- self .circle = self .circle .resize ((box_size , box_size ), Image .LANCZOS )
90+ self .circle = self .circle .resize ((box_size , box_size ), Image .Resampling . LANCZOS )
9191
9292 def drawrect (self , box , is_active : bool ):
9393 if is_active :
@@ -133,11 +133,11 @@ def setup_corners(self):
133133 base_draw .rectangle ((radius , 0 , fake_width , fake_width ), fill = front_color )
134134 base_draw .rectangle ((0 , radius , fake_width , fake_width ), fill = front_color )
135135 self .NW_ROUND = base .resize (
136- (self .corner_width , self .corner_width ), Image .LANCZOS
136+ (self .corner_width , self .corner_width ), Image .Resampling . LANCZOS
137137 )
138- self .SW_ROUND = self .NW_ROUND .transpose (Image .FLIP_TOP_BOTTOM )
139- self .SE_ROUND = self .NW_ROUND .transpose (Image .ROTATE_180 )
140- self .NE_ROUND = self .NW_ROUND .transpose (Image .FLIP_LEFT_RIGHT )
138+ self .SW_ROUND = self .NW_ROUND .transpose (Image .Transpose . FLIP_TOP_BOTTOM )
139+ self .SE_ROUND = self .NW_ROUND .transpose (Image .Transpose . ROTATE_180 )
140+ self .NE_ROUND = self .NW_ROUND .transpose (Image .Transpose . FLIP_LEFT_RIGHT )
141141
142142 def drawrect (self , box : List [List [int ]], is_active : "ActiveWithNeighbors" ):
143143 if not is_active :
@@ -196,8 +196,8 @@ def setup_edges(self):
196196 base_draw = ImageDraw .Draw (base )
197197 base_draw .ellipse ((0 , 0 , fake_width , fake_height * 2 ), fill = front_color )
198198
199- self .ROUND_TOP = base .resize ((shrunken_width , height ), Image .LANCZOS )
200- self .ROUND_BOTTOM = self .ROUND_TOP .transpose (Image .FLIP_TOP_BOTTOM )
199+ self .ROUND_TOP = base .resize ((shrunken_width , height ), Image .Resampling . LANCZOS )
200+ self .ROUND_BOTTOM = self .ROUND_TOP .transpose (Image .Transpose . FLIP_TOP_BOTTOM )
201201
202202 def drawrect (self , box , is_active : "ActiveWithNeighbors" ):
203203 if is_active :
@@ -249,8 +249,8 @@ def setup_edges(self):
249249 base_draw = ImageDraw .Draw (base )
250250 base_draw .ellipse ((0 , 0 , fake_width * 2 , fake_height ), fill = front_color )
251251
252- self .ROUND_LEFT = base .resize ((width , shrunken_height ), Image .LANCZOS )
253- self .ROUND_RIGHT = self .ROUND_LEFT .transpose (Image .FLIP_LEFT_RIGHT )
252+ self .ROUND_LEFT = base .resize ((width , shrunken_height ), Image .Resampling . LANCZOS )
253+ self .ROUND_RIGHT = self .ROUND_LEFT .transpose (Image .Transpose . FLIP_LEFT_RIGHT )
254254
255255 def drawrect (self , box , is_active : "ActiveWithNeighbors" ):
256256 if is_active :
0 commit comments