packages/Windows API Code Pack 1.1/source/Samples/DirectX/CS/Direct2D/D2DShapes/D2DShapesControl.cs
/// <summary>
/// Puts a shape from the stack of peelings back to the list of shapes and invalidates the render targets.
/// </summary>
/// <returns></returns>
Puts a shape from the stack of peelings back to the list of shapes and invalidates the render targets.
Puts a shape from the stack of peelings back to the list of shapes and invalidates the render targets .
internal DrawingShape UnpeelShape()
        {
            lock (renderSyncObject)
            {
                if (peelings.Count == 0)
                    return null;
                DrawingShape shape = peelings.Peek();
                string statName = shape.GetType().Name.Replace("Shape", " count");
                UpdateStats(statName, 1);
                drawingShapes.Add(peelings.Pop());
                if (UsingCompatibleRenderTarget)
                    AddToCompatibleRenderTarget(shape);
                InvalidateClientRectangle();
                return shape;
            }
        }
internal DrawingShape UnpeelShape ( ) { lock ( renderSyncObject ) { if ( peelings . Count == 0 ) return null ; DrawingShape shape = peelings . Peek ( ) ; string statName = shape . GetType ( ) . Name . Replace ( " " , " " ) ; UpdateStats ( statName , 1 ) ; drawingShapes . Add ( peelings . Pop ( ) ) ; if ( UsingCompatibleRenderTarget ) AddToCompatibleRenderTarget ( shape ) ; InvalidateClientRectangle ( ) ; return shape ; } }
Puts a shape from the stack of peelings back to the list of shapes and invalidates the render targets.
Puts a shape from the stack of peelings back to the list of shapes and invalidates the render targets .
None