Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,30 @@
require('GD')
func pinstripes(width = 1280, height = 720) {
var im = %O<GD::Image>.new(width, height)
var colors = [0, 255].variations_with_repetition(3)
var paintcolors = colors.shuffle.map {|rgb|
im.colorAllocate(rgb...)
}
var starty = 0
var barheight = height//4
for barwidth in (1..4) {
for (
var(startx = 0, colorindex = 0);
startx + barwidth <= width;
startx += barwidth
) {
im.filledRectangle(startx, starty, startx+barwidth,
starty + barheight - 1, paintcolors[colorindex++ % 8])
}
starty += barheight
}
return im
}
File('pinstripes.png').write(pinstripes().png, :raw)