【问题标题】:Change start point of circle in Canvas?更改画布中圆圈的起点?
【发布时间】:2012-08-09 15:47:39
【问题描述】:

我发现此代码可以在 Canvas 元素中的弧上键入。我已经基本修改为我需要的了,但不知道如何改变它的“起点”?

我有一个演示 here

【问题讨论】:

    标签: javascript css html canvas


    【解决方案1】:
    circle = {
        x: cnv.width / 2,  // x coordinate of center
        y: cnv.height / 2, // y coordinate of center
        r: 150,
        lw: 75
    };
    

    例如,如下给出将在画布的原点绘制它

    circle = {
        x: 0,  // x coordinate of center
        y: 0, // y coordinate of center
        r: 150,
        lw: 75
    };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多