mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-11 02:26:16 +00:00
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
@ -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…
x
Reference in New Issue
Block a user