Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
16
Task/Bitmap/Pluto/bitmap-2.pluto
Normal file
16
Task/Bitmap/Pluto/bitmap-2.pluto
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
require "bitmap"
|
||||
|
||||
-- Create a new bitmap object: 400 pixels wide and 400 pixels high
|
||||
local bmp = bitmap.of(400, 400, color.blue, "mybmp")
|
||||
|
||||
-- Draw a red square in the middle.
|
||||
bmp:square(200, 200, 50, color.red, 0, true)
|
||||
|
||||
-- Print to the terminal the color (as an integer) of a pixel.
|
||||
print(bmp:get(200, 200)) -- 255
|
||||
|
||||
-- View the image using the default viewer for the platform.
|
||||
bmp:view()
|
||||
|
||||
-- Save the image to the file mybmp.bmp in the current directory.
|
||||
bmp:save()
|
||||
Loading…
Add table
Add a link
Reference in a new issue