You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Merge pull request #9231 from dumitru-stama/constimg
Fixed a bug in get_pixel not being const
This commit is contained in:
@@ -1712,7 +1712,7 @@ void Image::unlock() {
|
|||||||
write_lock = PoolVector<uint8_t>::Write();
|
write_lock = PoolVector<uint8_t>::Write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Color Image::get_pixel(int p_x, int p_y) {
|
Color Image::get_pixel(int p_x, int p_y) const {
|
||||||
|
|
||||||
uint8_t *ptr = write_lock.ptr();
|
uint8_t *ptr = write_lock.ptr();
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ public:
|
|||||||
|
|
||||||
DetectChannels get_detected_channels();
|
DetectChannels get_detected_channels();
|
||||||
|
|
||||||
Color get_pixel(int p_x, int p_y);
|
Color get_pixel(int p_x, int p_y) const;
|
||||||
void put_pixel(int p_x, int p_y, const Color &p_color);
|
void put_pixel(int p_x, int p_y, const Color &p_color);
|
||||||
|
|
||||||
void copy_internals_from(const Ref<Image> &p_image) {
|
void copy_internals_from(const Ref<Image> &p_image) {
|
||||||
|
|||||||
Reference in New Issue
Block a user