S
Sterntaler
Unregistered / Unconfirmed
GUEST, unregistred user!
片断如下:
MemoryImageSource memImage;
Image drawImage;
int scrWidth = 400;
int scrHeight = 300;
int pixelCount = 120000;
int[] pixels = new int[pixelCount];
// 为什么少了这一行会很慢很慢?
// for (int i=0;
i< pixelCount;
++i) pixels = 0xff000000;
//
offImage = new MemoryImageSource(scrWidth, scrHeight, pixels, 0, scrWidth);
memImage.setAnimated(true);
drawImage = createImage(offImage);
MemoryImageSource memImage;
Image drawImage;
int scrWidth = 400;
int scrHeight = 300;
int pixelCount = 120000;
int[] pixels = new int[pixelCount];
// 为什么少了这一行会很慢很慢?
// for (int i=0;
i< pixelCount;
++i) pixels = 0xff000000;
//
offImage = new MemoryImageSource(scrWidth, scrHeight, pixels, 0, scrWidth);
memImage.setAnimated(true);
drawImage = createImage(offImage);