class_resourceimporterbitmap.rst 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ResourceImporterBitMap.xml.
  6. .. _class_ResourceImporterBitMap:
  7. ResourceImporterBitMap
  8. ======================
  9. **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Imports a :ref:`BitMap<class_BitMap>` resource (2D array of boolean values).
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. :ref:`BitMap<class_BitMap>` resources are typically used as click masks in :ref:`TextureButton<class_TextureButton>` and :ref:`TouchScreenButton<class_TouchScreenButton>`.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`Importing images <../tutorials/assets_pipeline/importing_images>`
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +---------------------------+-----------------------------------------------------------------------+---------+
  25. | :ref:`int<class_int>` | :ref:`create_from<class_ResourceImporterBitMap_property_create_from>` | ``0`` |
  26. +---------------------------+-----------------------------------------------------------------------+---------+
  27. | :ref:`float<class_float>` | :ref:`threshold<class_ResourceImporterBitMap_property_threshold>` | ``0.5`` |
  28. +---------------------------+-----------------------------------------------------------------------+---------+
  29. .. rst-class:: classref-section-separator
  30. ----
  31. .. rst-class:: classref-descriptions-group
  32. Property Descriptions
  33. ---------------------
  34. .. _class_ResourceImporterBitMap_property_create_from:
  35. .. rst-class:: classref-property
  36. :ref:`int<class_int>` **create_from** = ``0`` :ref:`🔗<class_ResourceImporterBitMap_property_create_from>`
  37. The data source to use for generating the bitmap.
  38. \ **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``).
  39. \ **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``).
  40. .. rst-class:: classref-item-separator
  41. ----
  42. .. _class_ResourceImporterBitMap_property_threshold:
  43. .. rst-class:: classref-property
  44. :ref:`float<class_float>` **threshold** = ``0.5`` :ref:`🔗<class_ResourceImporterBitMap_property_threshold>`
  45. The threshold to use to determine which bits should be considered enabled or disabled. See also :ref:`create_from<class_ResourceImporterBitMap_property_create_from>`.
  46. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  47. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  48. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  49. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  50. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  51. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  52. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  53. .. |void| replace:: :abbr:`void (No return value.)`