This commit is contained in:
Charles Dang 2024-08-17 16:16:34 -04:00
parent 6d258e20de
commit fb1232e4ea
2 changed files with 3 additions and 3 deletions

View file

@ -1805,11 +1805,11 @@ constexpr bool not_alpha(uint32_t pixel)
}
}
rect get_non_transparent_portion(surface nsurf)
rect get_non_transparent_portion(const surface& nsurf)
{
rect res {0,0,0,0};
surface_lock lock(nsurf);
const_surface_lock lock(nsurf);
const uint32_t* const pixels = lock.pixels();
int n;

View file

@ -246,7 +246,7 @@ surface rotate_90_surface(const surface &surf, bool clockwise);
surface flip_surface(const surface &surf);
surface flop_surface(const surface &surf);
rect get_non_transparent_portion(surface surf);
rect get_non_transparent_portion(const surface& surf);
/**
* Helper methods for setting/getting a single pixel in an image.