mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
99 lines
3.9 KiB
ReStructuredText
99 lines
3.9 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_ResourceImporterSVG:
|
|
|
|
ResourceImporterSVG
|
|
===================
|
|
|
|
**继承:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
将 SVG 文件作为自动缩放纹理导入,用于 UI 元素和 2D 渲染。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
描述
|
|
----
|
|
|
|
该导入器导入 :ref:`DPITexture<class_DPITexture>` 资源。另见 :ref:`ResourceImporterTexture<class_ResourceImporterTexture>` 和 :ref:`ResourceImporterImage<class_ResourceImporterImage>`\ 。
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
属性
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-------------------------------------+------------------------------------------------------------------+----------+
|
|
| :ref:`float<class_float>` | :ref:`base_scale<class_ResourceImporterSVG_property_base_scale>` | ``1.0`` |
|
|
+-------------------------------------+------------------------------------------------------------------+----------+
|
|
| :ref:`Dictionary<class_Dictionary>` | :ref:`color_map<class_ResourceImporterSVG_property_color_map>` | ``{}`` |
|
|
+-------------------------------------+------------------------------------------------------------------+----------+
|
|
| :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterSVG_property_compress>` | ``true`` |
|
|
+-------------------------------------+------------------------------------------------------------------+----------+
|
|
| :ref:`float<class_float>` | :ref:`saturation<class_ResourceImporterSVG_property_saturation>` | ``1.0`` |
|
|
+-------------------------------------+------------------------------------------------------------------+----------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
属性说明
|
|
--------
|
|
|
|
.. _class_ResourceImporterSVG_property_base_scale:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **base_scale** = ``1.0`` :ref:`🔗<class_ResourceImporterSVG_property_base_scale>`
|
|
|
|
纹理缩放。\ ``1.0`` 是原始 SVG 大小。值越大得到的图像越大。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_ResourceImporterSVG_property_color_map:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Dictionary<class_Dictionary>` **color_map** = ``{}`` :ref:`🔗<class_ResourceImporterSVG_property_color_map>`
|
|
|
|
设置后,会根据 :ref:`Color<class_Color>`-:ref:`Color<class_Color>` 映射对纹理中的颜色进行重映射。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_ResourceImporterSVG_property_compress:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`bool<class_bool>` **compress** = ``true`` :ref:`🔗<class_ResourceImporterSVG_property_compress>`
|
|
|
|
如果为 ``true``\ ,则对 SVG 源码使用无损压缩。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_ResourceImporterSVG_property_saturation:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **saturation** = ``1.0`` :ref:`🔗<class_ResourceImporterSVG_property_saturation>`
|
|
|
|
覆盖纹理饱和度。
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (本方法无副作用,不会修改该实例的任何成员变量。)`
|
|
.. |vararg| replace:: :abbr:`vararg (本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。)`
|
|
.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)`
|
|
.. |static| replace:: :abbr:`static (调用本方法无需实例,可直接使用类名进行调用。)`
|
|
.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效运算符。)`
|
|
.. |bitfield| replace:: :abbr:`BitField (这个值是由下列位标志构成位掩码的整数。)`
|
|
.. |void| replace:: :abbr:`void (无返回值。)`
|