private static PathBuilder BuildFlower(CCVector2 center, int petalCount, float petalLength, float petalWidth, float rotation) { List <CCVector2> points = StarPoints(center, petalCount / 2, petalLength, petalLength, rotation, false); PathBuilder builder = new PathBuilder(); builder.AddPoint(center); foreach (var point in points) { builder.AddArcByPoint(point, petalWidth / 2); builder.AddArcByPoint(center, petalWidth / 2); } return(builder); }
private GraphicsPath CreateFlowerGP(Pen pen, CCVector2 center, int petalCount, float petalLength, float petalWidth, float rotation) { List <CCVector2> points = StarPoints(center, petalCount / 2, petalLength, petalLength, rotation, false); PathBuilder builder = new PathBuilder(); builder.AddPoint(center); foreach (CCVector2 point in points) { builder.AddArcByPoint(point, petalWidth / 2); builder.AddArcByPoint(center, petalWidth / 2); } return(builder.Stroke(pen, PathType.Closed)); }