public void AddLines (CGAffineTransform m, PointF [] points) { CGPathAddLines (handle, ref m, points, points.Length); } public void AddRects (CGAffineTransform m, PointF [] points, int count)
public static CGPath ToCGPath(BasicPath path) { // TODO: We assume for now that only path lines can exist. var linePoints = new List<PointF>(); foreach (var item in path.Items) { if (item is BasicPathLine) { var line = item as BasicPathLine; linePoints.Add(ToPoint(line.PointA)); linePoints.Add(ToPoint(line.PointB)); } } var cgPath = new CGPath(); cgPath.AddLines(linePoints.ToArray()); return cgPath; }