packages/Windows API Code Pack 1.1/source/Samples/DirectX/CS/Direct2D/D2DShapes/D2DShapesControl.cs
/// <summary>
/// Adds a shape to compatible render target - avoids the need to redraw all shapes.
/// </summary>
/// <param name="shape">The shape.</param>
Adds a shape to compatible render target - avoids the need to redraw all shapes.
Adds a shape to compatible render target - avoids the need to redraw all shapes .
private void AddToCompatibleRenderTarget(DrawingShape shape)
        {
            lock (renderSyncObject)
            {
                bitmapRenderTarget.BeginDraw();
                shape.Draw(bitmapRenderTarget);
                bitmapRenderTarget.EndDraw();
            }
        }
private void AddToCompatibleRenderTarget ( DrawingShape shape ) { lock ( renderSyncObject ) { bitmapRenderTarget . BeginDraw ( ) ; shape . Draw ( bitmapRenderTarget ) ; bitmapRenderTarget . EndDraw ( ) ; } }
Adds a shape to compatible render target - avoids the need to redraw all shapes.
Adds a shape to compatible render target - avoids the need to redraw all shapes .
shape
DrawingShape
None