Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想对 Raphael 中的路径构造函数有所帮助。我不知道如何从一个点到另一个点画一条直线。我有
var line = paper.path(M 100 0 1 0 30 100)
我想从 point1 (100 0) 到 point2 (30 100) 画一条线
这很简单:
var line = paper.path( "M100,0 L30,100" );
您还可以使用数组构建路径,这在某些情况下非常有用。
var line = paper.path( ["M", 100, 0, "L", 30, 100 ] );