System.Drawing.Drawing2D.ExtendedGeneralPath.needRoom C# (CSharp) Метод

needRoom() приватный Метод

private needRoom ( int newTypes, int newCoords, bool needMove ) : void
newTypes int
newCoords int
needMove bool
Результат void
		private void needRoom(int newTypes, int newCoords, bool needMove) 
		{
			if (needMove && _typesCount == 0)
				throw new IllegalPathStateException ("missing initial moveto in path definition");
			
			int size = _coords.Length;
			if (_coordsCount + newCoords > size) {
				int grow = size;
				if (grow > EXPAND_MAX * 2)
					grow = EXPAND_MAX * 2;
				
				if (grow < newCoords)
					grow = newCoords;
				
				float [] arr = new float [size + grow];
				Array.Copy (_coords, 0, arr, 0, _coordsCount);
				_coords = arr;
			}
			size = _types.Length;
			if (_typesCount + newTypes > size) {
				int grow = size;
				if (grow > EXPAND_MAX)
					grow = EXPAND_MAX;
				
				if (grow < newTypes)
					grow = newTypes;
				
				sbyte [] arr = new sbyte [size + grow];
				Array.Copy (_types, 0, arr, 0, _typesCount);
				_types = arr;
			}
		}