.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_ViewportSprite: ViewportSprite ============== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Displays a viewport as a sprite. Member Functions ---------------- +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_modulate` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_offset` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_viewport_path` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_centered` **(** **)** const | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_centered` **(** :ref:`bool` centered **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_modulate` **(** :ref:`Color` modulate **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_offset` **(** :ref:`Vector2` offset **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_viewport_path` **(** :ref:`NodePath` path **)** | +----------------------------------+---------------------------------------------------------------------------------------------------------------------+ Description ----------- Used to display a :ref:`Viewport` node at some position in the world, without having to mess with :ref:`RenderTargetTexture`\ s. Member Function Description --------------------------- .. _class_ViewportSprite_get_modulate: - :ref:`Color` **get_modulate** **(** **)** const Get color modulation for the texture. All texture pixels are multiplied by this color. .. _class_ViewportSprite_get_offset: - :ref:`Vector2` **get_offset** **(** **)** const get the offset to the origin of the texture. .. _class_ViewportSprite_get_viewport_path: - :ref:`NodePath` **get_viewport_path** **(** **)** const Return the path to the shown :ref:`Viewport` node. .. _class_ViewportSprite_is_centered: - :ref:`bool` **is_centered** **(** **)** const Return whether the viewport's texture is centered on the origin. .. _class_ViewportSprite_set_centered: - void **set_centered** **(** :ref:`bool` centered **)** Set whether the viewport's texture should be centered on the origin. .. _class_ViewportSprite_set_modulate: - void **set_modulate** **(** :ref:`Color` modulate **)** Set color modulation for the texture. All texture pixels are multiplied by this color. Color may contain rgb values above 1 to achieve a highlight effect. .. _class_ViewportSprite_set_offset: - void **set_offset** **(** :ref:`Vector2` offset **)** Set the offset to the origin of the texture. .. _class_ViewportSprite_set_viewport_path: - void **set_viewport_path** **(** :ref:`NodePath` path **)** Set the path to the shown :ref:`Viewport` node.