Skip to content

Latest commit

 

History

History
84 lines (52 loc) · 3.64 KB

class_resourceimporterbitmap.rst

File metadata and controls

84 lines (52 loc) · 3.64 KB
github_url:hide

ResourceImporterBitMap

Inherits: :ref:`ResourceImporter<class_ResourceImporter>` < :ref:`RefCounted<class_RefCounted>` < :ref:`Object<class_Object>`

Imports a :ref:`BitMap<class_BitMap>` resource (2D array of boolean values).

.. rst-class:: classref-introduction-group

Description

:ref:`BitMap<class_BitMap>` resources are typically used as click masks in :ref:`TextureButton<class_TextureButton>` and :ref:`TouchScreenButton<class_TouchScreenButton>`.

.. rst-class:: classref-introduction-group

Tutorials

.. rst-class:: classref-reftable-group

Properties

:ref:`int<class_int>` :ref:`create_from<class_ResourceImporterBitMap_property_create_from>` 0
:ref:`float<class_float>` :ref:`threshold<class_ResourceImporterBitMap_property_threshold>` 0.5
.. rst-class:: classref-section-separator


.. rst-class:: classref-descriptions-group

Property Descriptions

.. rst-class:: classref-property

:ref:`int<class_int>` create_from = 0

The data source to use for generating the bitmap.

Black & White: Pixels whose HSV value is greater than the :ref:`threshold<class_ResourceImporterBitMap_property_threshold>` will be considered as "enabled" (bit is true). If the pixel is lower than or equal to the threshold, it will be considered as "disabled" (bit is false).

Alpha: Pixels whose alpha value is greater than the :ref:`threshold<class_ResourceImporterBitMap_property_threshold>` will be considered as "enabled" (bit is true). If the pixel is lower than or equal to the threshold, it will be considered as "disabled" (bit is false).

.. rst-class:: classref-item-separator


.. rst-class:: classref-property

:ref:`float<class_float>` threshold = 0.5

The threshold to use to determine which bits should be considered enabled or disabled. See also :ref:`create_from<class_ResourceImporterBitMap_property_create_from>`.