95
95
pd ._repaint = function (object )
96
96
local obj = pd ._objects [object ]
97
97
if nil ~= obj and type (obj .repaint ) == " function" then
98
- obj :repaint (0 );
98
+ obj :repaint (0 )
99
99
end
100
100
end
101
101
@@ -471,7 +471,7 @@ function pd.Class:repaint(layer)
471
471
local paint_layer_method = " paint_layer_" .. tostring (i )
472
472
if type (self [paint_layer_method ]) == " function" then
473
473
table.insert (paint_funcs , self [paint_layer_method ])
474
- i = i + 1 ;
474
+ i = i + 1
475
475
else
476
476
break -- Exit the loop when no more paint_layer_X methods are found
477
477
end
@@ -480,21 +480,21 @@ function pd.Class:repaint(layer)
480
480
-- repaint all
481
481
if layer == nil or layer == 0 then
482
482
for i , paint_fn in ipairs (paint_funcs ) do
483
- local g = _gfx_internal .start_paint (self ._object , i );
483
+ local g = _gfx_internal .start_paint (self ._object , i )
484
484
if type (paint_fn ) == " function" and g ~= nil then
485
- paint_fn (self , g );
486
- _gfx_internal .end_paint (g , i );
485
+ paint_fn (self , g )
486
+ _gfx_internal .end_paint (g , i )
487
487
else
488
- break ;
488
+ break
489
489
end
490
490
end
491
491
-- repaint only chosen index
492
492
elseif layer <= # paint_funcs then
493
- local g = _gfx_internal .start_paint (self ._object , layer );
493
+ local g = _gfx_internal .start_paint (self ._object , layer )
494
494
local paint_fn = paint_funcs [layer ]
495
495
if type (paint_fn ) == " function" and g ~= nil then
496
- paint_fn (self , g );
497
- _gfx_internal .end_paint (g , layer );
496
+ paint_fn (self , g )
497
+ _gfx_internal .end_paint (g , layer )
498
498
end
499
499
end
500
500
end
0 commit comments