}
//clip width against dest width
- w = min(w,(int)(pen.end_x()-pen.x()));
- h = min(h,(int)(pen.end_y()-pen.y()));
+ w = min((long)w,(long)(pen.end_x()-pen.x()));
+ h = min((long)h,(long)(pen.end_y()-pen.y()));
//clip width against src width
- w = min(w,(int)(get_w()-x));
- h = min(h,(int)(get_h()-y));
+ w = min(w,get_w()-x);
+ h = min(h,get_h()-y);
if(w<=0 || h<=0)
return;