Log In  

draw= function {


P#76915 2020-05-19 17:43 ( Edited 2020-05-19 17:46)

plz help i do not no how to even get a pixel on the screen and no things i can find to help

P#76917 2020-05-19 17:44

Three things:

1) The name of the _draw function must start with an underscore.

2) your code draws a line from point (10,10) to point (10,10) -- the same point. That will only draw a single pixel.

3) your code does not clear the screen before drawing, so that single pixel could be drawn onto some text that is already onscreen and so not be noticeable.

Here's a version that clears the screen and draws a longer line, from the top-left to bottom-right corner of the screen.

_draw = function()
 line(0,0, 127,127)
P#76927 2020-05-19 22:13 ( Edited 2020-05-19 22:14)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-03-23 10:56:43 | 0.005s | Q:13