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

paint to monitor

Started by lologarithm, 09 January 2013 - 11:49 AM
lologarithm #1
Posted 09 January 2013 - 12:49 PM
I can't find any posts about this and I haven't seen anyone suggest it:

Would it be worthwhile for the monitor API to include a 'drawPixel' method? Standard monitor would simply print a black or white pixel while advanced monitors could take a color.

From what I can tell the only way to 'draw' to a monitor (not just print text) is to use term.redirect(), however this means that you can't output to the computer at the same time.

The reason for this is if you wanted an external touchscreen interface on a monitor and a combined keyboard/touch on the computer itself. I realize I could just have a key combo that switched between both monitor and term to allow both but it seems that it would be pretty cool to do both at once.
Dlcruz129 #2
Posted 09 January 2013 - 01:16 PM
I can't find any posts about this and I haven't seen anyone suggest it:

Would it be worthwhile for the monitor API to include a 'drawPixel' method? Standard monitor would simply print a black or white pixel while advanced monitors could take a color.

From what I can tell the only way to 'draw' to a monitor (not just print text) is to use term.redirect(), however this means that you can't output to the computer at the same time.

The reason for this is if you wanted an external touchscreen interface on a monitor and a combined keyboard/touch on the computer itself. I realize I could just have a key combo that switched between both monitor and term to allow both but it seems that it would be pretty cool to do both at once.


mon.setCursorPos(location)
mon.setBackgroundColor(color)
mon.write(" ")
1lann #3
Posted 09 January 2013 - 10:37 PM
I can't find any posts about this and I haven't seen anyone suggest it:

Would it be worthwhile for the monitor API to include a 'drawPixel' method? Standard monitor would simply print a black or white pixel while advanced monitors could take a color.

From what I can tell the only way to 'draw' to a monitor (not just print text) is to use term.redirect(), however this means that you can't output to the computer at the same time.

The reason for this is if you wanted an external touchscreen interface on a monitor and a combined keyboard/touch on the computer itself. I realize I could just have a key combo that switched between both monitor and term to allow both but it seems that it would be pretty cool to do both at once.


mon.setCursorPos(location)
mon.setTextColor(color)
mon.write(" ")
*mon.setBackgroundColor
Dlcruz129 #4
Posted 10 January 2013 - 04:19 AM
I can't find any posts about this and I haven't seen anyone suggest it:

Would it be worthwhile for the monitor API to include a 'drawPixel' method? Standard monitor would simply print a black or white pixel while advanced monitors could take a color.

From what I can tell the only way to 'draw' to a monitor (not just print text) is to use term.redirect(), however this means that you can't output to the computer at the same time.

The reason for this is if you wanted an external touchscreen interface on a monitor and a combined keyboard/touch on the computer itself. I realize I could just have a key combo that switched between both monitor and term to allow both but it seems that it would be pretty cool to do both at once.


mon.setCursorPos(location)
mon.setTextColor(color)
mon.write(" ")
*mon.setBackgroundColor

:P/> thanks
Alice #5
Posted 08 May 2013 - 11:51 AM
I'm just browsing through the forums here, I know this is months old, but here's some code:

function printPixel(x, y, color)
mon.setCursorPos(x,y)
mon.setBackgroundColor(color)
mon.write(" ")
end

If anyone wanted an easier way to do it, there you go :P/>