Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
20
Task/Bitmap/Phix/bitmap.phix
Normal file
20
Task/Bitmap/Phix/bitmap.phix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- Some colour constants:
|
||||
constant black = #000000,
|
||||
-- blue = #0000FF,
|
||||
-- green = #00FF00,
|
||||
-- red = #FF0000,
|
||||
white = #FFFFFF
|
||||
|
||||
-- Create new image filled with some colour
|
||||
function new_image(integer width, integer height, integer fill_colour=black)
|
||||
return repeat(repeat(fill_colour,height),width)
|
||||
end function
|
||||
|
||||
-- Usage example:
|
||||
sequence image = new_image(800,600)
|
||||
|
||||
-- Set pixel color:
|
||||
image[400][300] = white
|
||||
|
||||
-- Get pixel color
|
||||
integer colour = image[400][300] -- Now colour is #FF0000
|
||||
Loading…
Add table
Add a link
Reference in a new issue