LilyPath/DrawBatch.cs
/// <summary>
/// Adds a primitive rectangle path to the batch of figures to be rendered.
/// </summary>
/// <param name="pen">The pen supplying the color to render the path with.</param>
/// <param name="location">The top-left corner of the rectangle.</param>
/// <param name="width">The width of the rectangle.</param>
/// <param name="height">The height of the rectangle.</param>
/// <param name="angle">The angle to rotate the rectangle by around its center in radians.  Positive values rotate clockwise.</param>
/// <exception cref="InvalidOperationException"><c>DrawPrimitiveRectangle</c> was called, but <see cref="Begin()"/> has not yet been called.</exception>
Adds a primitive rectangle path to the batch of figures to be rendered.
Adds a primitive rectangle path to the batch of figures to be rendered .
public void DrawPrimitiveRectangle (Pen pen, Vector2 location, float width, float height, float angle)
        {
            _geometryBuffer[0] = location;
            _geometryBuffer[1] = new Vector2(location.X + width, location.Y);
            _geometryBuffer[2] = new Vector2(location.X + width, location.Y + height);
            _geometryBuffer[3] = new Vector2(location.X, location.Y + height);
            DrawPrimitiveQuad(pen, _geometryBuffer, 0, angle);
        }
public void DrawPrimitiveRectangle ( Pen pen , Vector2 location , float width , float height , float angle ) { _geometryBuffer [ 0 ] = location ; _geometryBuffer [ 1 ] = new Vector2 ( location . X + width , location . Y ) ; _geometryBuffer [ 2 ] = new Vector2 ( location . X + width , location . Y + height ) ; _geometryBuffer [ 3 ] = new Vector2 ( location . X , location . Y + height ) ; DrawPrimitiveQuad ( pen , _geometryBuffer , 0 , angle ) ; }
Adds a primitive rectangle path to the batch of figures to be rendered.
Adds a primitive rectangle path to the batch of figures to be rendered .
DrawPrimitiveRectangle has not yet been called.
DrawPrimitiveRectangle has not yet been called .
pen
Pen
The pen supplying the color to render the path with.
The pen supplying the color to render the path with .
location
Vector2
The top-left corner of the rectangle.
The top - left corner of the rectangle .
width
float
The width of the rectangle.
The width of the rectangle .
height
float
The height of the rectangle.
The height of the rectangle .
angle
float
The angle to rotate the rectangle by around its center in radians.  Positive values rotate clockwise.
The angle to rotate the rectangle by around its center in radians . Positive values rotate clockwise .