Axiom.RenderSystems.DirectX9.D3DHardwarePixelBuffer.Blit C# (CSharp) Метод

Blit() публичный Метод

Copies a box from another PixelBuffer to a region of the this PixelBuffer.
The source and destination regions dimensions don't have to match, in which case scaling is done. This scaling is generally done using a bilinear filter in hardware, but it is faster to pass the source image in the right dimensions. Only call this function when both buffers are unlocked.
public Blit ( Axiom.Graphics.HardwarePixelBuffer src, BasicBox srcBox, BasicBox dstBox ) : void
src Axiom.Graphics.HardwarePixelBuffer Source/dest pixel buffer
srcBox Axiom.Media.BasicBox Image.BasicBox describing the source region in this buffer
dstBox Axiom.Media.BasicBox Image.BasicBox describing the destination region in this buffer
Результат void
		public override void Blit( HardwarePixelBuffer src, BasicBox srcBox, BasicBox dstBox )
		{
			D3DHardwarePixelBuffer _src = (D3DHardwarePixelBuffer)src;
			if ( surface != null && _src.surface != null )
			{
				// Surface-to-surface
				System.Drawing.Rectangle dsrcRect = ToD3DRectangle( srcBox );
				System.Drawing.Rectangle ddestRect = ToD3DRectangle( dstBox );
				// D3DXLoadSurfaceFromSurface
				D3D.Surface.FromSurface( surface, _src.surface, D3D.Filter.None, 0, dsrcRect, ddestRect );
			}
			else if ( volume != null && _src.volume != null )
			{
				// Volume-to-volume
				D3D.Box dsrcBox = ToD3DBox( srcBox );
				D3D.Box ddestBox = ToD3DBox( dstBox );
				// D3DXLoadVolumeFromVolume
				D3D.Volume.FromVolume( volume, _src.volume, D3D.Filter.None, 0, dsrcBox, ddestBox );
			}
			else
				// Software fallback
				base.Blit( _src, srcBox, dstBox );
		}