From 6234ba3299c4558d242c0f203698610f3e3ebf91 Mon Sep 17 00:00:00 2001 From: SO_RA <490328928@qq.com> Date: Tue, 22 Mar 2022 01:41:28 +0800 Subject: [PATCH] fix afterimage --- styles/Preset_Ordinal_Scale_UI_bottom/Style.qml | 2 +- styles/Preset_circle/Style.qml | 2 +- styles/Preset_line/Style.qml | 2 +- styles/Preset_solidcircle/Style.qml | 2 +- styles/Preset_waves/Style.qml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/styles/Preset_Ordinal_Scale_UI_bottom/Style.qml b/styles/Preset_Ordinal_Scale_UI_bottom/Style.qml index dd408f8..957e662 100644 --- a/styles/Preset_Ordinal_Scale_UI_bottom/Style.qml +++ b/styles/Preset_Ordinal_Scale_UI_bottom/Style.qml @@ -92,7 +92,7 @@ StyleAPI { this_phase = (this_phase+this_speed)%(Math.PI*64); - context.clearRect(0, 0, width, height); + context.clearRect(0, 0, width+32, height+32); drawLine(this_delta*trebleAmRatio*trebleAm, trebleColor, 1.5, this_phase, false); drawLine(this_delta*bassAmRatio*bassAm, bassColor, 1.5, this_phase+0.8, false); diff --git a/styles/Preset_circle/Style.qml b/styles/Preset_circle/Style.qml index af6dcc5..bc574b1 100644 --- a/styles/Preset_circle/Style.qml +++ b/styles/Preset_circle/Style.qml @@ -112,7 +112,7 @@ StyleAPI { } } } - context.clearRect(0, 0, width, height); + context.clearRect(0, 0, width+32, height+32); createPoint(); context.beginPath(); diff --git a/styles/Preset_line/Style.qml b/styles/Preset_line/Style.qml index 7472df2..602cd16 100644 --- a/styles/Preset_line/Style.qml +++ b/styles/Preset_line/Style.qml @@ -113,7 +113,7 @@ StyleAPI { let _dx = Math.round(_ux/2); let _y = halfHeight-_y_dy - context.clearRect(0, 0, width, height); + context.clearRect(0, 0, width+32, height+32); if(lineRotateFlag || centerRotateFlag) { context.transform(1, centerRotateFlag*centerRotateAngle * degUnit, -lineRotateFlag*lineRotateAngle * degUnit, 1, lineRotateFlag*Math.sin(1.05*lineRotateAngle*degUnit)*_y, 0); diff --git a/styles/Preset_solidcircle/Style.qml b/styles/Preset_solidcircle/Style.qml index 41a3312..dfdf51a 100644 --- a/styles/Preset_solidcircle/Style.qml +++ b/styles/Preset_solidcircle/Style.qml @@ -113,7 +113,7 @@ StyleAPI { } } - context.clearRect(0, 0, width, height); + context.clearRect(0, 0, width+32, height+32); createPoint(); context.beginPath(); diff --git a/styles/Preset_waves/Style.qml b/styles/Preset_waves/Style.qml index 924ada5..47bce92 100644 --- a/styles/Preset_waves/Style.qml +++ b/styles/Preset_waves/Style.qml @@ -39,7 +39,7 @@ StyleAPI { } } - context.clearRect(0, 0, width, height); + context.clearRect(0, 0, width+32, height+32); context.beginPath(); context.moveTo(0, halfHeight);