DrawingGroupDrawingContext.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Media / DrawingGroupDrawingContext.cs / 1305600 / DrawingGroupDrawingContext.cs

                            //---------------------------------------------------------------------------- 
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Description: DrawingGroupDrawingContext populates a DrawingGroup 
//              from Draw commands that are called on it.
// 
// History: 
//
//  2004/11/19 : timothyc - Created it. 
//
//---------------------------------------------------------------------------
using System.Diagnostics;
 
namespace System.Windows.Media
{ 
    internal class DrawingGroupDrawingContext : DrawingDrawingContext 
    {
        ///  
        /// DrawingGroupDrawingContext populates a DrawingGroup from the Draw
        /// commands that are called on it.
        /// 
        ///  DrawingGroup this context populates  
        internal DrawingGroupDrawingContext(DrawingGroup drawingGroup)
        { 
            Debug.Assert(null != drawingGroup); 

            _drawingGroup = drawingGroup; 
        }

        /// 
        /// Called by the base class during Close/Dispose when the content created by 
        /// the DrawingDrawingContext needs to be committed.
        ///  
        ///  
        ///     Collection containing the Drawing elements created with this
        ///     DrawingContext. 
        /// 
        /// 
        ///     This will only be called once (at most) per instance.
        ///  
        protected override void CloseCore(DrawingCollection rootDrawingGroupChildren)
        { 
            Debug.Assert(null != _drawingGroup); 

            _drawingGroup.Close(rootDrawingGroupChildren); 
        }

        private DrawingGroup _drawingGroup;
    } 

} 
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------------- 
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Description: DrawingGroupDrawingContext populates a DrawingGroup 
//              from Draw commands that are called on it.
// 
// History: 
//
//  2004/11/19 : timothyc - Created it. 
//
//---------------------------------------------------------------------------
using System.Diagnostics;
 
namespace System.Windows.Media
{ 
    internal class DrawingGroupDrawingContext : DrawingDrawingContext 
    {
        ///  
        /// DrawingGroupDrawingContext populates a DrawingGroup from the Draw
        /// commands that are called on it.
        /// 
        ///  DrawingGroup this context populates  
        internal DrawingGroupDrawingContext(DrawingGroup drawingGroup)
        { 
            Debug.Assert(null != drawingGroup); 

            _drawingGroup = drawingGroup; 
        }

        /// 
        /// Called by the base class during Close/Dispose when the content created by 
        /// the DrawingDrawingContext needs to be committed.
        ///  
        ///  
        ///     Collection containing the Drawing elements created with this
        ///     DrawingContext. 
        /// 
        /// 
        ///     This will only be called once (at most) per instance.
        ///  
        protected override void CloseCore(DrawingCollection rootDrawingGroupChildren)
        { 
            Debug.Assert(null != _drawingGroup); 

            _drawingGroup.Close(rootDrawingGroupChildren); 
        }

        private DrawingGroup _drawingGroup;
    } 

} 
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK