Source/NFX/Collections/BitMatrix2D.cs
/// <summary>
/// Fills homogeneous sub-area of this square with the specified value
/// </summary>
Fills homogeneous sub-area of this square with the specified value
Fills homogeneous sub - area of this square with the specified value
public void FillSubArea(int left, int top, int width, int height, bool value)
      {
        if (left < 0 || top < 0 || width < 1 || height < 1)
          throw new NFXException(StringConsts.ARGUMENT_ERROR+GetType().Name + "left and top couldn't be less than 0 and width and height couldn't be less than 1");
        int right = left + width;
        int bottom = right + height;
        if (right >= Width || bottom >= Height)
          throw new NFXException(StringConsts.ARGUMENT_ERROR+GetType().Name + "required subarea is out of main square bounds");
        for (int x = left; x <= right; x++)
          for (int y = top; y <= bottom; y++)
            m_Bits[x + y * Width] = value;
      }
public void FillSubArea ( int left , int top , int width , int height , bool value ) { if ( left < 0 || top < 0 || width < 1 || height < 1 ) throw new NFXException ( StringConsts . ARGUMENT_ERROR + GetType ( ) . Name + " " ) ; int right = left + width ; int bottom = right + height ; if ( right >= Width || bottom >= Height ) throw new NFXException ( StringConsts . ARGUMENT_ERROR + GetType ( ) . Name + " " ) ; for ( int x = left ; x <= right ; x ++ ) for ( int y = top ; y <= bottom ; y ++ ) m_Bits [ x + y * Width ] = value ; }
Fills homogeneous sub-area of this square with the specified value
Fills homogeneous sub - area of this square with the specified value
left
int
top
int
width
int
height
int
value
bool