Hi,
You will probably have to do something like that. You can use bitBlt to set a single pixel and do the clipping for you by using...
LCD.bitBlt(display, LCD.SCREEN_WIDTH, LCD.SCREEN_HEIGHT, 0, 0, display, LCD.SCREEN_WIDTH, LCD.SCREEN_HEIGHT, x, y, 1, 1, LCD.ROP_SET);
where display is the return value from LCD.getDisplay()
instead of...
if (testY >= 0 && testY < 64) {
LCD.setPixel(1, x, y);
This will set pixels to black, if you want to set them to white use ROP_CLEAR.
The native method is a little faster than accessing the display as an array (which is what the setPixel code uses)...
I have improved the leJOS graphics classes quite a bit (you can now use them with images, we have multiple fonts, load images from files etc.). But these are only available in the developer builds at the moment. You can see the code here...
http://lejos.svn.sourceforge.net/viewvc ... ion/lcdui/
Andy