fix async draw and update pixels example

This commit is contained in:
Quentin Leonetti 2019-07-14 08:58:51 +02:00
parent e060b81e0b
commit d72548644e
2 changed files with 6 additions and 5 deletions
desktop/sources/scripts
examples

@ -15,8 +15,8 @@ function Library (ronin) {
return path
}
this.draw = (path, rect) => {
ronin.surface.draw(path, rect)
this.draw = (path, rect, callback) => {
ronin.surface.draw(path, rect, callback)
return rect
}

@ -4,6 +4,7 @@
; Draw photo
(draw "../../PREVIEW.jpg")
(echo (select (rect 0 0 10 10)))
)
(draw "../../PREVIEW.jpg"
(frame)
(lambda () (echo (select (rect 660 344 10 10))))
))