bound is_pixel_opaque() properly

This commit is contained in:
BigPotatoAss 2024-10-19 22:19:00 +03:30
parent 44fa552343
commit 25dd96179c
2 changed files with 8 additions and 0 deletions

View file

@ -145,5 +145,12 @@
Returns [code]true[/code] if this [Texture2D] has an alpha channel.
</description>
</method>
<method name="is_pixel_opaque" qualifiers="const">
<return type="bool" />
<param index="0" name="p_x" type="int" />
<param index="1" name="p_y" type="int" />
<description>
</description>
</method>
</methods>
</class>

View file

@ -104,6 +104,7 @@ void Texture2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "clip_uv"), &Texture2D::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(true));
ClassDB::bind_method(D_METHOD("get_image"), &Texture2D::get_image);
ClassDB::bind_method(D_METHOD("create_placeholder"), &Texture2D::create_placeholder);
ClassDB::bind_method(D_METHOD("is_pixel_opaque", "p_x", "p_y"), &Texture2D::is_pixel_opaque);
ADD_GROUP("", "");