code-girls-leipzig

Open full view…

Christmas Rectangle

osther
Tue, 17 Dec 2013 20:01:27 GMT

--- function line_x(start, len, color) { for (var x = start.x; x < start.x + len; x = x + 1) { pixl.draw_pixl({x: x, y: start.y}, color); } } function line_y(start, len, color) { for (var y = start.y; y < start.y + len; y = y + 1) { pixl.draw_pixl({y: y, x: start.x}, color); } } function rectangle (start, len, color){ line_x({x: start.x, y: start.y}, len, "yellow"); line_y({y: start.y + 1, x: start.x}, len, "green"); line_x({x: start.x + 1, y: start.y + len}, len, "red"); line_y({y: start.y , x: start.x + len}, len, "blue"); } rectangle({x: 0, y: 12}, 7) ---

osther
Tue, 17 Dec 2013 20:09:06 GMT

Click to open pic [Rectangle](//res.cloudinary.com/moot/image/upload/t_d3-gallery-s1/v1387310946/:code-girls-leipzig:qoLq:rectangle.png.jpg)