allow negative x,y in ~CROP

this allows to crop a larger image from a smaller source image, the
underlying cut_surface function already supports this behaviour.

This is specially useful to blit another image on the image which would
not fit onto the original image otherwise.
This commit is contained in:
gfgtdf 2015-06-24 17:06:12 +02:00
parent ccac655da4
commit 94cf0adb29

View file

@ -239,14 +239,6 @@ surface crop_modification::operator()(const surface& src) const
if(area.h == 0) {
area.h = src->h;
}
if(area.x < 0) {
ERR_DP << "start X coordinate of CROP modification is negative - truncating to zero" << std::endl;
area.x = 0;
}
if(area.y < 0) {
ERR_DP << "start Y coordinate of CROP modification is negative - truncating to zero" << std::endl;
area.y = 0;
}
/*
* Unlike other image functions cut_surface does not convert the input