else nrx=Math.min(nrx, (int)((width-viewWidth)*scale));
else nrx=Math.min(nrx, (int)(width*scale-viewWidth));
public boolean moveOrigin(int dx, int dy) {	int nrx = rx+dx;	int nry = ry+dy;	if (nrx<0) nrx=0;	else nrx=Math.min(nrx, (int)((width-viewWidth)*scale));	if (nry<0) nry=0;	else nry=Math.min(nry, (int)((height-viewHeight)*scale));	boolean change = (nrx!=rx) || (nry!=ry);	rx=nrx; ry=nry;	drx = rx;	dry = ry;	return change;}