This commit is contained in:
zhuzichu 2023-06-28 09:45:47 +08:00
parent a7e8a5e4cf
commit 157dc9166b

View File

@ -240,12 +240,13 @@ CustomWindow {
ctx.save() ctx.save()
if(img_cache.source.toString().length!==0){ if(img_cache.source.toString().length!==0){
try{ try{
ctx.drawImage(img_cache, 0, 0, canvasSize.width, canvasSize.height, 0, 0, canvasSize.width, canvasSize.height) ctx.drawImage(img_cache.source, 0, 0, canvasSize.width, canvasSize.height, 0, 0, canvasSize.width, canvasSize.height)
}catch(e){ }catch(e){
img_cache.source = "" img_cache.source = ""
} }
} }
clearArc(ctx, centerX, centerY, radius) clearArc(ctx, centerX, centerY, radius)
canvas.unloadImage(img_cache.source)
ctx.restore() ctx.restore()
} }
function clearArc(ctx,x, y, radius, startAngle, endAngle) { function clearArc(ctx,x, y, radius, startAngle, endAngle) {