Procedurality.Channel.squareGrow C# (CSharp) Method

squareGrow() public method

public squareGrow ( float value, int size ) : Channel
value float
size int
return Channel
		public Channel squareGrow(float value, int size) {
			Channel channel = this.copy();
			for (int y = 0; y <= height - size; y++) {
				for (int x = 0; x <= width - size; x++) {
					if (getPixel(x, y) == value) {
						for (int i = 0; i < size; i++) {
							for (int j = 0; j < size; j++) {
								channel.putPixel(x + i, y + j, value);
							}
						}
					}
				}
			}
			pixels = channel.getPixels();
			return this;
		}