Hmmm... you might find that which performs better varies from device to device. For Nokias, I'd guess it would make no difference.
You might like to implement it both ways.
Code:
if (Device.USE_DRAWREGION) {
// draw screen using drawRegion()
} else {
// draw screen using setClip()/drawImage()
}
Then have a class like:
Code:
public class Device {
public static final boolean USE_DRAWREGION = false;
}
You can have different versions of this class for different devices, kind of like having different .h files for a C program.
(Principle: when the expression in an "if" can be computed at compile time, because the values in it are either literal values or "static final", then the "if" is removed, and only the "true" code included in the compiler's output. This functions like conditional-compilation in C/C++ programs.)
Graham.