protected Rectangle getArea() {
return constructArea(wrap, includeControl, hr, vr);
}
private static Rectangle constructArea(Wrap wrap, boolean includeControl, int hr, int vr) {
Rectangle res = new Rectangle();
res.width = MAX_SCREEN_SIZE;
res.height = MAX_SCREEN_SIZE;
Rectangle bounds = wrap.getScreenBounds();
if (hr != 0) {
if (hr < 0) {
res.x = -MAX_SCREEN_SIZE + bounds.x + (includeControl ? bounds.width : 0);
} else {
res.x = bounds.x + (includeControl ? 0 : bounds.width);