Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,24 @@
require('GD');
var colors = Hash.new(
white => [255, 255, 255],
red => [255, 0, 0],
green => [0, 255, 0],
blue => [0, 0, 255],
magenta => [255, 0, 255],
yellow => [255, 255, 0],
cyan => [0, 255, 255],
black => [0, 0, 0],
);
var barwidth = 160/8;
var image = %s'GD::Image'.new(160, 100);
var start = 0;
colors.values.each { |rgb|
var paintcolor = image.colorAllocate(rgb...);
image.filledRectangle(start * barwidth, 0, start*barwidth + barwidth - 1, 99, paintcolor);
start++;
};
%f'colorbars.png'.open('>:raw').print(image.png);