Library/ManagedCuda/NPP/NPPTypes.cs
/// <summary>
/// Replaces this Rectangle with the intersection of itself and the specified Rectangle.
/// </summary>
/// <param name="rect"></param>
Replaces this Rectangle with the intersection of itself and the specified Rectangle.
Replaces this Rectangle with the intersection of itself and the specified Rectangle .
public void Intersect(NppiRect rect)
		{
			int iX = Left;
			if (iX < rect.Left)
			{
				iX = rect.Left;
			}
			int iY = Top;
			if (iY < rect.Top)
			{
				iY = rect.Top;
			}
			int iX2 = Right;
			if (iX2 > rect.Right)
			{
				iX2 = rect.Right;
			}
			int iY2 = Bottom;
			if (iY2 > rect.Bottom)
			{
				iY2 = rect.Bottom;
			}
			int iWidth = iX2 - iX + 1;
			int iHeight = iY2 - iY + 1;
			if (iWidth <=  0 || iHeight <=  0)
			{
				iX = 0;
				iY = 0;
				iWidth = 0;
				iHeight = 0;
			}
			x = iX;
			y = iY;
			width = iWidth;
			height = iHeight;
		}
public void Intersect ( NppiRect rect ) { int iX = Left ; if ( iX < rect . Left ) { iX = rect . Left ; } int iY = Top ; if ( iY < rect . Top ) { iY = rect . Top ; } int iX2 = Right ; if ( iX2 > rect . Right ) { iX2 = rect . Right ; } int iY2 = Bottom ; if ( iY2 > rect . Bottom ) { iY2 = rect . Bottom ; } int iWidth = iX2 - iX + 1 ; int iHeight = iY2 - iY + 1 ; if ( iWidth <= 0 || iHeight <= 0 ) { iX = 0 ; iY = 0 ; iWidth = 0 ; iHeight = 0 ; } x = iX ; y = iY ; width = iWidth ; height = iHeight ; }
Replaces this Rectangle with the intersection of itself and the specified Rectangle.
Replaces this Rectangle with the intersection of itself and the specified Rectangle .
rect
NppiRect
None