Преглед изворни кода

使用canvas绘制渐变文本,闪动,大转盘动画xxx

XUYangWei пре 2 месеци
родитељ
комит
a56740d3ec
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      commons/basic/src/main/ets/components/bigwheel/BigWheelView.ets

+ 1 - 1
commons/basic/src/main/ets/components/bigwheel/BigWheelView.ets

@@ -305,7 +305,7 @@ export struct BigWheelView{
               // 遍历每个单元格并绘制扇形
               ForEach(this.cells, (cell: Cell) => {
                 Stack() {
-                  Sector({ radius: lpx2px(this.wheelWidth) / 2, angle: cell.angle, color: cell.color }); // 创建扇形
+                  Sector({ radius: lpx2px(this.wheelWidth-15), angle: cell.angle, color: cell.color }); // 创建扇形
                   Text(cell.title).fontColor(Color.Black).fontWeight(700).margin({ bottom: this.wheelWidth / 1.4 }); // 显示单元格标题
                 }.width('100%').height('100%').rotate({ angle: cell.rotate }); // 设置宽度和高度,并旋转
               });