LilyPath/DrawBatch.cs
/// <summary>
/// Computes and adds a point path to the batch of figures to be rendered.
/// </summary>
/// <param name="pen">The pen to render the path with.</param>
/// <param name="point">The point to be rendered.</param>
/// <exception cref="InvalidOperationException"><c>DrawPoint</c> was called, but <see cref="Begin()"/> has not yet been called.</exception>
Computes and adds a point path to the batch of figures to be rendered.
Computes and adds a point path to the batch of figures to be rendered .
public void DrawPoint (Pen pen, Vector2 point)
        {
            if (!_inDraw)
                throw new InvalidOperationException();
            if (pen == null)
                throw new ArgumentNullException("pen");
            RequestBufferSpace(4, 6);
            AddInfo(PrimitiveType.TriangleList, 4, 6, pen.Brush);
            int baseVertexIndex = _vertexBufferIndex;
            float w2 = pen.Width / 2;
            AddVertex(new Vector2(point.X - w2, point.Y - w2), pen);
            AddVertex(new Vector2(point.X + w2, point.Y - w2), pen);
            AddVertex(new Vector2(point.X - w2, point.Y + w2), pen);
            AddVertex(new Vector2(point.X + w2, point.Y + w2), pen);
            AddSegment(baseVertexIndex + 0, baseVertexIndex + 2);
            if (_sortMode == DrawSortMode.Immediate)
                FlushBuffer();
        }
public void DrawPoint ( Pen pen , Vector2 point ) { if ( ! _inDraw ) throw new InvalidOperationException ( ) ; if ( pen == null ) throw new ArgumentNullException ( " " ) ; RequestBufferSpace ( 4 , 6 ) ; AddInfo ( PrimitiveType . TriangleList , 4 , 6 , pen . Brush ) ; int baseVertexIndex = _vertexBufferIndex ; float w2 = pen . Width / 2 ; AddVertex ( new Vector2 ( point . X - w2 , point . Y - w2 ) , pen ) ; AddVertex ( new Vector2 ( point . X + w2 , point . Y - w2 ) , pen ) ; AddVertex ( new Vector2 ( point . X - w2 , point . Y + w2 ) , pen ) ; AddVertex ( new Vector2 ( point . X + w2 , point . Y + w2 ) , pen ) ; AddSegment ( baseVertexIndex + 0 , baseVertexIndex + 2 ) ; if ( _sortMode == DrawSortMode . Immediate ) FlushBuffer ( ) ; }
Computes and adds a point path to the batch of figures to be rendered.
Computes and adds a point path to the batch of figures to be rendered .
DrawPoint has not yet been called.
DrawPoint has not yet been called .
pen
Pen
The pen to render the path with.
The pen to render the path with .
point
Vector2
The point to be rendered.
The point to be rendered .