github_url: | hide |
---|
Inherits: :ref:`Texture2D<class_Texture2D>` < :ref:`Texture<class_Texture>` < :ref:`Resource<class_Resource>` < :ref:`Reference<class_Reference>` < :ref:`Object<class_Object>`
A :ref:`Texture2D<class_Texture2D>` based on an :ref:`Image<class_Image>`.
A :ref:`Texture2D<class_Texture2D>` based on an :ref:`Image<class_Image>`. Can be created from an :ref:`Image<class_Image>` with :ref:`create_from_image<class_ImageTexture_method_create_from_image>`.
- void create_from_image ( :ref:`Image<class_Image>` image )
Create a new ImageTexture
from an :ref:`Image<class_Image>`.
- :ref:`Format<enum_Image_Format>` get_format ( ) const
Returns the format of the ImageTexture
, one of :ref:`Format<enum_Image_Format>`.
- void set_size_override ( :ref:`Vector2<class_Vector2>` size )
Resizes the ImageTexture
to the specified dimensions.
- void update ( :ref:`Image<class_Image>` image, :ref:`bool<class_bool>` immediate=false )
Replaces the texture's data with a new image
. If immediate
is true
, it will take effect immediately after the call.