|
本帖最后由 leilei4908 于 2015-10-7 16:39 编辑
- p1 = list(startX+dX startY-dY)
- p2 = list(endX+dX endY-dY)
- p3 = list(endX-dX endY+dY)
- p4 = list(startX-dX startY+dY)
- origin1 = list(endX endY)
- origin2 = list(startX startY)
- path = list(list(p1 p2))
- if(startX < endX || and(startX == endX,startY < endY) then
- path = append1(path list(p2 p3 0 origin1 width/2 nil))
- path = append1(path list(p3 p4))
- path = append1(path list(p4 p1 0 origin2 width/2 nil))
- )
- if(startX > endX || and(startX == endX,startY > endY) then
- path = append1(path list(p2 p3 0 origin1 width/2 t))
- path = append1(path list(p3 p4))
- path = append1(path list(p4 p1 0 origin2 width/2 t))
- )
- lPath = axlMakeDynamicsPath(path)
- lPoly = axlPolyFromDB(lPath)
- lshape = car(axlDBCreateShape(car(lPoly) t shapelayer))
复制代码
为什么在15.5不是正常的shape呢?
看pdf,15.5的 axlMakeDynamicsPath这个函数还不支持g_clockwise
是不是因为这个?
其实,两行代码能替代我写的这个line2shape函数了。。。
poly = axlPolyFromDB(line ?endCapType 'ROUND)
lshape = car(axlDBCreateShape(car(poly) t shapelayer))
|
|