2013-04-09 93 views
0

雖然我試圖在iPad視圖上畫交叉線,但它擦除了前一行的重疊部分。我正在使用setNeedsDisplayInRect()方法刷新繪圖。請建議我解決這個問題。ipad丟失重疊註釋

我寫了這個代碼是

我使用下面的代碼來繪製:

context.MoveTo (penVertices [0].X, penVertices [0].Y); 

for (int i = 1; i < penVertices.Count; i++) { 

context.AddLineToPoint (penVertices [i].X, penVertices [i].Y); 

} 
context.StrokePath(); 

而且使用下面的代碼,以顯示線條

SetNeedsDisplayInRect(RectangleF.FromLTRB(minX - (lineWidth/2), minY - (lineWidth/2), maxX + (lineWidth/2), maxY + (lineWidth/2))); 

回答

0

喜爲了避免在重疊位置擦除先前製作的註釋,使用路徑來繪製註釋而不是簡單的上下文。