2
C#을 사용하여 Xamarin에서 이미지 뷰에 직선을 그리는 방법. 나는 직선을 그리고 그 선의 길이를 계산해야한다. 도와주세요. 미리 감사드립니다 ..Xamarin에서 직선을 그리는 방법?
C#을 사용하여 Xamarin에서 이미지 뷰에 직선을 그리는 방법. 나는 직선을 그리고 그 선의 길이를 계산해야한다. 도와주세요. 미리 감사드립니다 ..Xamarin에서 직선을 그리는 방법?
당신은있는 UIImageView를 확장하는 방법 내부과 같이 선을 그릴 수 있습니다
public void DrawLine()
{
CGContext context = UIGraphics.GetCurrentContext();
context.SetLineWidth (4);
UIColor.Clear.SetFill();
UIColor.Black.SetStroke();
currentPath = new CGPath();
currentPath.AddLines (points.ToArray());
context.AddPath (currentPath);
context.DrawPath (CGPathDrawingMode.Stroke);
context.SaveState();
}
점 PointF 개체의 목록입니다.
잘 작동합니다 ... –