Ejemplo n.º 1
0
		public GdiRenderingSurface(IntPtr windowId, int width, int height)
			: base(RenderingSurfaceType.Offscreen)
		{
			_imageBuffer = new BitmapBuffer();
			_finalBuffer = new BackBuffer();

			WindowID = windowId;
			ClientRectangle = new Rectangle(0, 0, width, height);
		}
Ejemplo n.º 2
0
        /// <summary>
        /// Implementation of the <see cref="IDisposable"/> pattern
        /// </summary>
        /// <param name="disposing">True if this object is being disposed, false if it is being finalized</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_imageBuffer != null)
                {
                    _imageBuffer.Dispose();
                    _imageBuffer = null;
                }

                if (_finalBuffer != null)
                {
                    _finalBuffer.Dispose();
                    _finalBuffer = null;
                }
            }
        }
Ejemplo n.º 3
0
		/// <summary>
		/// Implementation of the <see cref="IDisposable"/> pattern
		/// </summary>
		/// <param name="disposing">True if this object is being disposed, false if it is being finalized</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (_imageBuffer != null)
				{
					_imageBuffer.Dispose();
					_imageBuffer = null;
				}

				if (_finalBuffer != null)
				{
					_finalBuffer.Dispose();
					_finalBuffer = null;
				}
			}
		}