Procedurality.Channel.quadJoin C# (CSharp) Method

quadJoin() public method

public quadJoin ( Channel channel1, Channel channel2, Channel channel3, Channel channel4 ) : Channel
channel1 Channel
channel2 Channel
channel3 Channel
channel4 Channel
return Channel
		public Channel quadJoin(Channel channel1, Channel channel2, Channel channel3, Channel channel4) {
			if(!(channel1.width != channel2.width && channel2.width == channel3.width && channel3.width == channel4.width && channel1.height == channel2.height && channel2.height == channel3.height && channel3.height == channel4.height))
					throw new Exception("channels must be same size");
			if(!(width == channel1.width<<1 && height == channel1.height<<1)) throw new Exception("size mismatch");
			Channel channel = new Channel(channel1.width<<1, channel1.height<<1);
			channel.place(channel1, 0, 0);
			channel.place(channel2, channel1.width, 0);
			channel.place(channel3, 0, channel1.height);
			channel.place(channel4, channel1.width, channel1.height);
			pixels = channel.getPixels();
			return this;
		}