This commit is contained in:
朱子楚\zhuzi
2023-07-05 21:34:08 +08:00
parent ff93a6204a
commit ad4d077480
5 changed files with 11 additions and 9 deletions

View File

@ -31,7 +31,6 @@ Item{
var y = 0;
var w = control.width;
var h = control.height;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.beginPath();

View File

@ -56,7 +56,6 @@ Rectangle {
renderTarget: Canvas.Image
onPaint: {
var ctx = canvas.getContext("2d")
ctx.setTransform(1, 0, 0, 1, 0, 0)
ctx.clearRect(0, 0, canvas.width, canvas.height)
ctx.save()
ctx.lineWidth = linWidth

View File

@ -9,6 +9,15 @@ Item{
property bool shadow: true
default property alias contentItem: container.data
id:control
onWidthChanged: {
canvas.requestPaint()
}
onHeightChanged: {
canvas.requestPaint()
}
onRadiusChanged: {
canvas.requestPaint()
}
FluShadow{
anchors.fill: container
radius: control.radius[0]
@ -36,7 +45,6 @@ Item{
var y = 0;
var w = control.width;
var h = control.height;
ctx.setTransform(1, 0, 0, 1, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.save();
ctx.beginPath();