summaryrefslogtreecommitdiff
path: root/core/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/image.cpp')
-rw-r--r--core/image.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/image.cpp b/core/image.cpp
index 6f18516ae1..ff8acc54af 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -3668,6 +3668,10 @@ Ref<Resource> Image::duplicate(bool p_subresources) const {
return copy;
}
+void Image::set_as_black() {
+ zeromem(data.ptrw(), data.size());
+}
+
Image::Image() {
width = 0;