箭頭我有這樣的代碼:畫上線
CGPoint arrowMiddle = CGPointMake((arrowOne.x + arrowTo.x)/2, (arrowOne.y + arrowTo.y)/2);
CGPoint arrowLeft = CGPointMake(arrowMiddle.x-40, arrowMiddle.y);
CGPoint arrowRight = CGPointMake(arrowMiddle.x, arrowMiddle.y + 40);
[arrowPath addLineToScreenPoint:arrowLeft];
[arrowPath addLineToScreenPoint:arrowMiddle];
[arrowPath addLineToScreenPoint:arrowRight];
[[mapContents overlay] addSublayer:arrowPath];
[arrowPath release];
與此輸出:
http://img517.yfrog.com/img517/7690/schermafbeelding2010032.png
我有什麼補充,以獲得左側和右側的相同程度的線+ 30°。
如果有人擁有在一條線上繪製箭頭的算法,請給予它。不要緊,它是什麼編程語言...
謝謝
perrrrrrrrrrrrrrfect !!!! – SpaceDog 2011-03-24 19:00:50