Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
23
Task/Bitmap/Euphoria/bitmap.euphoria
Normal file
23
Task/Bitmap/Euphoria/bitmap.euphoria
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- Some color constants:
|
||||
constant
|
||||
black = #000000,
|
||||
white = #FFFFFF,
|
||||
red = #FF0000,
|
||||
green = #00FF00,
|
||||
blue = #0000FF
|
||||
|
||||
-- Create new image filled with some color
|
||||
function new_image(integer width, integer height, atom fill_color)
|
||||
return repeat(repeat(fill_color,height),width)
|
||||
end function
|
||||
|
||||
-- Usage example:
|
||||
sequence image
|
||||
image = new_image(800,600,black)
|
||||
|
||||
-- Set pixel color:
|
||||
image[400][300] = red
|
||||
|
||||
-- Get pixel color
|
||||
atom color
|
||||
color = image[400][300] -- Now color is #FF0000
|
||||
Loading…
Add table
Add a link
Reference in a new issue