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:
parent
ccac655da4
commit
94cf0adb29
1 changed files with 0 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue