Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local buffer = require("doubleBuffering")
- local image = require("image")
- --------------------------------------------------------------------------------
- -- Load image from file and draw it to screen buffer
- --buffer.drawImage(1, 1, image.load("/MineOS/Pictures/Raspberry.pic"))
- -- Fill buffer with black color and transparency set to 0.6 to make image "darker"
- buffer.clear(0x0, 0.6)
- -- Draw 10 rectangles filled with random color
- local x, y, xStep, yStep = 2, 2, 4, 2
- for i = 1, 10 do
- buffer.drawRectangle(x, y, 6, 3, math.random(0x0, 0xFFFFFF), 0x0, " ")
- x, y = x + xStep, y + yStep
- end
- -- Draw yellow semi-pixel ellipse
- buffer.drawSemiPixelEllipse(22, 22, 10, 10, 0xFFDB40)
- -- Draw yellow semi-pixel line
- buffer.drawSemiPixelLine(2, 36, 35, 3, 0xFFFFFF)
- -- Draw green bezier curve with accuracy set to 0.01
- buffer.drawSemiPixelCurve(
- {
- { x = 2, y = 63},
- { x = 63, y = 63},
- { x = 63, y = 2}
- },
- 0x44FF44,
- 0.01
- )
- buffer.drawChanges()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement