This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
zeekkay's profile picture

[1.46] Additional paintutils

Started by zeekkay, 02 November 2012 - 08:46 AM
zeekkay #1
Posted 02 November 2012 - 09:46 AM
Maybe this has been suggested, if someone manages to find an exact post of this then they have godlike search skills. 10 mins of searching for the obvious… nothing.

mon.drawImage(image,x,y) – Where mon is a handle to a monitor and image is a handle to an image, draw an image on mon

Following have been thrown around, but not in the paintutils API

paintutils.drawPixel(color,x,y) - color is a string to a given color ("blue","orange",etc.)
mon.drawpixel(color,x,y) - Nuff said, mon is a handle to a monitor
billysback #2
Posted 02 November 2012 - 10:58 PM
http://www.computerc...r-tags-api-v10/

I AM NOW GODLIKE (right?)
Jasonfran #3
Posted 02 November 2012 - 11:20 PM
I am pretty sure that what you suggested is in paintutils… I have saw a draw pixel function and used it. There is also a drawImage one. These may not be on the wiki but they are definitely in the API script.
BJApps #4
Posted 31 August 2013 - 06:36 PM
I'm pretty sure neither of the posters here actually READ his question. Painting on a monitor using paintutils is easy, but it won't let you paint to anything but the primary monitor set by term.redirect. Is there a way to paint to a monitor directly without the use of term. If I want to draw on ten different monitors at once, using different threads (via parallel). It would be a lot easier if I didn't have to redirect every single time and risk one overwriting the other.
ElvishJerricco #5
Posted 31 August 2013 - 07:42 PM
I'm pretty sure neither of the posters here actually READ his question. Painting on a monitor using paintutils is easy, but it won't let you paint to anything but the primary monitor set by term.redirect. Is there a way to paint to a monitor directly without the use of term. If I want to draw on ten different monitors at once, using different threads (via parallel). It would be a lot easier if I didn't have to redirect every single time and risk one overwriting the other.

It's not too hard to create a dummy term-like table whose functions affect all monitors instead of just one. Then you just term.redirect to that table.
Lyqyd #6
Posted 31 August 2013 - 08:19 PM
Or you just redirect and restore each time you want to draw something. Why you'd need ten coroutines to do this is beyond me.