Procedurality.Channel.copy C# (CSharp) Method

copy() public method

public copy ( ) : Channel
return Channel
		public Channel copy() {
			Channel channel = new Channel(width, height);
			for(int x =0;x<this.getWidth();x++)
				for(int y =0;y<this.getWidth();y++)
					channel.putPixel(x,y,pixels[y,x]);
			return channel;
		}
	

Usage Example

コード例 #1
0
ファイル: Layer.cs プロジェクト: N3X15/VoxelSim
		public Layer(int width, int height) {
			this.width = width;
			this.height = height;
			Channel empty = new Channel(width, height);
			empty.fill(1f);
			this.r = empty;
			this.g = empty.copy();
			this.b = empty.copy();
			this.a = null;
		}
All Usage Examples Of Procedurality.Channel::copy