public override void Draw(DrawBatch drawBatch)
 {
     drawBatch.DrawPath(_insetPath);
     drawBatch.DrawPrimitivePath(new Pen(Microsoft.Xna.Framework.Color.OrangeRed), _starPoints1, PathType.Closed);
     drawBatch.DrawPath(_centerPath);
     drawBatch.DrawPrimitivePath(new Pen(Microsoft.Xna.Framework.Color.OrangeRed), _starPoints2, PathType.Closed);
     drawBatch.DrawPath(_outsetPath);
     drawBatch.DrawPrimitivePath(new Pen(Microsoft.Xna.Framework.Color.OrangeRed), _starPoints3, PathType.Closed);
 }
예제 #2
0
        public override void Draw(DrawBatch drawBatch)
        {
            drawBatch.DrawBezier(_bluePen, new CCVector2(50, 100), new CCVector2(50, 50), new CCVector2(150, 50), new CCVector2(150, 100));
            drawBatch.DrawBezier(_bluePen, new CCVector2(50, 250), new CCVector2(50, 150), new CCVector2(150, 150), new CCVector2(150, 250));

            drawBatch.DrawBeziers(_bluePen, _wavePoints, BezierType.Cubic);
            drawBatch.DrawPrimitivePath(Pen.Gray, _wavePoints);

            for (int i = 0; i < _wavePoints.Length; i++)
                drawBatch.DrawPoint(_pointPen, _wavePoints[i]);

            drawBatch.DrawBeziers(_bluePen, _loopPoints, BezierType.Cubic, PathType.Closed);
            drawBatch.DrawPrimitivePath(Pen.Gray, _loopPoints, PathType.Closed);

            for (int i = 0; i < _loopPoints.Length; i++)
                drawBatch.DrawPoint(_pointPen, _loopPoints[i]);
        }
 public override void Draw(DrawBatch drawBatch)
 {
     drawBatch.DrawPrimitiveLine(Pen.Blue, new CCVector2(50, 50), new CCVector2(250, 50));
     drawBatch.DrawPrimitivePath(Pen.Red, _wavy);
     drawBatch.DrawPrimitiveRectangle(Pen.Magenta, new CCRect(50, 160, 200, 100));
     drawBatch.DrawPrimitiveCircle(Pen.Black, new CCVector2(350, 100), 50);
     drawBatch.DrawPrimitiveCircle(Pen.DarkGray, new CCVector2(350, 225), 50, 16);
     drawBatch.DrawPrimitiveRectangle(Pen.Green, new CCRect(50, 350, 200, 100), (float)Math.PI / 4f);
 }
예제 #4
0
        public override void Draw(DrawBatch drawBatch)
        {
            _bounds = VisibleBoundsWorldspace;

            foreach (Figure fig in _figures)
            {
                foreach (var points in fig.History)
                {
                    drawBatch.DrawPrimitivePath(fig.ColorPen, points, PathType.Closed);
                }
            }
        }
예제 #5
0
        public override void Draw (DrawBatch drawBatch)
        {
            _bounds = drawBatch.GraphicsDevice.Viewport.Bounds;

            foreach (Figure fig in _figures) {
                foreach (var points in fig.History) {
                    drawBatch.DrawPrimitivePath(fig.ColorPen, points, PathType.Closed);
                }
            }
        }