【问题标题】:How to Determine the large-arc-flag in Path Arc如何确定 Path Arc 中的 large-arc-flag
【发布时间】:2013-11-15 08:02:35
【问题描述】:

我有两个坐标 start(x1,y1) end(x2,y2) 和 circle(c1,c2)

x1, y1, x2, y2, c1, c2, radius, clockwise

我想画一条弧线,从(x1,y1)到(x2,y2),我觉得SVG Path是

M x1 y1 A radius radius 0 ? clockwise x2 y2

但是如何确定 large-arc-flag 是 1 还是 0,谢谢。

【问题讨论】:

    标签: html svg


    【解决方案1】:

    规范这一部分中的图表几乎解释了正在发生的事情。

    http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands

    如果您有起点、终点和半径,那么这些点之间的弧线要么是小弧线( 180 度 - 绕圆很长) .当然,这是假设圆心不在两点之间。

    在大多数情况下,您可能需要捷径。即 large-arc-flag = 0。

    通常是另一个标志,sweep,这是比较棘手的。

    【讨论】:

      猜你喜欢
      • 2012-02-20
      • 1970-01-01
      • 2011-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-10
      • 1970-01-01
      相关资源
      最近更新 更多