Hi all,
I was wondering what people would suggest as to the best way to save a portion of the current screen (a rectangular section of pixels).
For example, I paint a range of rectangles, circles and random images to the canvas. When I press a key, it takes a snapshot of a portion of the screen. What is the best way to grab the data?
Would the following work?
DirectGraphics dgSrc = DirectUtils.getDirectGraphics(g);
short[] pixels = new short[nPixels];
dgSrc.getPixels(pixels,0,w,0,0,w,h,DirectGraphics.TYPE_USHORT_444_RGB);