he wei
2024-09-21 70edda3b00f2528a473c28ec5a50b739ed160f0f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Circle from "./Circle";
class ParamCircle extends Circle {
  /**
   * 构造参数圆环
   * @param el  参数圆环所在的容器
   */
  constructor(el) {
    super(el);
  }
  draw() {
    let ctx = this.context;
    // 绘制实心圆
    this.fillCircle(this.radius - 4, 0, 2 * Math.PI, "#00253F");
    // 绘制外边框
    this.strokeCircle(this.radius - 4, 0, 2 * Math.PI, "#00fefe", 4);
    // 绘制虚线圆
    this.strokeCircle(this.radius / 2, 0, 2 * Math.PI, "#00fefe", 1, 'dash');
    // 绘制外边框
    this.strokeCircle(this.radius / 2 - 6, 0, 2 * Math.PI, "#00fefe", 2);
    // 绘制外边框
    this.strokeCircle(this.radius * 2 / 3, Math.PI * 3 / 2, 0, "#FB884C", this.radius / 6);
  }
}
 
export default ParamCircle;