private void UpdatePositions( ref int x, ref int y, ref int swatchColumnNum, ref int swatchRowNum ) { if ( x + 2 * ( SWATCH_WIDTH + PADDING ) > m_swatchOuterRegionWidth ) { x = m_startX; y += SWATCH_HEIGHT + PADDING; swatchColumnNum = 0; swatchRowNum++; } else { x += SWATCH_WIDTH + PADDING; } }