packages/Windows API Code Pack 1.1/source/Samples/DirectX/CS/Direct2D/D2DShapes/D2DShapesControl.cs
/// <summary>
/// Adds the shape to the list and updates the render targets.
/// </summary>
/// <param name="shape">The shape.</param>
/// <returns></returns>
Adds the shape to the list and updates the render targets.
Adds the shape to the list and updates the render targets .
private DrawingShape AddShape(DrawingShape shape)
        {
            lock (renderSyncObject)
            {
                drawingShapes.Add(shape);
                string statName = shape.GetType().Name.Replace("Shape", " count");
                UpdateStats(statName, 1);
                if (UsingCompatibleRenderTarget)
                    AddToCompatibleRenderTarget(shape);
                InvalidateClientRectangle();
                return shape;
            }
        }
private DrawingShape AddShape ( DrawingShape shape ) { lock ( renderSyncObject ) { drawingShapes . Add ( shape ) ; string statName = shape . GetType ( ) . Name . Replace ( " " , " " ) ; UpdateStats ( statName , 1 ) ; if ( UsingCompatibleRenderTarget ) AddToCompatibleRenderTarget ( shape ) ; InvalidateClientRectangle ( ) ; return shape ; } }
Adds the shape to the list and updates the render targets.
Adds the shape to the list and updates the render targets .
None
shape
DrawingShape
None