2 posts
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.
1619 posts
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(" ")
515 posts
Location
Australia
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
1619 posts
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
882 posts
Location
Behind you.
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/>