public override void Setup (GraphicsDevice device) { _gradWidth = new GradientPen(Color.Lime, Color.Blue, 15); _gradLength = new PathGradientPen(Color.Lime, Color.Blue, 15); PathBuilder pathBuilder = new PathBuilder() { CalculateLengths = true }; pathBuilder.AddPath(StarPoints(new Vector2(325, 75), 5, 50, 25, 0, false)); _widthStar = pathBuilder.Stroke(_gradWidth, PathType.Open); _lengthStar = pathBuilder.Stroke(_gradLength, Matrix.CreateTranslation(0, 125, 0), PathType.Open); }
public GradientPens() { _gradWidth = new GradientPen(Microsoft.Xna.Framework.Color.Lime, Microsoft.Xna.Framework.Color.Blue, 15); _gradLength = new PathGradientPen(Microsoft.Xna.Framework.Color.Lime, Microsoft.Xna.Framework.Color.Blue, 15); PathBuilder pathBuilder = new PathBuilder() { CalculateLengths = true }; pathBuilder.AddPath(StarPoints(new CCVector2(325, 75), 5, 50, 25, 0, false)); _widthStar = pathBuilder.Stroke(_gradWidth, PathType.Open); _lengthStar = pathBuilder.Stroke(_gradLength, CCAffineTransform.Translate(CCAffineTransform.Identity, 0, 125, 0), PathType.Open); }