Sayed's Blog

drawlang > docs > users > examples > modern-art

Modern Art

var canvas = getCanvas();

for (var i = 0; i < 1000; i++) {
	var r = Math.random() * 255;
	var g = Math.random() * 255;
	var b = Math.random() * 255;
	canvas.setColor(Color(r, g, b, 255));

	var x = Math.random() * 500;
	var y= Math.random() * 400;
	var w= Math.random() * 100;
	var h = Math.random() * 100;
	canvas.fillRect(x, y, w, h);
}

    © 2023