参考 draw()

draw()

Draws to the framebuffer by calling a function that contains drawing instructions.

The parameter, callback, is a function with the drawing instructions for the framebuffer. For example, calling myBuffer.draw(myFunction) will call a function named myFunction() to draw to the framebuffer. Doing so has the same effect as the following:

myBuffer.begin();
myFunction();
myBuffer.end();

示例

语法

draw(callback)

参数

callback
Function: function that draws to the framebuffer.

相关参考